Openhab2 Beckhoff Kommunikation (Enocean,...)

Hey everbody,
I have openhab2 in connection with a philips hue system and alexa already successfully in the employment. The remaining part of my house I have connected via a Beckhoff CX9020 and various BUS systems.

I have after ample research now the question which is the best way to connect OpenHab2 with the Beckhoff world.

1.) Is there an interface between (officially not, possibly trick) OPC UA and OpenHab2?

2.) I have the idea to use Enocean-USB for OpenHab2 world with Enocean interface on the PLC-Beckhoff.

I would be grateful for further ideas.

Best regards

I don’t know of an interface between OPC UA and OH2, though I agree that would be pretty easy.

However, I can say as a Beckhoff employee that if you don’t mind waiting just a little while (like a month or two) we will be releasing our IOT communicator package which will include MQTT as a protocol. Then you could use Mosquitto as the server and use the MQTT binding on OH2 to pub/sub and do the same on the Beckhoff side.

The IOT package will be available for TC3 if that’s what you’re using and will be compatible with the CX9020 you’re using.

Just a thought on another way you could accomplish that. Since I started working with OH I’ve been looking for a way to interface these two as well.

Hope that offers some thoughts.



Hallo Matt,

Now i think i found a solution to bind OH2 to Beckhoff TC2 via TcAdsWebservice. Maybe you Can help a little to get values into javascript. I installed the three Files Like it is explained on the beckhoff Website:

I also get the tcadswebservice Site Like it should Show.

not localhost, i tested on my CX (192.168.1…) and the site is shown correctly

When i try to test the example for Javascript

, i Can’t get any values.

Maybe you have a idea how to solve it?

I copied the 3 Files in the www/tcadswebservice Folder

Thanks for Your Support


now the TcAdsWebservice works. Next thing I want to do is a connection between javascript and OH2:

therefore i create a new topic:

"Hello OH Community,
for a connection between the Beckhoff and OH2 world, I have made a Javascript communication using the TcAdsWebservice. The variables are cyclically exchanged bi-directionally between javascript and sps. Now I’m looking for a way between javascipt and oh2. Someone has an idea for this?

many thanks for your help.


I’m not sure how to get the JavaScript running with OH2 but it seems you got the Beckhoff side of things working. If you run into any more issues there let me know and I’ll see what I can do to help.

Hi Michael,
your idea looks interesting.
Do you have any updates regarding this topic?
I have more or less the same setup (Beckhoff CX) and I’m looking ways to interact with it.
I’m currently working with a jQuery mobile side as visualisation.
Thanks in advance!
Regards Daniel

Have you considered modbus?

Not yet!
As I’ve the ADS currently running, it would just be nice to use this for OH2 as well, instead of adding another service like ModBus.

Currently considering Openhab as well, but just seen “attempts” (like OPC UA - not continued, ADS - no further thing sgoin on …)

Now I see your post…

Is it that you did create an ADS Binding to link Openhab with Beckhoff directly? (I do not want to use Modbus)

For the communication to the beckhoff CX 5020 i use the tcp/ ip binding and it work bidirectional!

I write the values direct to an udp port. :wink:

I did not create a binding.
But may be it’s an idea to start with that. x-mas is coming…

Writing into UDP-Port sounds interesting but I think it requires the TCP/IP Module on the CX, right?

Hi there,
I’m also on that path, having a CX9010 (TC2) with a JavaScript (tame4), TcAdsWebservice based Interface as HTML. Old style, but functional.
The communication between the Web Server and the CX works smooth and really comfortable because the tame4 can read and write all kinds of variables based on their names.
Now I have been fallen in love with OH2 and yes I’d like to support whatever it takes to get an good solution for OH2 with CX on TC2.
Cheers Hodde63

1 Like