diff --git a/ecran_externe/ecran.yaml b/ecran_externe/ecran.yaml deleted file mode 100644 index e69de29..0000000 diff --git a/ecran_externe/epaper_thread_node.yaml b/ecran_externe/epaper_thread_node.yaml new file mode 100644 index 0000000..bbce29c --- /dev/null +++ b/ecran_externe/epaper_thread_node.yaml @@ -0,0 +1,55 @@ +esphome: + name: epaper-display-node + +esp32: + board: esp32-h2-devkitm-1 + variant: esp32h2 + framework: + type: esp-idf + +# OpenThread configuration joining the Pi's Thread network +openthread: + network: + enable_ipv6: true + network_name: "OpenThread-Pi" # Must match OTBR + pan_id: 0x1234 # Must match OTBR + channel: 15 # Must match OTBR + network_key: "00112233445566778899aabbccddeeff" # Must match OTBR + +# MQTT Client connecting over Thread (IPv6) +mqtt: + broker: "fdde:ad00:beef:0::1" # RPi OTBR wpan0 IPv6 address + port: 1883 + topic_prefix: microwave/display + +spi: + clk_pin: GPIO10 + mosi_pin: GPIO11 + +display: + - platform: waveshare_epaper + cs_pin: GPIO8 + dc_pin: GPIO12 + reset_pin: GPIO13 + busy_pin: GPIO14 + model: 2.13in-d + update_interval: never # Updated explicitly via text sensor + id: my_epaper + pages: + - id: status_page + lambda: |- + it.printf(0, 0, id(font_small), "Status: %s", id(display_text).state.c_str()); + +font: + - file: "gfonts://Roboto" + id: font_small + size: 16 + +text_sensor: + - platform: mqtt + name: "Display Text Input" + id: display_text + state_topic: "microwave/display/text" + on_value: + then: + - component.update: my_epaper \ No newline at end of file