Closed playground closed 1 year ago
@Adamlip1334 can you take a look at this?
.
@Adamlip1334, while I'm testing the new sensor hardware, I fixed a couple of minor bugs in the firmware that was preventing the Bluetooth from functioning if it's unable to join the wifi. I created a new version of the firmware and added websocket-client https://github.com/Liquid-Prep/LiquidPrep-Hardware/tree/websocket so we can communicate with the express server. And I also created a branch websocket-esp-now https://github.com/open-horizon-services/service-liquid-prep/tree/websocket-esp-now that you can start integrating your esp-now work. Thanks.
@playground I see in the websocket-esp-now branch it will (when implemented) pull from the websocket into express. Should I create another branch so that there is a firmware that has both esp-now and websocket support?
@Adamlip1334 you can work off of this branch https://github.com/open-horizon-services/service-liquid-prep/tree/websocket-esp-now, it's intended for you to implement esp-now functionality.
added websocket support here
esp-now firmware without websocket support here: https://github.com/Adamlip1334/LiquidPrep-Hardware/tree/esp-now
Looking into being able to change the esp32 mac address now
edit: added readmes with directions on how to retrieve the devices MAC address, as well as how to set a new MAC address onto the device.
Websocket support has been added to esp-now-gateway and express server.
Still experimental, this will give us options depending on the environment.
It takes about 20s to open the socket, connect and receive the sensor data. This is ideal for automation and collecting data passively. And adding esp-now communication protocol we can technically chain/bridge the sensors to collect data from all other sensors. Esp-now has a range of up to 480m. The last esp32(the closest to the gateway) should send data to the express server running on the gateway via WebSocket whenever a new update comes from any of the sensors out on the field. The data should be stored in the local db with the sensor ID.
There is a firmware branch here with WebSocket support