Closed MaJEk-0 closed 9 months ago
You mean to publish MQTT topic value after every modbus poll?
yes, value are publish over MQTT only if are changed.
This is by design. Why would you like to publish the same value over and over again?
it is not necessary to send every sample, but for example every 10th or 100th. In my project, I measure values that change every pool, but some values change once a day or a week. Here it would be useful for me to send the current status periodically.
Possibly You should use retain on Your MQTT server, this will allow to see the stored last value. Or switch to modbus4mqtt :)
it is not necessary to send every sample, but for example every 10th or 100th. In my project, I measure values that change every pool, but some values change once a day or a week. Here it would be useful for me to send the current status periodically.
Values from modbus devices published by mqmgateway have retain flag set. After your client subscribe to MQTT topic, it should always get current value no matter when it was published.
Thanks for the information, it was more about improving MQTT for data with a small period of change..
This feature was requested from other users too and I've added it in current master. See #56 for details.
Values are sent over MQTT only when changed. Would it be possible to send data that has not changed?