Mercurial > code > home > repos > homeauto
diff espNode/cam/theater-blaster.yaml @ 1720:842b5487556c
new cam setups
author | drewp@bigasterisk.com |
---|---|
date | Wed, 01 Mar 2023 20:37:24 -0800 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/espNode/cam/theater-blaster.yaml Wed Mar 01 20:37:24 2023 -0800 @@ -0,0 +1,139 @@ +esphome: + name: "theater-blaster" + platform: esp32 + board: lolin32 + +# MAC: 3c:71:bf:ab:6e:94 + +logger: + baud_rate: 0 + level: DEBUG + logs: + out: DEBUG + +wifi: + ssid: !secret wifi_ssid + password: !secret wifi_password + +ota: + +sensor: +- platform: wifi_signal + name: "wifi_signal" + update_interval: 60s + +mqtt: + broker: '10.2.0.1' + port: 1883 + username: '' + password: '' + on_json_message: + - topic: theater_blaster/ir_out/volume_up + then: + - remote_transmitter.transmit_nec: + address: 0x4BB6 + command: 0x40BF + repeat: + times: !lambda |- + if (x.containsKey("times")) { + return x["times"]; + } + return 1; + - topic: theater_blaster/ir_out/volume_down + then: + - remote_transmitter.transmit_nec: + address: 0x4BB6 + command: 0xC03F + repeat: + times: !lambda |- + if (x.containsKey("times")) { + return x["times"]; + } + return 1; + on_message: + - topic: theater_blaster/ir_out + payload: "input_bd" + then: + - remote_transmitter.transmit_nec: + address: 0x4B36 + command: 0x31CE + - topic: theater_blaster/ir_out + payload: "input_cbl" + then: + - remote_transmitter.transmit_nec: + address: 0x4BB6 + command: 0x708F + - topic: theater_blaster/ir_out + payload: "input_game" + then: + - remote_transmitter.transmit_nec: + address: 0x4BB6 + command: 0xB04F + - topic: theater_blaster/ir_out + payload: "input_pc" + then: + - remote_transmitter.transmit_nec: + address: 0x4BB6 + command: 0x39C6 + + +remote_receiver: + - id: ir_in + # CHO1838 receiver; sig|gnd|vcc 3v3 + pin: + number: GPIO27 + mode: INPUT + inverted: True + dump: nec + - id: rf_in + pin: GPIO13 + tolerance: 20% + filter: 250us + idle: 8ms + dump: rc_switch + on_rc_switch: + then: + - logger.log: + level: INFO + tag: out + format: "RF read; proto %d; code %08llx" + args: [x.protocol, x.code] + - mqtt.publish_json: + topic: theater_blaster/rf_received + payload: !lambda |- + root["protocol"] = x.protocol; + root["code0"] = static_cast<unsigned long>(x.code >> 32); + root["code1"] = static_cast<unsigned long>(x.code & 0xffff); +remote_transmitter: + id: ir_out + pin: GPIO14 + carrier_duty_percent: 50% + + +#13 rf recv +#12 rf send +#https://www.passion-radio.com/img/cms/wifi-kit-32-pinout.png + + +#on_...: +# - remote_transmitter.transmit_nec: +# address: 0x1234 +# command: 0x78AB + +i2c: + sda: 4 + scl: 15 + +font: + - file: "/usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf" + id: font_vera + size: 20 + +display: + - platform: ssd1306_i2c + model: "SSD1306 128x64" + reset_pin: 16 + address: 0x3C + lambda: |- + it.print(128/2, 0+6, id(font_vera), TextAlign::TOP_CENTER, "big cast erisk"); + it.print(128/2, 64-6, id(font_vera), TextAlign::BOTTOM_CENTER ,"Volume 45");