FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
128 views 0 comments
by anonymous
Hi have a modbus slave sensor connected my RUT955 via RS485. This sensor gives me 6 values in the various registers that I want to send to my broker in AWS IoT.

I want to send the names that I gave in each register with the value of that register.

for example: {Name:Temp,Data:25}.

But the JSON that I read in the broker is not the name that I give to the register nor the RS485 Slave Name it is the name for the "DATA SENDERS" that I created in the "DATA TO SERVER" menu.

Is there a way to send the name of the register via MQTT?

1 Answer

0 votes
by anonymous

Hello,

In the newest RutOS firmware, there are a few arguments on how the slave could be identified:

  • Slave name - %n; - name of the Data to Server instance;
  • Request name - %r; - name of the Modbus request;
  • Modbus slave ID - %i; - ID of the Modbus slave;
So at least at the moment, the best way to attach a device name would be to either insert the name into one of the Modbus registers you're reading or if you're using one router per Modbus slave, the name can be hard-coded the Data to Server JSON string. One or multiple options above could also be used. 
  
Best regards,
DaumantasG