11381 questions

13558 answers

21243 comments

31841 members

0 votes
125 views 3 comments
by
The primary motivation for us to consider pairing Modbus Master functionality with MQTT client functionality right in the cellular gateway is to avoid holes in the data when the cellular network is inevitably interrupted. Ideally the gateway would continue polling via Modbus, turning this into queued MQTT messages, and when the cellular network connection is restored, flush this buffer of queued messages.

Is this how this functionality has been implemented by Teltonika? Obviously there will be a limit to how many messages can be queued, but I'd like to know more about this behavior and could not find it in the documentation.

I did see mention of MQTT Persistence, but this raises another question on if frequent Modbus polling will potentially wear out the non-volatile storage of the gateway if every message generated gets written to disk.

Thanks in advance.

1 Answer

+1 vote
by
Hello,

For this question of yours, you are correct in most of the points you mentioned. You cannot control what will be the performance of the network and when there will be an outage. Now, going to your point about buffering and queuing of the Modbus data on Modbus master functionality. By default, Modbus Master functionality stores all the Modbus data on a database file which is stored in the RAM memory. It can hold up to 20,000 records and it will just overwrite the data once it is full. This point will give clarity for your doubt about the number of reads and writes the flash memory will store because first of all its not stored there :)

I hope this helps.

Regards,
Jerome
by
Thanks Jerome, that's great to hear. Do you know if when the cellular connectivity is restored, this buffer will be flushed, i.e. the stored values will be turned into MQTT messages and submitted to the remote server/cloud?
by
Hello,

By default, the data will be buffered when it is not sent but as mentioned when the 20 000 records are there the old data will be overwritten, meaning it will be lost. But it would be best to enable the retry on fail option on the Modbus Data to Server.

I hope this helps.  

Regards,
Jerome
by
Thanks Jerome for the clarification, much appreciated.