INTEGRATION
Indata-sensorer
Modbus RTU and TCP
9min
teltonika trb modbus in this guide, we're going to show you how to use your teltonika trb xxx device to read data via modbus tcp and send it to sensor online by doing so, you will be able to visualize your data and share it with your colleagues to do this, we'll need to go through three steps read data from modbus send data tosensor online via mqtt publish data in sensor online reading data from modbus https //docs clarify io/developers/hardware/teltonika trb modbus#reading data from modbus to get started we are going to start by opening a browser and typing in the address of our teltonika device you should now be looking at the interface shown below we will use the teltonika device as a modbus tcp server to read data from modbus from the menu on the left, navigate to services>modbus and then choose the modbus tcp master press add to set up a new slave device to read from if you have multiple devices you wish to read from, you can repeat this step for each of them ensure you enable the device by toggling the enable switch on the top of the slave device configuration window now we need to specify which registers we wish to read from the slave device note that these also have an enable toggle switch which you can use to enable/disable each of the requests to verify that the setup works you can use the request configuration testing option note that the returned value is 230 while the actual temperature here is 23 0ºc this is a common occurence in modbus because some devices only support integer values once the data has been added to sensor online, you can fix this using calculation! sending data to sensor online https //docs clarify io/developers/hardware/teltonika trb modbus#sending data to clarify with the modbus setup working we are going to connect the device to sensor online in order to store and visualize the data before we proceed with this step, we are going to need an integration in sensor online to send the data to if you haven't already created one, follow the steps shown in integrations to create an integration and a set of basic auth credentials now that we have an integration and credentials for it, we can use the data to server function of the teltonika device navigate to services>data to server and select add to begin configuring a new connection give the connection a name, make sure to toggle enable on top and choose the following settings data source protocol json format { "times" \[ %t ], "series" { "%i %z" \[%a] } } segment count send as object url/host/connection string port keepalive topic client id period qos data filtering retry on fail use tls use credentials username password publishing data https //docs clarify io/developers/hardware/teltonika trb modbus#publishing data if you aren't familiar with the concepts in sensor online you can learn more about them in our concepts guide this isn't strictly required, but it's helpful to be at least familiar with the concepts of and connection between integrations, signals, and items open the admin panel in sensor online again follow the steps shown in the video to publish your data, and visualize it using timelines if you found any errors, or ambiguities or have any suggestions on how to make this guide better, please contact us via chat or send an email to us at info\@nodeledge se 🙌