Codesys and OpenHab

c.man
2017-08-03
2018-09-04
  • c.man - 2017-08-03

    Hi,
    How to Integrate Codesys code with OpenHab webserver ?

     
  • syoma - 2017-08-23

    In few words only Modbus TCP is possible. E.g. OpenHAB is a Modbus client and Codesys runs Modbus Server. I tried this setup and it's worked.

    But anyway I'm dreaming of MQTT...

     
  • acter - 2018-07-22

    Hi everybody...

    I`m looking for the same solution...do you have any improvement ?

     
  • syoma - 2018-08-10

    I tested Janz Tec MQTT library for CODESYS and it did work well. So you can use to to connect to MQTT Broker and Openhab

     
  • annD

    annD - 2018-08-14

    Hi,

    when I use modbus for such a connection - would it be possible to configure two modbus connections vice versa? Once the codesys controller is master for writing data to the openhub (or home assistant and so on) and once the openhub ist master for writing data to the codesys controller. I see an advantage that I do not need to poll data all the time and there is only short delay time. Many data only change a few times a day but need to be writen quite fast if they change.

    BR annD

     
  • syoma - 2018-08-14

    annD
    You will still have long delays, because both - OpenHAB and Codesys will need to send data periodically, not on change. I don't know how fast OpenHAB can handle it, but I think not really fast.

    Also as far as I know OpenHAB supports only Modbus Master (client in case of TCP), thus Codesys can't act as a master in this case.

     
  • aliazzz

    aliazzz - 2018-08-16

    OpenHAB maybe can exchange data via shared memory. I thought I have seen such a software solution somewhere on github ...
    Edit: it was an example for Domoticz ...

     
  • annD

    annD - 2018-09-04

    Another thinking of me is to establish a connection with OPCUA which is a more "modern" communication. Codesys can be a OPCUA-Server and OpenHab (or others like Home Assistant) must act as a client.

    What would be the best fitting connection for such a situation (Home automation software and plc)?

    Best regards,
    annD

     

Log in to post a comment.