Closed ff20000 closed 4 years ago
i started to implement a modbus server. it will provide actual value via modbus tcp. maybe this is usable as well for you. I am going to use this with ioBroker
Hi phlupp, as there were several request from other channels, I started also a first implementation. The new rolling version contains a very simple mqtt client. Can we align it with your work, to avoid double implementation?
@jomjol That is a good idea. I have not started yet, I wait for an update from ioplatform for the espressif environment. They have not yet modbus tcp implemented. But the Mqtt protocol should be already implemented.
You can vote here
When implementing mqtt with a json messages that includes a value and a timestamp, this would open up for the opportunity to implement a deep sleep mode with timer interrupt. With a button on interrupt the device could be woken up for further configuration or updates. I really would like to see that feature. Keep up the good work.
Updated MQTT on rolling version, now allowing a user / password logon. How do you consider the deep sleep? I do not see the advantage at the moment. The calculation on the ESP32 takes about 2 minutes. So if you would wake it up, you would need to wait quite some time. The workaround is, to buffer the last read value. This will not work, if you send the ESP to deep sleep. In general technically a JSON respond should not be a problem, beside, that slowly the firmware is running out of free memory, as I can only us roughly half of it, due to OTA.
A retained message that has been sent to the mqtt broker eliminates the need to wait for the esp. To get the last read value back onto the esp, once it wakes up, you could read that value back (so no need to save that into flash for deep sleep). For a use case where a new value is only needed (or wanted) every now and then (i.e. once every 3 hours/ once a day) you could reduce the amount of energy used.
MQTT is implemented, for the moment no JSON is planned. Maybe a future version it is an option. I will close the issue, as the initial request is implemented and tested.
Is there a possibility to include a mqtt client so it can send the watermeter reading to the mqtt server. So it can talk to home assistant, domoticz enz..