I would like to use HA with my Niko Home Control installation, it uses the TCP protocol.
I have found this Python library, so it looks like its possible to integrate it. https://github.com/NoUseFreak/niko-home-control
NoUseFreak (who wrote the Python library you mention) seems to have added Niko HC platform support and did a pull request to have it merged into Home Assistant. There is some discussion to improve error handling and to add documentation. That’s just from April ago, so let’s hope it makes it into HA sooner or later.
Alternatively, OpenHAB2 supports Niko HC already and it works great! If you love HA and wouldn’t switch to something else (count me in), you could bridge HA and the Niko HC components on OH together using MQTT. It should work, but direct support in HA would be even better of course.
Niko HC is the only (but an important) part of my HA setup missing, I’m gonna give the HA-MQTT-bridge-OH-NikoHC a try soon, unless that pull request is in the pipeline.
I know OpenHAB2 support NHC, but its NHC 1 and I have an installation at home with HNC 2. So it doesn’t work for me.
I have had another look at the code of NoUseFreak and it looks like it’s also for NHC 1…
The biggest reason I wanted to integrate NHC into HA is for the use of google assistant. I have read on Tweakers.net that Niko is currently trying to integrate NHC 2 with Google assistant. https://gathering.tweakers.net/forum/list_messages/1800723
For those stumbling on this thread looking for a way to integrate Niko Home Control 1: here’s how I got it working
I’m running this for several months now, and it’s surprisingly stable and responsive, despite of the extra layer required due to lack of direct support for Niko HC 1.
Needed a little help of OpenHAB, which I run on another Pi, solely to be able to interface with Niko HC (imho this could theoretically run on the same Pi as well, but mine was overloaded already so I went for the safer / easier way of a seperate Pi). OpenHAB has Niko HC 1 integration and is fairly easy to setup. Next you need OpenHAB to publish state information and listen for commands using MQTT. I use the Hass.io MQTT addon and let OpenHAB use this as the MQTT broker. The idea for this setup comes from this thread: Home Assistant - MQTT - openHAB: Switch example, where you can find details on how to setup the OpenHAB MQTT part.
Finally you need MQTT lights and switches configured in HA. Here’s config for this (as a package). This was fairly straight forward, except for dimmable lights, as for those OpenHAB does not put any on/off state on the MQTT eventstream, only the brightness level. So I needed to derive the state from the brightness level (if brightness = 0 then state = OFF, else state = ON). This is done using state_value_template for those dimmable lights.
I’ve started work on a Custom Integration of NHC2 into hass.
It will take some time to get to the levels we all want it to be.
But I’m searching for volunteers to help me get this done.
Level of expertise does not matter, only not giving up.
Please send me a PM with your name, native language and scope of your project.
Also what you can do… from simple testing the integration to co-authoring (code and/or docs)
I do not know howe NHC1 works, from what I understand it works different.
You can upgrade your NHC1 -> NHC2 but it’ll cost you and not all old devices are compatible.
Since I don’t have a NHC1 controller, and not a lot of time, I probably can’t help you
I don’t think I will use HA for my NHC2 installation. Niko is adding default google assistant integration (he only reason I wanted to use HA) and it’s scheduled to release this summer. I will wait and see if it meets all my needs. If not I might come back to HA.
Good luck with the development.
I your only intent is a google home integration, that probably would be the best.
The reason I’m not waiting for that is, not only do I have that today, but more control, automatisation and… integration… like, for example, soft-linking NHC2 ‘buttons’ to IKEA smart lights/gateway (or any other smart lights). The socket always gets power (some nhc2 logic/conf) and the button actually toggles lamp through software.
No first generation touchscreens are supported on NHC2. And replacing the controller is about €600
While, there seems to be someone who has a custom implementation of NHC1, as you can see on post nr 2 on this thread.
I would hope there are other reasons than HA integration to do the upgrade?
That seems like a nice integration. I didn’t know it was possible to link a IKEA smart light to a NHC2 light switch.
Maybe I’ll take a look at HA. But I’m completely new to HA, so it will take some time to get started…
There is no real one way to do this. But i did the following:
First I configured a ‘lamp’ to aways turn on in NHC2.
The two conditionals: if virtuals output is true, turn on the light, if is false… turn on the light.
Now the light is “always on”.
In HA we “see” the “Basic Action” between the Virtual Output and the switch.
Using some config, (a group, automation, and hiding some entities,…) I made the IKEA Light(s) (through the hub they sell) follow the state of that switch.
If you use switches without LED, i would do it a bit different, use the button like a toggle signal to HA.
In theory you can link anything together. In our bathroom, we have a dumb LED bulb, controlled by NHC2. But we have a IKEA Tradfri Control outlet (203.644.76) that cuts power to the electric heater when the light is off.