comparison tt-console.yaml @ 7:5a80f3f2be8d

more boards, cams
author drewp@bigasterisk.com
date Thu, 27 Jun 2024 16:55:03 -0700
parents
children
comparison
equal deleted inserted replaced
6:477883ce71ec 7:5a80f3f2be8d
1 # mac 3c:71:bf:ab:6e:94
2
3 esphome:
4 name: "tt-console"
5 platform: esp32
6 board: lolin32
7
8 logger:
9 baud_rate: 0
10 level: DEBUG
11 logs:
12 out: DEBUG
13
14 wifi:
15 networks:
16 - ssid: !secret wifi_ssid
17 password: !secret wifi_password
18
19 ota:
20 platform: esphome
21
22 sensor:
23 - platform: wifi_signal
24 name: "wifi_signal"
25 update_interval: 60s
26
27 mqtt:
28 id: mqtt_client
29 broker: "mqtt2.bigasterisk.com"
30 on_json_message:
31 - topic: theater_blaster/ir_out/volume_up
32 then:
33 - remote_transmitter.transmit_nec:
34 address: 0x4BB6
35 command: 0x40BF
36 repeat:
37 times: !lambda |-
38 if (x.containsKey("times")) {
39 return x["times"];
40 }
41 return 1;
42 - topic: theater_blaster/ir_out/volume_down
43 then:
44 - remote_transmitter.transmit_nec:
45 address: 0x4BB6
46 command: 0xC03F
47 repeat:
48 times: !lambda |-
49 if (x.containsKey("times")) {
50 return x["times"];
51 }
52 return 1;
53 on_message:
54 - topic: theater_blaster/ir_out
55 payload: "input_bd"
56 then:
57 - remote_transmitter.transmit_nec:
58 address: 0x4B36
59 command: 0x31CE
60 - topic: theater_blaster/ir_out
61 payload: "input_cbl"
62 then:
63 - remote_transmitter.transmit_nec:
64 address: 0x4BB6
65 command: 0x708F
66 - topic: theater_blaster/ir_out
67 payload: "input_game"
68 then:
69 - remote_transmitter.transmit_nec:
70 address: 0x4BB6
71 command: 0xB04F
72 - topic: theater_blaster/ir_out
73 payload: "input_pc"
74 then:
75 - remote_transmitter.transmit_nec:
76 address: 0x4BB6
77 command: 0x39C6
78
79 remote_receiver:
80 - id: ir_in
81 # CHO1838 receiver; sig|gnd|vcc 3v3
82 pin:
83 number: GPIO27
84 mode: INPUT
85 inverted: True
86 dump: nec
87 - id: rf_in
88 pin: GPIO13
89 tolerance: 20%
90 filter: 250us
91 idle: 8ms
92 dump: rc_switch
93 on_rc_switch:
94 then:
95 - logger.log:
96 level: INFO
97 tag: out
98 format: "RF read; proto %d; code %08llx"
99 args: [x.protocol, x.code]
100 - mqtt.publish:
101 topic: !lambda |-
102 return "tt-console/rf_received/" +
103 std::to_string(x.protocol) +
104 "/" + std::to_string(static_cast<unsigned long>(x.code >> 32)) +
105 "/" + std::to_string(static_cast<unsigned long>(x.code & 0xffff));
106 payload: ""
107 remote_transmitter:
108 id: ir_out
109 pin: GPIO14
110 carrier_duty_percent: 50%
111
112 #13 rf recv
113 #12 rf send
114 #https://www.passion-radio.com/img/cms/wifi-kit-32-pinout.png
115
116 #on_...:
117 # - remote_transmitter.transmit_nec:
118 # address: 0x1234
119 # command: 0x78AB
120
121 i2c:
122 sda: 4
123 scl: 15
124
125 font:
126 - file: "/usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf"
127 id: font_vera
128 size: 20
129
130 display:
131 - platform: ssd1306_i2c
132 model: "SSD1306 128x64"
133 reset_pin: 16
134 address: 0x3C
135 lambda: |-
136 it.print(128/2, 0+6, id(font_vera), TextAlign::TOP_CENTER, "big cast erisk");
137 it.print(128/2, 64-6, id(font_vera), TextAlign::BOTTOM_CENTER ,"Volume 45");