FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

13353 questions

15867 answers

25671 comments

50388 members

+1 vote
205 views 2 comments
by
Hello I would like to send some data i collect from modbus to to an MQTT Broker. My sensor gives me five values an I like to publish each value in an seperate topic.

How is this possilble?

2 Answers

+1 vote
by
Hello,

Yes, it is possible. For that, you will need to create five data to server instances and configure your Modbus master to have five slave interfaces that read each value individually.

Regards.
by
Okay, but all my instances would have the same address so how can i filter with variable goes into which topic.

Note: I'm using Modbus RTU
+2 votes
by
I want to support the topicstarter. I think an excellent solution to the problem of sorting different data from one slave would be the ability to specify a variable in the Topic field of the sender (by analogy with the JSON field). For example, "/modbusslave1/%r" so that data with different request name falls into different subtopics.
by
Sorry for the late question, but how do i manage to sperate the data? If I set up different datasenders, all the values are in all the topics. I cannot filter by SlaveID or IP, because all the Values come frome the same device... very annoying