Niko NHC2 - MQTT Integration

Hi

I’m experimenting with a Niko Home Controller 2 and have found (by looking at how they are doing thing on a feature branch for OpenHAB) how to control some lights using MQTT.

It theory it should be easy to write something for NHC2, but I’m new to hass.

I’m calling out to developers who have written integrations and willing to help me.
I have no Python experience (only Java and JS) but am willing to learn or help to get the job done.

Anyway, are there people interested in this topic?

If the home controller uses mqtt, you are set to go already. https://www.home-assistant.io/components/light.mqtt/

Yes

And I’ve done this, but it’s not all that easy to use.
A proper integration would be better, that’s all :slight_smile:

I don’t understand. In home assistant a light is a light is a light. Once it is set up, it is as easy to use as any other light.

MQTT is MQTT. It’s already implemented. What doesn’t work with MQTT light domain?

Well, like initial state. You can ask the NHC2 the initial state of all devices, but not of one. How do I set it? It will not be correct if I restart hass. Also the JSON is different the when you get an individual update. And those are not publish with the RETAIN flag :frowning:

Then there is usability, adding these lamps (etc) mqtt devices is not easy, they are not documented.
And when you do get all the info you need, you are stuck with a API were all the devices are controlled trough 3 topics. One to do calls, one to get responses and one with status updates. So you need to interpret the body to know what lamp we are talking about.

In the end, I’ll get all my devices working I guess, it’s just that, I would think we would want to make it more easy for those who come later. Just put in an IP address/host, get a list of devices … :partying_face:

Anyway, maybe I should document it all somewhere.

Yes I think you should document it! Once you do someone may think of better ways to implement it.

Is there an API?

PS even a link to the openhab discussions/code would be useful.

I’ve started dev on https://github.com/filipvh/hass-nhc2
early alpha :slight_smile:

There are news on
https://mynikohomecontrol.niko.eu/
(Hobby API)

yes niko has api