I am testing HiveMQ edge. I can receive data from an OPC UA server which are then distributed as a MQTT message.
But the other direction ( distribute data from a MQTT message as OPC AU to a server ) does not work.
How I have to configure that?
<tags>
<tag>
<name>ns=0;i=50901</name>
<description></description>
<definition>
<node>ns=0;i=50901</node>
</definition>
</tag>
</tags>
<southboundMappings>
<southboundMapping>
<topicFilter>2/lockstate</topicFilter>
<tagName>ns=0;i=50901</tagName>
<fromNorthSchema>{}</fromNorthSchema>
</southboundMapping>
</southboundMappings>
Best regards,
Marko
Hi @marko.lipprandt,
Thank you for joining the HiveMQ Community. Your participation is valued.
We understand that you are experiencing an issue with the OPC UA to MQTT Southbound connection. To assist in diagnosing this matter, could you please check the HiveMQ Edge Log for any relevant error messages. The log file is typically located at the following path: $HIVEMQ_HOME/log/hivemq.log
.
For more detailed logging, the default log level can be switched from INFO to DEBUG or TRACE. To do this, please set the HIVEMQ_LOG_LEVEL
environment variable before starting HiveMQ with the following command:
export HIVEMQ_LOG_LEVEL=TRACE; $HIVEMQ_HOME/bin/run.sh
Sincerely,
Dasha from the HiveMQ Team
Hi Dasha,
thank you for your answer.
The log does not provide an error.
2025-06-17 14:16:03,294 TRACE - Data Governance Publishing 1 Bytes To 2/lockstate at QoS 0
2025-06-17 14:16:48,718 TRACE - Data Governance Publishing 72 Bytes To 2/lockstate/command at QoS 0
2025-06-17 14:16:48,721 TRACE - Client Device1: Sending PUBLISH QoS 0 Message with packet id 0
2025-06-17 14:16:48,854 TRACE - Data Governance Publishing 1 Bytes To 2/lockstate at QoS 0
I think, there is missing a configuration step, to convert the MQTT message into a message to the OPC UA server.
Best regards,
Marko
Hi @marko.lipprandt
- Proper Schema Definition: The
fromNorthSchema
field must contain a valid JSON schema that describes the structure of the MQTT payload data . The southbound mapping consists of a topic filter that includes a data schema of the MQTT payload and a tag to be written. An example configuration is shown below:
<southboundMappings>
<southboundMapping>
<tagName>ns=0;i=50901</tagName>
<topicFilter>2/lockstate</topicFilter>
<fromNorthSchema><![CDATA[
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Sensor Reading",
"description": "A schema for a simple sensor reading for temperature.",
"type": "object",
"properties": {
"temperature": {
"description": "The temperature in degrees Celsius.",
"type": "number"
}
},
"required": [
"temperature"
],
"additionalProperties": false
}
]]></fromNorthSchema>
</southboundMapping>
</southboundMappings>
Example payload matching this schema:
{
"temperature": 22.7
}
Get more examples with HiveMQ Edge UI from the blog post: HiveMQ Edge 2024.8 is Released
I hope this helps
Best,
Dasha from the HiveMQ Team