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
180 views 3 comments
by anonymous

Hi,

I saw example for ThingsBoard to pusblish (send) data to server. But, I couldn't find an example which subscribes to remote MQTT server and receiving data from it.

In MODBUS Master mode, how to write MODBUS registers over receiving message from MQTT broker? Help me with this.

Thanks,
Asanga

1 Answer

0 votes
by anonymous

Hello,

    

Thank you for reaching out!

Modbus Serial or TCP Gateway can be configured in the MQTT Gateway section in the Modbus menu.

Then MQTT messages can be sent to the device, using the syntax explained in this article. Additional information can be found here.

Let me know if any more information is needed!

  

Best regards,
DaumantasG

by anonymous
Hi,

Thanks you for the reply. I managed to send data to TB (Thingsboard). It is good.

TBs MQTT broker has subscribe topic "v1/devices/me/attributes". If value updated in TB, it immediately sends a JSON message to this subscribe topic like this {"RegistrName":0.485}. This "RegistrName" is the name assigned TB. According to the articles mentioned doesn't describe something like that. They just send binary ModBus data packet processed in the server into the device over MQTT. TB doesn't support something like that.

Is there any way to configure the device, write a value into ModBus register after receiving JSON msg with ModBus Register name and its value?

Thanks.
by anonymous

While I'm not very familiar with ThingsBoard, perhaps the Data converter feature could be used here to format the string correctly before sending?

Best regards,
DaumantasG

by anonymous
Thank you. I will look at the documents.

Regards,
Asanga