Mercurial > code > home > repos > homeauto
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 |
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 | 8 logger: |
9 baud_rate: 0 | |
10 level: INFO | |
11 logs: | |
12 out: INFO | |
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 | 18 |
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 | 26 on_json_message: |
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 | 33 times: !lambda |- |
34 if (x.containsKey("times")) { | |
35 return x["times"]; | |
36 } | |
37 return 1; | |
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 | 44 times: !lambda |- |
45 if (x.containsKey("times")) { | |
46 return x["times"]; | |
47 } | |
48 return 1; | |
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 | 83 - id: rf_in |
84 pin: GPIO13 | |
85 tolerance: 20% | |
86 filter: 250us | |
87 idle: 8ms | |
88 dump: rc_switch | |
89 on_rc_switch: | |
90 then: | |
91 - logger.log: | |
92 level: INFO | |
93 tag: out | |
94 format: "RF read; proto %d; code %08llx" | |
95 args: [x.protocol, x.code] | |
96 - mqtt.publish_json: | |
97 topic: theater_blaster/rf_received | |
98 payload: !lambda |- | |
99 root["protocol"] = x.protocol; | |
100 root["code0"] = static_cast<unsigned long>(x.code >> 32); | |
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 | 118 i2c: |
119 sda: 4 | |
120 scl: 15 | |
121 | |
122 font: | |
123 - file: "/usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf" | |
124 id: font_vera | |
125 size: 20 | |
126 | |
127 display: | |
128 - platform: ssd1306_i2c | |
129 model: "SSD1306 128x64" | |
130 reset_pin: 16 | |
131 address: 0x3C | |
132 lambda: |- | |
133 it.print(128/2, 0+6, id(font_vera), TextAlign::TOP_CENTER, "big cast erisk"); | |
134 it.print(128/2, 64-6, id(font_vera), TextAlign::BOTTOM_CENTER ,"Volume 45"); |