Home Assistant IHC integration
Home Assistant is an opensource home automation system which can integrate with a lot of different kind of systems, but it has no IHC support yet. You can integrate IHC with Home assistant using mqtt and the ihc mqtt gateway. But it is nice to have a more “native” integration where lights, sensors e.t.c are found automatically. This is what this post is about.
The IHC integration is now included in the official Home Assistant – so the code below is not updated anymore.
The Configuration below has changed – look at the ihc integration at the official Home Assistant page
Before you can use the home assistant IHC integration you need to install the python ihc soap client
From release 1.0.1 the python ihcsdk is now in PyPi and will be download automatically by home assistant.
The ihc integration for home assistant can be downloaded from github:
In the HA configuration folder (the folder containing configuration.yaml), you place the IHC integration in a subfolder called “custom_components”.
If you want to be able to update from the git repository see the description on github.
I have made support for the HA components: light, switch and binary sensor. but before you can use these you need to configure the main IHC component.
First step is to insert the configuration for your ihc controller in the configuration.yaml file:
ihc: url: 'http://192.168.1.3' username: your-ihc-username password: your-ihc-password info: True
url,username and password are the connection for your ihc controller.
When “info” if True each device will have 3 properties: ihcid, ihcname and ihcnote, these are the value from the ihc project. You can see the properties at the bottom when you click the device in Home Assistant – see image.
This makes it easier to identify each device when you are setting up the system, so it is a good idea to leave this on in the beginning.
To configure light insert this section:
light: - platform: ihc autosetup: True
autosetup: True will scan the ihc project and insert all products recognized as lights. If you want to manually add ihc resources – add the ids like this:
light: - platform: ihc autosetup: True ids: 12345: tablelight 12346: anotherlight ...
In this example 12345 is ihc resource id and “tablelight” is the name it will have in HA. The ihc resource id can be a light level for dimmers or an boolean output of a relay.
To configure switches insert this section:
switch: - platform: ihc autosetup: True
To manually add ihc resources do:
switch: - platform: ihc autosetup: True ids: 12345: myswitch ....
The resource id should be a boolean resource.
To configure binary sensors insert this section:
binary_sensor: - platform: ihc autosetup: True
The autosetuo should find Pit sensors and magnet contacts. if you want to add something manually do it like this:
binary_sensor: - platform: ihc autosetup: True ids: 12345: name: mysensor type: opening inverting: True 12346: ...
The resource id should be a boolean resource. You can skip the inverting if you do not want to invert it (or set it to False). The different kind of sensor types can be found here at the HA site:
If you only want to specify the name – you can like do the other components id: name
For troubleshooting look in the ha log.
The component names should only contain a-z 0-9 and _ (Any national characters will be stripped). If you want to change the friendly display name do it in the customization in HA.