Software gateway: Old Omron PLC CS1 with ethernet card (ETN21) and Omron FINS protocol to MQTT

We built our house in 1999-2000 and I installed a PLC in the electrical cabinet (first an Omron C200HS and later an Omron CS1) to control the lights, blinds, some outlets, valves for heating etc.

Last year, I wrote a software gateway (called Omron2Mqtt) in Python for a 2-way communication between my old Omron CS1 PLC and Home Assistant, using a MQTT broker. This way, I can use Zigbee devices, tracker devices etc to interact with the PLC: Home Assistant can use everything from the PLC and can send data to the PLC. Now I have the best of 2 worlds: a very stable PLC as the heart of the installation and the ease of HA to couple with other things.

My setup: Omron PLC <-> my Omron2Mqtt gateway <-> Mqtt broker <-> Home Assistant

The software gateway does 2 things:

  • it uses the Omron FINS protocol to communicate with the CS1 PLC and publishes the configuration data and the changes to the MQTT broker. In Home Assistant, all the topics coming from the PLC are integrated via automated MQTT discovery. Nothing in the yaml files.
  • it subscribes to the topics (on the Mqtt Broker) the PLC needs to know and passes the data to the PLC, again using the FINS protocol.

In the communication with the PLC, I used the “Multiple memory area read” command. This is 1 command to read all the different bits, words in different memory areas. So it’s a very efficient way of communicating. Only the data that you need is send in the response. This way, you don’t have to put the data together in the PLC in successive memory words or bits.

To couple the right memory bits and words of the PLC to the MQTT topics the easy way, I use a config file. Here are some pieces of this file (note that the parameter interval isn’t used anymore):

PLC connection data + lights:

Binary sensors (for example the pir sensors):

The blinds:

In MQTT explorer it looks like this:

The result (all items in the PLC on the Home Assistant dashboard):



image

2 Likes

Great job, I’m trying to do the same with no success.
Would you like share the code?

Hello,

I’m sorry for a late answer.
I will share the code, but first I’m going to clean it up. It’s quick and dirty now :slight_smile:

Great job!
Really looking forward to it !!!

This looks very promising. Our house utilizes Omron CJ2M in similar manner. Looking forward for that Omron2Mqtt gateway!

Really a great job!!! I also use Omron PLC CP1L-E with same FINS protocol in my home.
If is possible I’m interested to your Software gateway FINS2MQTT… ThanX

Hi,
I am now trying the possibilities and application of HA. I have already managed to achieve small things, but more complicated solutions are still a serious problem for me.
Before I get involved, I would like to know if my current lighting control, which is controlled by an old Omron Sysmac CQM1 PLC, can be integrated into the HA and if so, how?

Thanks and Regards

Hello, I am very interrested in the omron2mqtt solution, I have a C200h also, do you share it?

Regards,
Jacco

Crossing my fingers for a release / code-dump at some time :slight_smile: Helping my brother integrate his Omron PLCs into HA, and this looks way cooler than my current Node-Red stuff.

1 Like

Hello @ramakersr !

do you still plan to share your code?

Thanks