OPC UA<->MQTT gateway through openHAB

Hi there!

I am currently working on a project of designing a gateway between OPC UA and MQTT, so that data collected on the shop floor via OPC UA can be converted and sent to MQTT to enable more possible functionalities. We want to use OpenHAB because it is easier to maintain and install redundancy model in case one OpenHAB server is down etc.

I am new to OpenHAB development and wonder if somebody can kindly give me some advice. I am thinking to develop a binding for OPC UA Client, but as a new comer, I wonder if there are better approaches.

Thanks in advance. :slight_smile:

Could anybody give me some advise on if developing a binding seems appropriate here?

hey @Mike_Ma, let me warm welcome you as yet another fan of industrial edge and open source playing together :slight_smile:

You might start from taking a look on modbus binding which is quite advanced in its form. There are also several simpler extensions which support both poll and push from device modes which could be useful. Since OPC UA is more like a software 2 software integration you might even favor more a “weather” channels which rely on specific API calls with no notion of a real “device” at all. We also have several PLC integrations, plclogo ported to 2.x APIs.

FYI, if you are interested in OPC stuff you might take a look on PLC4X project which attempts to marry a field buses with Java (and not only) APIs. As far I remember their OPC client is based on Eclipse Milo. There was a very generic plan a while ago to provide openhab-plc4x binding but everyone got busy with other topics.