ulno / ulnoiot-upy

retired version of ulnoiot based on micropython
MIT License
17 stars 15 forks source link

Analog sensor sends group of mqtt messages at a time #7

Closed pramodag closed 6 years ago

pramodag commented 7 years ago

The analog function used to read data from an analog device sends a bunch of MQTT messages at once and then there is a delay in sending next consequent messages. It behaves like working in buffer mode. Have tried to limit the number of messages using precision and also treating it as a digital sensor, But the behavior is same in all cases.

ulno commented 7 years ago

Which analog sensor where you using and what type was the pi, you ran ulnoiot on? It behaves nicely here with the water sensor, so I am not actually sure what happened on your end.

pramodag commented 7 years ago

I was using photoresistor connected to pi Zero. There were 4 Wemos connected to the Pi over Wifi.

ulno commented 6 years ago

Yes it's something like that, you can just increase the precision value of the analog sensor, then it sends less often messages - there should maybe be an offer to just compute the average of the last values and reduce the number. Keeping this here open until I get around to it.