IHC Integration in the official Home Assistant

The IHC integration is now included in the official Home Assistant release 0.62

If you have had the previous IHC integration installed as a custom platform/component, you should delete these from you configuration folder to make the new integration work. (Any custom component will overwrite the build in component)

Change since the last release

Some change have been made in the manual configuration, to make it more consistent in the way other components are doing this. Look at the Home Assistant IHC web page for more information about this.

38 responses to “IHC Integration in the official Home Assistant”

  1. Christian Klit says:

    I love it, super easy to deal with, and the documentation part on hass.io is good and thorough. Thanks for this!

  2. Kenneth Drost says:

    Hi there, just upgraded to 0.62, i’m getting this error : Not initializing ihc because could not install dependency ihcsdk==2.1.1
    2018 im my logfile.

    Help Please ūüôā

    • Jens says:

      Home assistant should install dependencies automatically. You can install it manually from a command line using pip:
      pip install ihcsdk
      (On linux if using python 3 or later use pip3)
      You need to do this from the same user/context as you are running HA.
      To list installed packaged:
      pip list

  3. Stefan Larsen says:

    Any way to recive longpress and release on IHC Switches, for dimming non ihc lights via HASS?

    • Jens says:

      You can connect a button from ihc to a HA binary sensor. Then you can use the sensor in your automation scripts to do whatever you like in HA.The sensor will be on when the button is pressed, and off when the button is released.

  4. Torben Christensen says:

    I have been using your Homeassistant component for a long time, with great ease. However, after updating to 0.70, IHC keeps giving errors. In the HASS log, it says: Unable to read project from ICH controller
    I also get an error, when trying to log into the controller through your IHC Alternative. But that one has nothing to do with HASS, so I am a bit confused, as everything clashed with me updating to 0.70. I really hope you can help.

    • Jens says:

      I have not made any changes to the IHC integration since it was included in HA. I have also updated to 0.70 and it is working fine for me. Have you tried rebooting your IHC controller? Do you have something else connected to your controller. I did have a similar issue with openhab long time ago – it was preventing anything else to connect to the controller.

  5. Kenneth Drost says:

    Hi, i have been using the official IHC component for a while – really like it, but after I upgraded HA to 0.72.1 all my graphs stops updating. If I disable the IHC component graphs gets updated again – can anybody confirm that behavior ? tested on hassbian and hass.io with minimum of sersors. No lights at all.

  6. Jesper says:

    Help to get started with Home Assistant.
    I already have a pii running with Openhab that is connected to IHC. and this runs fine.
    and now I’ve tried to connect ihc against Home Assistant.
    I have followed the instructions from the HA page about the installation.
    and have corrected the Config Yaml file, but gets INVALID CONFIG pleas check your config.
    Is there a kind soul that will help me get started.

  7. Morten L√ľneborg says:

    Absolutely great with official integration. Work as a charm except that it brings back the issue with lack of support for multiple IHC controllers.
    Would it be possible to add support for multiple entries? With the modules being pulled automatically the old option of modifiying the code locally seems not as the best option.
    Otherwise, big thumbs up!

    • Jens says:

      It is possible to do it, but I don’t have the time for it right now. HA is all opensource so anyone else is free to contribute.

      • Morten L√ľneborg says:

        I have submitted a pull request on GitHub with support for a secondary IHC controller. Runs smoothly with my double controller setup and doesn’t impact existing configuration. Hope it will help others with the same kind of setup ūüôā

  8. Karsten says:

    Had the same problem, all my “tryk” was missing.

    My errors (not detect by HA)
    all ID’s must have a name
    binary_sensors – must be binary_sensor

    ex.
    ihc:
    – url: http://xxx.xxx.xxx.xxx
    username: xx
    password: xx
    auto_setup: true
    info: True
    binary_sensor:
    – id: 20770394
    name: Tryk OV
    – id: 20770650
    name: Tryk OH
    – id: 20770906
    name: Tryk NV
    – id: 20771162
    name: Tryk NH

    • Joakim Nordstr√∂m says:

      Hi,

      I have the exact same issue after upgrading to 0.84.
      I have followed the guide on the “breaking changes” section, ie moved everything to the ihc: section…but no dice…

      any ideas?

  9. Morten L√ľneborg says:

    Error in the documentation (my mistake).
    Use ‘switch’, ‘light’, ‘binary_sensor’ (instead of switchS etc).
    There were an error in the sensor module that have been fixed too. It will all be included in release 8.1.4

    • Joakim Nordstr√∂m says:

      Hi Morten,

      I think there is a bug, or maybe Im using the wrong resource. I have some spotlights that are dimmable. I can turn them on using the hassio and homekit interfaces, ie through the IHC component. however, when I try to turn them off they just stay on. Other spotlights that are not dimmable turn on and off just fine. Am I doing something wrong?

      best regards
      Jock

      • Morten L√ľneborg says:

        Not sure but my first guess is that it sounds like LED lights that cannot feed the dimmer?
        Can you turn on and off directly through IHC? If you have LED bulbs you can try replacing them with halogen to see if that is the issue

        • Joakim Nordstr√∂m says:

          Hi Morten,

          No everything works fine directly through the IHC system – and has worked for the last 12 years. The lights in question are spots in the roof (ie halogen GU10). I can dim them or turn them on/off through the IHC and the built-in software. They act strange when using the “Alternate View” app and the hassio component. They are connected using to the viewer/controller through the “unidimmer touch” module (https://bels.dk/produkter/12134-lk-ihcreg-lysdaemper/76394-dimmer-400-uni-sa/) which has 4 resources – touch on/off, sluk alt on/off, memory 1 and memory 2. If I use the “touch” resource the lights keep dimming up/down by themselves, until I use the “sluk alt” and set it to “on”, which turns them off. Do you have such a module in your IHC system? which resource should I use to turn on/off and set a dimmer level? Is it a bug or my misunderstanding?

          best regards
          Jocke

          • Morten L√ľneborg says:

            Hi Jocke,
            All my dimmers (25+) are IHC wireless which allows programmable dimming (ie a setting 0-100% similar to eg HUE) from hass and alternative view.
            As I do not have a “unidimmer touch” to play with it will be my best guess but based on your description it sounds like your dimmer expects a pulse and instead gets a constant signal forcing the dimmer to constantly dimming up & down (ie similar to keep pushing the button).
            Are you using manual or auto setup in hass? And how/what is it registered as? It is just a hunch and I may be wrong but it sound as a configuration issue and my best guess would be to test it with alternative view and try with pulses on each ressource to test on/off and memory 1 and 2. In hass this is not a “dimmable” ressource as such. Try sharing your config and lets see if we can figure out what is going wrong.

    • Karsten Rasmussen says:

      My config dont work after update from 0.84.3 to 0.84.5

      The change in 0.84.x made all IHC config unstable

      Can you please describe the changes made in 0.84.5

  10. Morten L√ľneborg says:

    0.84.4 released with bugfixes and updated documenation. That should fix the issues with the 0.84 update

    • Joakim Nordstr√∂m says:

      Hej Morten,

      I am guessing we both speak Swedish/danish but I’ll keep everything in English in case you want to distribute to help others down the line.

      Ive attached my config, I have tried to config everything manually (following the updated docs). my IHC.yaml file lists all the IHC resources. I think you’re spot on with your analysis, I am just a bit stumped on which resource to use – I have tried using the memory1 resource, but I can only turn the light on, not off. can we use two different resources in the same light? one for on, another for off? Could I build a function in IHC to control the lights and call that function?

      Here is the IHC.yaml file (relevant parts)

      # IHC

      # hämta information och resursid till allting i IHC systemet
      # kopplar sig till visual controller och hämtar ut följande
      # för att få ut allting automatiskt använd auto_setup: true istället

      – url: ‘http://192.168.1.200’
      username: !secret ihc_username
      password: !secret ihc_password
      info: true

      # Switches
      switch:
      # tvättstuga
      – id: 717915
      name: tvatt_strykjarn_uttag

      #…redacted . . .

      # Lights
      light:
      #redacted…
      # hallen
      – id: 1463131
      name: hall_tak_spot
      dimmable: true
      – id: 1061467
      name: hall_garderob_tak_ljus
      dimmable: false

      best regards
      Jocke

      • Jens says:

        You can connect a HA light compoent to a IHC boolean (on/off) or a integer resource. If it is a boolean resource it controls the light directly, if it is a integer resource it is the light level from 0 to 100%. The IHC resource can also be an in or output of a function block in your ihc project. So your can make your own IHC function block to make it work as you want.

  11. Thomas Hopp says:

    Hi,
    Total noob within automation and programming here, so sorry if my problems are due to lack of basic knowledge:
    I Managed to setup Home Assistant on a Raspberry Pi and get the IHC integration installed and working (auto_setup: true)
    I also managed to ‚Äúmap‚ÄĚ a couple of my wireless IHC ‚Äútryk‚ÄĚ (pushbutton remotes) to HA as binary sensors:

    binary_sensor:
    – id: 36444
    name: Tryk_Koekken_Bryggers_NV
    – id: 36700
    name: Tryk_Koekken_Bryggers_NH

    When I press an release on of these ‚Äútryk‚ÄĚ the HA logbook shows these being turned on (when the button is pressed) and turned off (when the button is released), so the mapping seems to work.

    I have made an automation where I am trying to play/pause my SONOS mediaplayer by pressing one of the IHC ‚Äútryk‚ÄĚ:

    – id: ‘1546893667219’
    alias: Mediaplayer test
    trigger:
    – entity_id: binary_sensor.tryk_koekken_bryggers_nv
    from: ‘Off’
    platform: state
    to: ‘On’
    action:
    – service: media_player.media_play_pause
    entity_id: media_player.alrum

    The automation is not working when I push the IHC ‚Äútryk‚ÄĚ, but it is working if I trigger the automation manually in HA. This leads me to believe that it is the trigger part of the automation which is not working. What am I doing wrong?

    Thanks in advance for any assistance!

    Best regards
    Thomas

    • Jens says:

      Try this:


      alias: Mediaplayer test
      trigger:
      - platform: state
      entity_id: binary_sensor.tryk_koekken_bryggers_nv
      from: 'off'
      to: 'on'
      action:
      ...

      on and off should be lowercase and use ‘ (This may be the the comment function here in wordpress that has changed it). Not sure it the order having -platform: state at the beginning is required, but the above works for me. (Note the indention is removed in the above by wordpress)

      • Thomas Hopp says:

        Hi Jens,

        Thank you soo much!!!!
        I made the changes you suggested and now it works. Thanks also for this awesome integration to IHC!

        Best regards
        Thomas

  12. Gert says:

    Hi,
    I’m having some issues with HA and IHC running on a PI3. I have tested the IHC addon with a docker container and here it ran fine. On my PI3B+ I get this in the log:
    Error during setup of component ihc
    Traceback (most recent call last):
    File “/usr/local/lib/python3.6/site-packages/homeassistant/setup.py”, line 148, in _async_setup_component
    component.setup, hass, processed_config) # type: ignore
    File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
    result = self.fn(*self.args, **self.kwargs)
    File “/usr/local/lib/python3.6/site-packages/homeassistant/components/ihc/__init__.py”, line 151, in setup
    if not ihc_setup(hass, config, controller_conf, index):
    File “/usr/local/lib/python3.6/site-packages/homeassistant/components/ihc/__init__.py”, line 172, in ihc_setup
    hass, config, ihc_controller, controller_id)):
    File “/usr/local/lib/python3.6/site-packages/homeassistant/components/ihc/__init__.py”, line 241, in autosetup_ihc_products
    component_setup, groups, controller_id)
    File “/usr/local/lib/python3.6/site-packages/homeassistant/components/ihc/__init__.py”, line 269, in get_discovery_info
    ‘position’: product.attrib[‘position’]},
    KeyError: ‘position’

    This is a fresh install with homekit, samba, ssh, and unifi addons installed as well.

    RB
    Gert

    • Lasse says:

      I have the exact same problem (and error msg) after upgrading to 0.85 .. made no changes to configuration or anything, but now my PIR is not automatically detected and all my manually configured switches are missing. Again without any changes to my config. Guess it’s an error introduced in v0.85, but pretty frustrating.

  13. Morten Post L√ľneborg says:

    Details in this issue:
    https://github.com/home-assistant/home-assistant/issues/20017

    The XML library was updated and caused the error. I have made a PR to fix it that I hope will come out in the next hotfix release (0.85.2 ?).

    In the meantime I recommend to downgrade to 0.84.6 (working version) with this command:
    hassio ha update –version=0.84.6

    Check the updatelog before the next update to verify that the fix is included.

  14. esben says:

    Hello,
    I am new in HassIO / IHC world.
    I have a IHC Controller ver. 6.2; running Software 2.8.4.

    I have downgraded my HassIO to release 0.8.4.6 as recommended above.

    When trying to reconice the IHC controller ig get teh following error:

    Error during setup of component ihc

    Traceback (most recent call last):
    File “/usr/local/lib/python3.6/site-packages/homeassistant/setup.py”, line 148, in _async_setup_component
    component.setup, hass, processed_config) # type: ignore
    File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
    result = self.fn(*self.args, **self.kwargs)
    File “/usr/local/lib/python3.6/site-packages/homeassistant/components/ihc/__init__.py”, line 172, in setup
    if not ihc_setup(hass, config, controller_conf, index):
    File “/usr/local/lib/python3.6/site-packages/homeassistant/components/ihc/__init__.py”, line 193, in ihc_setup
    controller_id)):
    File “/usr/local/lib/python3.6/site-packages/homeassistant/components/ihc/__init__.py”, line 240, in autosetup_ihc_products
    project_xml = ihc_controller.get_project()
    File “/usr/local/lib/python3.6/site-packages/ihcsdk/ihccontroller.py”, line 84, in get_project
    self._project = self.client.get_project()
    File “/usr/local/lib/python3.6/site-packages/ihcsdk/ihcclient.py”, line 91, in get_project
    compresseddata = base64.b64decode(base64data)
    File “/usr/local/lib/python3.6/base64.py”, line 80, in b64decode
    s = _bytes_from_decode_data(s)
    File “/usr/local/lib/python3.6/base64.py”, line 46, in _bytes_from_decode_data
    “string, not %r” % s.__class__.__name__) from None
    TypeError: argument should be a bytes-like object or ASCII string, not ‘NoneType’

    What am i missing?

    Kind regards

  15. Esben Dahl-Nielsen says:

    Hi,
    I have a similar issue:
    “Error during setup of component ihc”

    I have a HassIo running ver 0.84.6, and a IHC controller 6.2 sw ver 2.8.4.

    The traceback give me the following:

    Traceback (most recent call last):
    File “/usr/local/lib/python3.6/site-packages/homeassistant/setup.py”, line 148, in _async_setup_component
    component.setup, hass, processed_config) # type: ignore
    File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
    result = self.fn(*self.args, **self.kwargs)
    File “/usr/local/lib/python3.6/site-packages/homeassistant/components/ihc/__init__.py”, line 172, in setup
    if not ihc_setup(hass, config, controller_conf, index):
    File “/usr/local/lib/python3.6/site-packages/homeassistant/components/ihc/__init__.py”, line 193, in ihc_setup
    controller_id)):
    File “/usr/local/lib/python3.6/site-packages/homeassistant/components/ihc/__init__.py”, line 240, in autosetup_ihc_products
    project_xml = ihc_controller.get_project()
    File “/usr/local/lib/python3.6/site-packages/ihcsdk/ihccontroller.py”, line 84, in get_project
    self._project = self.client.get_project()
    File “/usr/local/lib/python3.6/site-packages/ihcsdk/ihcclient.py”, line 91, in get_project
    compresseddata = base64.b64decode(base64data)
    File “/usr/local/lib/python3.6/base64.py”, line 80, in b64decode
    s = _bytes_from_decode_data(s)
    File “/usr/local/lib/python3.6/base64.py”, line 46, in _bytes_from_decode_data
    “string, not %r” % s.__class__.__name__) from None
    TypeError: argument should be a bytes-like object or ASCII string, not ‘NoneType’

    any good ideas on what is going wrong??
    thanks
    Esben

    • Morten L√ľneborg says:

      Hi Esben,
      Can you provide your configuration? It seems that there are missing some when data but I cannot point out what’s going wrong based on the traceback. The error seems to be thrown when reading the project from the controller which puzzles me a bit… Can you connect with Jens’ “Alternative IHC view?”

Leave a Reply

Your email address will not be published. Required fields are marked *