Could you provide a screenshot of your MQTT Modbus Gateway configuration? Additionally, let us know if you receive any specific errors when attempting to publish a topic to the subscriber.
For further guidance, we have a similar configuration example for a Modbus TCP Client and MQTT Gateway available here: Modbus TCP Master MQTT Gateway. You might find it helpful for setting up your system.
Additionally, more useful information can be found by visiting the official mosquitto manual page here.
To explain what we want.
We read two values from Modbus registers from a device, one integer and one real. We use Modbus TCP client and when we test we read the values OK.
Now we want to send these two values to a MQTT broker. Later we want to use Thingsboard, but for the test we use mosquitto.
I configured the MQTT Modbus Gateway, like the picture.
Hello Martynas,
Thank you for your message.
To explain what we want.
We read two values from Modbus registers from a device, one integer and one real. We use Modbus TCP client and when we test we read the values OK.
Now we want to send these two values to a MQTT broker. Later we want to use Thingsboard, but for the test we use mosquitto.
I configured the MQTT Modbus Gateway, like below picture.