annotate espNode/theater_blaster.yaml @ 1754:92999dfbf321 default tip

add shelly support
author drewp@bigasterisk.com
date Tue, 04 Jun 2024 13:03:43 -0700
parents bb3a7869b54d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
687
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
1 esphome:
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
2 name: theater_blaster
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
3 platform: esp32
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
4 board: lolin32
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
5
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
6 # MAC: 3c:71:bf:ab:6e:94
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
7
803
bb3a7869b54d some cleanup and read support
drewp@bigasterisk.com
parents: 773
diff changeset
8 logger:
bb3a7869b54d some cleanup and read support
drewp@bigasterisk.com
parents: 773
diff changeset
9 baud_rate: 0
bb3a7869b54d some cleanup and read support
drewp@bigasterisk.com
parents: 773
diff changeset
10 level: INFO
bb3a7869b54d some cleanup and read support
drewp@bigasterisk.com
parents: 773
diff changeset
11 logs:
bb3a7869b54d some cleanup and read support
drewp@bigasterisk.com
parents: 773
diff changeset
12 out: INFO
bb3a7869b54d some cleanup and read support
drewp@bigasterisk.com
parents: 773
diff changeset
13
687
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
14 wifi:
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
15 ssid: !secret wifi_ssid
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
16 password: !secret wifi_password
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
17 use_address: 10.2.0.38
803
bb3a7869b54d some cleanup and read support
drewp@bigasterisk.com
parents: 773
diff changeset
18
bb3a7869b54d some cleanup and read support
drewp@bigasterisk.com
parents: 773
diff changeset
19 ota:
687
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
20
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
21 mqtt:
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
22 broker: '10.2.0.1'
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
23 port: 1883
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
24 username: ''
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
25 password: ''
773
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents: 726
diff changeset
26 on_json_message:
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents: 726
diff changeset
27 - topic: theater_blaster/ir_out/volume_up
687
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
28 then:
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
29 - remote_transmitter.transmit_nec:
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
30 address: 0x4BB6
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
31 command: 0x40BF
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
32 repeat:
773
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents: 726
diff changeset
33 times: !lambda |-
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents: 726
diff changeset
34 if (x.containsKey("times")) {
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents: 726
diff changeset
35 return x["times"];
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents: 726
diff changeset
36 }
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents: 726
diff changeset
37 return 1;
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents: 726
diff changeset
38 - topic: theater_blaster/ir_out/volume_down
687
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
39 then:
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
40 - remote_transmitter.transmit_nec:
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
41 address: 0x4BB6
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
42 command: 0xC03F
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
43 repeat:
773
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents: 726
diff changeset
44 times: !lambda |-
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents: 726
diff changeset
45 if (x.containsKey("times")) {
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents: 726
diff changeset
46 return x["times"];
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents: 726
diff changeset
47 }
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents: 726
diff changeset
48 return 1;
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents: 726
diff changeset
49 on_message:
687
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
50 - topic: theater_blaster/ir_out
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
51 payload: "input_bd"
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
52 then:
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
53 - remote_transmitter.transmit_nec:
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
54 address: 0x4B36
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
55 command: 0x31CE
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
56 - topic: theater_blaster/ir_out
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
57 payload: "input_cbl"
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
58 then:
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
59 - remote_transmitter.transmit_nec:
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
60 address: 0x4BB6
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
61 command: 0x708F
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
62 - topic: theater_blaster/ir_out
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
63 payload: "input_game"
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
64 then:
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
65 - remote_transmitter.transmit_nec:
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
66 address: 0x4BB6
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
67 command: 0xB04F
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
68 - topic: theater_blaster/ir_out
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
69 payload: "input_pc"
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
70 then:
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
71 - remote_transmitter.transmit_nec:
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
72 address: 0x4BB6
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
73 command: 0x39C6
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
74
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
75
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
76 remote_receiver:
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
77 - id: ir_in
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
78 pin:
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
79 number: GPIO27
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
80 mode: INPUT
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
81 inverted: True
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
82 dump: nec
803
bb3a7869b54d some cleanup and read support
drewp@bigasterisk.com
parents: 773
diff changeset
83 - id: rf_in
bb3a7869b54d some cleanup and read support
drewp@bigasterisk.com
parents: 773
diff changeset
84 pin: GPIO13
bb3a7869b54d some cleanup and read support
drewp@bigasterisk.com
parents: 773
diff changeset
85 tolerance: 20%
bb3a7869b54d some cleanup and read support
drewp@bigasterisk.com
parents: 773
diff changeset
86 filter: 250us
bb3a7869b54d some cleanup and read support
drewp@bigasterisk.com
parents: 773
diff changeset
87 idle: 8ms
bb3a7869b54d some cleanup and read support
drewp@bigasterisk.com
parents: 773
diff changeset
88 dump: rc_switch
bb3a7869b54d some cleanup and read support
drewp@bigasterisk.com
parents: 773
diff changeset
89 on_rc_switch:
bb3a7869b54d some cleanup and read support
drewp@bigasterisk.com
parents: 773
diff changeset
90 then:
bb3a7869b54d some cleanup and read support
drewp@bigasterisk.com
parents: 773
diff changeset
91 - logger.log:
bb3a7869b54d some cleanup and read support
drewp@bigasterisk.com
parents: 773
diff changeset
92 level: INFO
bb3a7869b54d some cleanup and read support
drewp@bigasterisk.com
parents: 773
diff changeset
93 tag: out
bb3a7869b54d some cleanup and read support
drewp@bigasterisk.com
parents: 773
diff changeset
94 format: "RF read; proto %d; code %08llx"
bb3a7869b54d some cleanup and read support
drewp@bigasterisk.com
parents: 773
diff changeset
95 args: [x.protocol, x.code]
bb3a7869b54d some cleanup and read support
drewp@bigasterisk.com
parents: 773
diff changeset
96 - mqtt.publish_json:
bb3a7869b54d some cleanup and read support
drewp@bigasterisk.com
parents: 773
diff changeset
97 topic: theater_blaster/rf_received
bb3a7869b54d some cleanup and read support
drewp@bigasterisk.com
parents: 773
diff changeset
98 payload: !lambda |-
bb3a7869b54d some cleanup and read support
drewp@bigasterisk.com
parents: 773
diff changeset
99 root["protocol"] = x.protocol;
bb3a7869b54d some cleanup and read support
drewp@bigasterisk.com
parents: 773
diff changeset
100 root["code0"] = static_cast<unsigned long>(x.code >> 32);
bb3a7869b54d some cleanup and read support
drewp@bigasterisk.com
parents: 773
diff changeset
101 root["code1"] = static_cast<unsigned long>(x.code & 0xffff);
687
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
102 remote_transmitter:
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
103 id: ir_out
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
104 pin: GPIO14
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
105 carrier_duty_percent: 50%
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
106
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
107
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
108 #13 rf recv
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
109 #12 rf send
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
110 #https://www.passion-radio.com/img/cms/wifi-kit-32-pinout.png
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
111
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
112
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
113 #on_...:
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
114 # - remote_transmitter.transmit_nec:
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
115 # address: 0x1234
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
116 # command: 0x78AB
1fe2a8e15ebf working theater_blaster config. 3 immediate repeats of volume moves only one step
drewp@bigasterisk.com
parents:
diff changeset
117
773
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents: 726
diff changeset
118 i2c:
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents: 726
diff changeset
119 sda: 4
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents: 726
diff changeset
120 scl: 15
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents: 726
diff changeset
121
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents: 726
diff changeset
122 font:
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents: 726
diff changeset
123 - file: "/usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf"
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents: 726
diff changeset
124 id: font_vera
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents: 726
diff changeset
125 size: 20
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents: 726
diff changeset
126
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents: 726
diff changeset
127 display:
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents: 726
diff changeset
128 - platform: ssd1306_i2c
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents: 726
diff changeset
129 model: "SSD1306 128x64"
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents: 726
diff changeset
130 reset_pin: 16
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents: 726
diff changeset
131 address: 0x3C
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents: 726
diff changeset
132 lambda: |-
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents: 726
diff changeset
133 it.print(128/2, 0+6, id(font_vera), TextAlign::TOP_CENTER, "big cast erisk");
bc3516d02762 old changes in espNode
drewp@bigasterisk.com
parents: 726
diff changeset
134 it.print(128/2, 64-6, id(font_vera), TextAlign::BOTTOM_CENTER ,"Volume 45");