Mercurial > code > home > repos > micro
changeset 3:711019bc4357
more boards
author | drewp@bigasterisk.com |
---|---|
date | Thu, 27 Jun 2024 14:15:02 -0700 |
parents | 717d5b5e0d7d |
children | 109ec900c400 |
files | .hgignore do-rf-recv.yaml li-rf-recv.yaml |
diffstat | 3 files changed, 58 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgignore Thu Jun 27 14:00:44 2024 -0700 +++ b/.hgignore Thu Jun 27 14:15:02 2024 -0700 @@ -1,3 +1,3 @@ .pdm-python -/.esphome/ -/secrets.yaml +.esphome +secrets.yaml
--- a/do-rf-recv.yaml Thu Jun 27 14:00:44 2024 -0700 +++ b/do-rf-recv.yaml Thu Jun 27 14:15:02 2024 -0700 @@ -17,12 +17,11 @@ ota: platform: esphome - password: !secret ota_password + password: !secret ota_password_0 mqtt: id: mqtt_client broker: "mqtt2.bigasterisk.com" - port: 1883 light: - platform: status_led
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/li-rf-recv.yaml Thu Jun 27 14:15:02 2024 -0700 @@ -0,0 +1,55 @@ +# 433mhz receiver board. Facing the board: +# pins: 3v3 | N.C. (cs) | D15 | gnd + +esphome: + # note for historical reasons, this doesn't match the mqtt topic + name: "li-rf-recv" + platform: esp32 + board: esp32dev + +logger: + level: INFO + +wifi: + networks: + - ssid: !secret wifi_ssid + password: !secret wifi_password + +ota: + platform: esphome + password: !secret ota_password_1 + +mqtt: + id: mqtt_client + broker: "mqtt2.bigasterisk.com" + +light: + - platform: status_led + id: "status_out" + pin: 2 + +remote_receiver: + - id: rf_in + pin: + number: GPIO15 + 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] + - light.turn_on: + id: status_out + flash_length: 30ms + - mqtt.publish: + topic: !lambda |- + return "rf-switch-li/rf_received/" + + std::to_string(x.protocol) + + "/" + std::to_string(static_cast<unsigned long>(x.code >> 32)) + + "/" + std::to_string(static_cast<unsigned long>(x.code & 0xffff)); + payload: ""