I’m trying to pass Modbus TCP register value to single topic on MQTT.
Modbus reads value from 3rd party controller (for instance Temperature from hardwired input) and passes it to MQTT topic like: “something/TRB140/Temperature 1”
It has to be delivered single value to single topic.
Or if it is not possible, maybe someone could giude me how, using JSON extract values from Data to Server MQTT array?
It’s limitted, but at least values are there.
First option is nice straight forward, but the second could be kind of workaround.
I thank you Guys in advance!
Certainly, you have the capability to transmit Modbus data from the device that is connected to the Teltonika device, utilizing the Data to Server functionality.
Here’s how to achieve this:
Connect and set up the Teltonika device as the Modbus TCP/RTU Master. The third-party controller, linked to the Teltonika device, will function as the Modbus TCP/RTU Slave.
To retrieve a specific register value, let’s say you’re interested in obtaining the value from register address 9. This is accomplished by configuring the request configuration settings within the Teltonika device. Refer to the visual representation provided below for clarification:
After configuring the request settings, the next step involves activating the Data to Server feature. This action prompts the Teltonika device to send the value retrieved from the designated Modbus register to a predetermined MQTT Broker.
For example, the Teltonika device is connected to an MQTT broker at IP address: 192.168.1.126. The objective is to establish a data transmission frequency of every 30 seconds, where the Teltonika device sends data to this particular MQTT broker. To achieve this, the appropriate configuration would resemble the following:
MQTT Broker IP Address: 192.168.1.126
Transmission Interval: 30 seconds
Topic : response
For comprehensive information regarding the utilization of this feature, please refer to the following page:
Thanks and regards.
This topic was automatically closed after 15 days. New replies are no longer allowed.