I am new to Teltonika and currently working on connecting my Teltonika RUT200 with a PLC to read data and publish it to an MQTT broker.
So far, I have tested Modbus TCP in both client and server modes using a simulator on my laptop, and it worked fine. Now, I want to take it a step further by:
Connecting the RUT200 to a real PLC via Modbus TCP
Publishing the PLC data to an MQTT broker
Can anyone guide me on how to set up this connection? Also, if there are any user manuals or documentation available for this process, please share the links.
Any help or suggestions would be greatly appreciated!
I have followed the documentation, but since I am using ThingsBoard as an MQTT broker (community version), it does not allow subscribing to any topic.
Objective:
I want to connect a PLC/Modbus simulator to a Teltonika device via LAN and send this data to ThingsBoard via MQTT.
Approach 1: Connecting Teltonika via Modbus and Sending Data to ThingsBoard
Steps I have completed:
Installed Modbus master (diagslave) on my PC (Linux).
Created a TCP client on Teltonika with my PC’s IP address. The Teltonika TCP client successfully reads data from holding registers on the PC at 20-second intervals.
Installed the Modbus TCP Master MQTT Gateway on Teltonika and created a device on ThingsBoard with authentication credentials.
Configured the MQTT gateway with the ThingsBoard credentials. Since the default MQTT topic is v1/devices/me/telemetry, I set both the request and response topics accordingly.
Issue:
Despite this setup, I am not receiving data on ThingsBoard. Could you help me troubleshoot this?
Approach 2: Connecting Modbus to a PC Master and Sending Data to a Local MQTT Broker
Steps I have completed:
Installed Modbus master (diagslave) on my PC (Linux).
Created a TCP client on Teltonika with my PC’s IP address, successfully reading holding register values from the PC every 20 seconds.
Configured the local MQTT broker (Mosquitto) on my PC. No authentication is required (allow_anonymous true is set in the broker config file).
Attempted to publish and subscribe to the topic "request", but the register values are not being returned.
I have followed all the steps from the article, but I am still unable to receive data on ThingsBoard. The only difference I noticed is that the article uses the Professional Edition, whereas I am using the Community Edition of ThingsBoard.
I have tried sending data to the server using both MQTT and HTTP, but neither approach was successful.
Does Teltonika generate any log files that I can check to identify what might be causing the issue?