Add a MQTT topic (attribute) to the Open Remote MQTT External Agent

I’ve configured the Open Remote to work with my Thingstream external MQTT agent, but I have some problems to link and display an attribute to the UI. I’ve followed the instructions :

There is an MQTT Agent (Client) in OpenRemote that you can use to connect to an external MQTT Broker. First use the MQTT Agent to establish the connection, then create an asset with attributes that have the configuration item ‘Agent Link’. In this agent link select your MQTT Agent and add the parameter Publish Topic or Subscription Topic. We have no extensive documentation yet, and recommend to [check our forum]

I want just to read a Temperature (MQTT topic T1, configuration to the remote MQTT broker works correctly and OpenRemote MQTT agent sends PING messages regularly to the broker, finally Openremote MQTT agent status is CONNECTED)

However I’m not able to receive any message even if I manualy ask to update the attribute T1. OpenRemote MQTT Agent never ask update attribute field T1, even if the sensor publish the new T1 value topic. Any Idea?

You have to add an attribute as “String” or “Text” or “int” or “number” not as an agent link.
when you added the attribute as “number” for example, then you can add a configuration item as agent link.

1 Like

Now it works thanks!
I suggest improving the documentation :wink:

1 Like

Good work @Denis for the assistance; we’ll look to improve the documentation if this isn’t clear.

1 Like

I’ve made a small addition for now:

…First use the MQTT Agent to establish the connection to the broker. Then create an asset with attributes of the Value Type that matches the incoming/outgoing data, and give those attributes the configuration item ‘Agent Link’…

Hi Don,
I’m using the link to retrieve data from liveobject mqtt broker and it works. But if I stop the docker deployment and start it again I don’t receive any data. The MQTT agent remains connected. Any idea?

If you check ‘agent disabled’, wait a few seconds, and uncheck; do you start receiving data again?

Even with this, I don’t get the data.
To receive the data I have to delete the MQTT agent, recreate a new one and modify the agent id for each attribute.

Hey Guir,

lucky i was facing the same problem today and tried a couple of things. In the MQTT Agent put a tick to “Resume Session”. You should be able to instantly see incoming messages after setting the tick without restarting docker. Also after restart there shouldn’t be any problems receiving the values.


Hi Ouschen,

Thanks for your answer. It’s working.