--- /dev/null
+#
+# https://www.amazon.co.uk/dp/B0CPYJ19NM?
+#
+# GPIO42: BTN2
+# GPIO41: BTN1
+# GPIO40: MOSI
+# GPIO39: CLK
+# GPIO38: CS
+# GPIO37: DC
+# GPIO36: RST
+# GPIO35: BUSY
+# GPIO34: RGB
+
+esphome:
+ name: paper
+
+esp32:
+ board: adafruit_feather_esp32s3
+ framework:
+ type: arduino
+
+# Enable logging
+logger:
+ level: DEBUG
+
+ota:
+ password: !secret ota_upgrade_pw
+
+external_components:
+ - source:
+ type: local
+ path: ../git/esphome_syslog/components
+ components: [syslog]
+
+wifi:
+ ssid: !secret wifi_ssid
+ password: !secret wifi_pw
+
+script:
+ # Publish a value to Domoticz as an nvalue
+ - id: tell_domo_nvalue
+ mode: queued
+ parameters:
+ udevice: int
+ nvalue: int
+ then:
+ lambda: |-
+ id(mqtt_client).publish_json("domoticz/in", [=](JsonObject root) {
+ root["command"] = "udevice";
+ root["idx"] = udevice;
+ root["nvalue"] = nvalue;
+ });
+
+ # Publish a value to Domoticz as an svalue
+ - id: tell_domo_svalue
+ mode: queued
+ parameters:
+ udevice: int
+ svalue: string
+ then:
+ lambda: |-
+ id(mqtt_client).publish_json("domoticz/in", [=](JsonObject root) {
+ root["command"] = "udevice";
+ root["idx"] = udevice;
+ root["svalue"] = svalue;
+ });
+
+ # Publishto Domoticz as nvalue and svalues
+ - id: tell_domo_nsvalues
+ mode: queued
+ parameters:
+ udevice: int
+ nvalue: int
+ svalue: string
+ then:
+ lambda: |-
+ id(mqtt_client).publish_json("domoticz/in", [=](JsonObject root) {
+ root["command"] = "udevice";
+ root["idx"] = udevice;
+ root["nvalue"] = nvalue;
+ root["svalue"] = svalue;
+ });
+
+# # Enable fallback hotspot (captive portal) in case wifi connection fails
+# ap:
+# ssid: "Pool Fallback Hotspot"
+# password: "JWWHJb38UzxY"
+#
+# manual_ip: !include poolup.yaml
+#
+#captive_portal:
+
+syslog:
+ ip_address: !secret syslog_ip
+
+time:
+ - platform: sntp
+ id: sntp_time
+ servers: !secret ntp_servers
+
+
+#network:
+# enable_ipv6: true
+
+mqtt:
+ broker: !secret mqtt_server
+ port: 1884
+ discovery_prefix: ${mqtt_prefix}/homeassistant
+ log_topic: ${mqtt_prefix}/logs
+ username: "pool"
+ password: !secret pool_mqtt_pw
+ id: mqtt_client
+ on_connect:
+ then:
+ - light.turn_on: rgb_led
+
+ on_disconnect:
+ then:
+ - light.turn_off: rgb_led
+
+
+
+light:
+ - platform: binary
+ name: "RGB LED"
+ id: rgb_led
+ output: led_output
+
+output:
+ - id: led_output
+ platform: gpio
+ pin: GPIO34
+
+font:
+ - file: '/usr/share/fonts/truetype/msttcorefonts/Comic_Sans_MS.ttf'
+ id: font1
+ size: 8
+
+spi:
+ clk_pin: GPIO39
+ mosi_pin: GPIO40
+
+display:
+ - platform: waveshare_epaper
+ cs_pin: GPIO38
+ dc_pin: GPIO37
+ busy_pin: GPIO35
+ reset_pin:
+ number: GPIO36
+ inverted: true
+ model: 7.50inV2
+# full_update_every: 30
+ lambda: |-
+ it.print(0, 0, id(font1), "Hello World!");