# HG changeset patch # User drewp@bigasterisk.com # Date 1719526061 25200 # Node ID 7914d368d7b2f9013699bf808a25f828ffb583af # Parent 109ec900c400a3ddce637f75f88498df085dc2ca more boards diff -r 109ec900c400 -r 7914d368d7b2 br-headboard.yaml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/br-headboard.yaml Thu Jun 27 15:07:41 2024 -0700 @@ -0,0 +1,83 @@ +# https://cdn.hackaday.io/files/269911154782944/Heltec_WIFI-LoRa-32_DiagramPinout.jpg + +esphome: + name: bed + platform: esp32 + board: lolin32 + +logger: + level: DEBUG + +wifi: + networks: + - ssid: !secret wifi_ssid + password: !secret wifi_password + +ota: + platform: esphome + +mqtt: + id: mqtt_client + broker: "mqtt2.bigasterisk.com" + +#dallas: +# - pin: GPIO16 +#sensor: +# - platform: dallas +# index: 0 +# name: temperature + +# switch: + # - { platform: gpio, pin: { mode: INPUT_PULLUP, number: 2, inverted: yes }, name: red_button } + # - { platform: gpio, pin: { mode: INPUT_PULLUP, number: 15, inverted: yes }, name: green_button } + # - { platform: gpio, pin: GPIO16, name: pir } + +output: + - { platform: ledc, pin: GPIO19, id: headboard_w } + - { platform: ledc, pin: GPIO23, id: headboard_r } + - { platform: ledc, pin: GPIO18, id: headboard_g } + - { platform: ledc, pin: GPIO17, id: headboard_b } + +light: + - platform: rgbw + name: headboard + red: headboard_r + green: headboard_g + blue: headboard_b + white: headboard_w + +i2c: + sda: 4 + scl: 15 + +font: + - file: "/usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf" + id: font_vera + size: 12 + glyphs: "+-_.:0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz" + +text_sensor: + - platform: wifi_info + ip_address: + name: wifi_ip + id: wifi_ip + ssid: + name: wifi_ssid + bssid: + name: wifi_bssid + +sensor: + - platform: wifi_signal + id: my_wifi_signal + name: wifi_signal + update_interval: 4s + internal: true # no mqtt + +display: + - platform: ssd1306_i2c + model: "SSD1306 128x64" + reset_pin: 16 + address: 0x3C + lambda: |- + it.print(0, 0, id(font_vera), "br-headboard: running"); + it.printf(0, 20, id(font_vera), "wifi %s %.2f", id(wifi_ip).state.c_str(), id(my_wifi_signal).state); diff -r 109ec900c400 -r 7914d368d7b2 do-rf-recv.yaml --- a/do-rf-recv.yaml Thu Jun 27 15:07:32 2024 -0700 +++ b/do-rf-recv.yaml Thu Jun 27 15:07:41 2024 -0700 @@ -32,17 +32,17 @@ - id: rf_in pin: number: GPIO15 - tolerance: 20% + tolerance: 30% 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] + # - 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 diff -r 109ec900c400 -r 7914d368d7b2 li-rf-recv.yaml --- a/li-rf-recv.yaml Thu Jun 27 15:07:32 2024 -0700 +++ b/li-rf-recv.yaml Thu Jun 27 15:07:41 2024 -0700 @@ -2,10 +2,9 @@ # 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 + board: lolin32 logger: level: INFO @@ -32,23 +31,23 @@ - id: rf_in pin: number: GPIO15 - tolerance: 20% + tolerance: 30% 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] + # - 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/" + + return "li-rf-recv/rf_received/" + std::to_string(x.protocol) + "/" + std::to_string(static_cast(x.code >> 32)) + "/" + std::to_string(static_cast(x.code & 0xffff)); diff -r 109ec900c400 -r 7914d368d7b2 ws-lights.yaml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ws-lights.yaml Thu Jun 27 15:07:41 2024 -0700 @@ -0,0 +1,56 @@ +# mosquitto_sub -v -t workshop/status + +esphome: + # todo: needs rename + name: workshop + platform: esp32 + board: lolin32 + +logger: + level: DEBUG + +wifi: + networks: + - ssid: !secret wifi_ssid + password: !secret wifi_password + +ota: + platform: esphome + +mqtt: + id: mqtt_client + broker: "mqtt2.bigasterisk.com" + +light: + - platform: status_led + id: "status_out" + pin: 2 + - { platform: monochromatic, name: high0, output: out1 } + - { platform: monochromatic, name: high1, output: out4 } + - { platform: monochromatic, name: high2, output: out2 } + - { platform: monochromatic, name: high3, output: out6 } + - { platform: monochromatic, name: kid, output: out3 } + - { platform: monochromatic, name: out5, output: out5 } + - { platform: monochromatic, name: out7, output: out7 } + - { platform: monochromatic, name: sewing, output: out0 } + +i2c: + sda: 21 + scl: 22 + scan: True + id: bus_a + +pca9685: + - frequency: 500 + address: 0x40 + +output: + - { platform: pca9685, id: "out0", channel: 0 } + - { platform: pca9685, id: "out1", channel: 1 } + - { platform: pca9685, id: "out2", channel: 2 } + - { platform: pca9685, id: "out3", channel: 3 } + - { platform: pca9685, id: "out4", channel: 4 } + - { platform: pca9685, id: "out5", channel: 5 } + - { platform: pca9685, id: "out6", channel: 6 } + - { platform: pca9685, id: "out7", channel: 7 } +