Intertechno LAN Gateway ITGW-433 and OpenHAB

by stusen in Circuits > Gadgets

4637 Views, 4 Favorites, 0 Comments

Intertechno LAN Gateway ITGW-433 and OpenHAB

20151021_082553.jpg

For me, the OpenHAB plugin CULIntertechno did not work as it should to send messages to the Intertechno LAN gateway ITGW-433 to remote switch the PAR-1500 wall sockets. For that I needed to go another way.

IP address

I found it mandatory to know the ITGW's IP address. In order to do that, simply bind an IP address on the DHCP server to the IPGW's MAC-address. To find that hardware address use a network scanner and scan your DHCP range as no fix IP can be set on the ITGW.
The port scanner revealed "Microchip Technology Inc." as the adapter company; use it's MAC address.
Then on the DHCP server, fix/reserve an IP for that MAC address.

OpenHAB config

For each PAR-1500 create 1 line in the items file as shown in the attached file.
The addon org.openhab.binding.exec-1.8.2.jar (or any other version of course) is needed as well in the addon folder.
The code is pretty simple:
exec=">[OFF:/usr/bin/python /opt/openhab/customfiles/senditgw433.py A 1 off] >[ON:/usr/bin/python /opt/openhab/customfiles/senditgw433.py A 1 on]"
When the OFF (or ON) commands are received, openhab will execute the python script senditgw433.py with 3 arguments.
Argument 1 is the master address, 2 is the slave address, and 3 the state to switch to.
The senditgw433.py script resides in the customfiles folder of openhab. Python should be installed by default on the Raspberry Pi.

senditgw433.py

The ITGW-433 accepts commands only via UDP.
There are basic values to be set with which the whole message will be built.