Now thats what I call ESP...

 These ESP devices feature a wireless tech called ESPNow.

It basically lets you send a UDP type packet from a ESP to another ESP (by MAC address) up to (i think) 256 bytes, but its low power, since it doesn't need to establish a connection to a Wifi base station.

So.... my goal is to create 2 ESPHome components, called something like ProxySensorReveicer and ProxySensorSender.

On the battery powered device, you you run ProxySensorSender, and have a config like


sensor:

    - id mySensor

      platform: adc

(etc)


ProxySensorSender:

    -  receiver: 11:22:33:44:55:66

    - sensors:

        sensor:

            proxy_id: battery_voltage

            sensor: mySensor


then on a grid powered receiver you would have


ProxySensorReceiver:

    senders:

        - mac: 22:33:44:55:66

          sleep_period: 10m

          sensors;

            -sensor:

                proxy_id: battery_voltage

                name: "Battery Voltage"

                units: "V"

                 


The receiver will then create all the sensor objects (as the python generated main.cpp adds them) as if they were local ones, but then would listen for communications from the sender, and proxy the states back to Homeassistant.

We can also experiment with things like a OTA mode switch being generated, which when the sender checks in, it tells it to reboot into safe mode, to allow a OTA to happen.

Time to break out VSCode

Comments

Popular posts from this blog

SSD Upgrade on Lenovo Legion Go - Part 1 - Backup the original drive using Veeam

SSD Upgrade on Lenovo Legion Go - Part 2 - Restore backup