Errors while publishing attribute values


I’m new to OpenRemote, and I manage to link and get MQTT events from it. :grinning:

The issue is, when I try to publish an attribute value I’m always getting this error:

manager_1     | 2023-02-10 09:16:54.359  ERROR   [Thread-1 (ActiveMQ-serve..595)] ache.activemq.artemis.core.protocol.mqtt : AMQ834002: Error processing control packet: MqttPublishMessage[fixedHeader=MqttFixedHeader[messageType=PUBLISH, isDup=false, qosLevel=AT_MOST_ONCE, isRetain=false, remainingLength=161], variableHeader=MqttPublishVariableHeader[topicName=master/test_mqtt/attribute/position/7A92oxiVkatOShs7pu7QUL, packetId=-1], payload=PooledSlicedByteBuf(ridx: 0, widx: 101, cap: 101/101, unwrapped: PooledUnsafeDirectByteBuf(ridx: 164, widx: 164, cap: 1024))]
manager_1     | ActiveMQSecurityException[errorType=SECURITY_EXCEPTION message=AMQ229032: User: master:dil1 does not have permission='SEND' on address master.test_mqtt.attribute.position.7A92oxiVkatOShs7pu7QUL]
manager_1     | 	at
manager_1     | 	at org.apache.activemq.artemis.core.server.impl.ServerSessionImpl.securityCheck(
manager_1     | 	at org.apache.activemq.artemis.core.server.impl.ServerSessionImpl.doSend(
manager_1     | 	at org.apache.activemq.artemis.core.server.impl.ServerSessionImpl.send(
manager_1     | 	at org.apache.activemq.artemis.core.server.impl.ServerSessionImpl.send(
manager_1     | 	at org.apache.activemq.artemis.core.protocol.mqtt.MQTTPublishManager.sendToQueue(
manager_1     | 	at org.apache.activemq.artemis.core.protocol.mqtt.MQTTProtocolHandler.handlePublish(
manager_1     | 	at org.apache.activemq.artemis.core.protocol.mqtt.MQTTProtocolHandler.act(
manager_1     | 	at org.apache.activemq.artemis.utils.actors.Actor.doTask(
manager_1     | 	at org.apache.activemq.artemis.utils.actors.ProcessorBase.executePendingTasks(
manager_1     | 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(
manager_1     | 	at java.base/java.util.concurrent.ThreadPoolExecutor$
manager_1     | 	at org.apache.activemq.artemis.utils.ActiveMQThreadFactory$

This is my Agent and Asset configuration:

This is what I try to submit to the Asset:

Tpoic: master/test_mqtt/attribute/position/7A92oxiVkatOShs7pu7QUL


  "type": "boolean",
  "value": false,
  "name": "position",
  "meta": {
    "readOnly": true

Any idea why I’m getting this error?

No need to take mqttagentlink for publishing data .
first create an asset , add attribute then
Download MqttBox and
connect mqtt box , refer screenshot “connection”
for publish — Realm/mqttclientname/writeattributevalue/Attribute name/DeviceId
for subscribe – Realm/mqclientname/writeattributevalue/Attribute name/DeviceId

1 Like

Thanks! follow the steps and now it works!!!


For subscribe it should be:

See this wiki page for more variations: User Guide: Manager APIs · openremote/openremote Wiki · GitHub

Also, you don’t need an MQTT Agent at all.
If you are using an MQTT client on your device, then you can use the MQTT Broker of OpenRemote by using the API.
If you were to use an external MQTT Broker service, you could connect to that broker using an MQTT Agent. However, I don’t think that is your situation.