open-horizon-services / service-liquid-prep

3 stars 4 forks source link

Add ESP-NOW mesh support #21

Closed playground closed 1 year ago

playground commented 1 year ago

This is a continuation of #14, create a version of the firmware under esp-now-mesh folder to enable each ESP32 to broadcast its measurement upstream and relate the measurement all the way up to the esp-now gateway. As the message propagates upstream, we need to come up with an algorithm to only send upstream as needed. We would also want to apply similar logic to send requests downstream to the targetted ESP32 worker from the esp-now gateway.

Adamlip1334 commented 1 year ago

added mesh support in this repo. When messages are seen for the first time by the esp32, it creates a hash of the message and adds it to an already seen array. The array holds the last 50 seen messages. When the esp32 receives a message it will check the array, if it does not find the message in the array it will send the message along, otherwise if it has already seen the message it will disregard it.

playground commented 1 year ago

esp-now-mesh work completed.