mitra42 / frugal-iot

A platform to enable affordable sensor networks
https://drive.google.com/drive/folders/1VRrBSEATjN9i-Fx3X48nKeh_lJCg1sto?usp=sharing
1 stars 2 forks source link

Comms: MQTT #21

Open mitra42 opened 3 days ago

mitra42 commented 3 days ago

Part of #20

The node needs to connect to a MQTT reflector and send/receive messages from it.

There are a LOT of MQTT libraries, and its not clear which is the best - comments are welcome.

My plan is to build on one of them for the POC, and then allow for coming back and re-engineering, ideally just this module, if there is a better one to use.

Its dependent on WiFi connectivity.

mitra42 commented 3 days ago

I'm leaning towards lwmqtt because it claims to be simple and light/

There is also a wrapper arduino-mqtt which uses callbacks. And it looks like this is what is needed as the other is a non-arduino (e.g. uses pthreads)

mitra42 commented 3 days ago

Base level works as a demo - sends and receives a hello world message. Probably needs some kind of reflector on my naturalinnovation.org server, and then to add authentication.

mitra42 commented 3 days ago

Need to also think through structure for MQTT variables and payloads. I think this will need copying the payload out of the buffer which might mean dealing with the type.

mitra42 commented 3 days ago

Design straw person .....

Next steps would be to do this with the SHT31 sensor, and then an actuator (which could be on a separate device) to turn on LEDS when humidity exceeds base level