Niko Home Control

Hi,

Can somebody confirm that in openHAB you receive information that a button in NHC is pushed?
I am designing the automation of our new home and the idea would be to use NHC mainly for the push buttons. The actions will in many cases be performed by other technologies like DALI, zwave or rs232 from openHAB.
I’ve read that alarms and notices are received in openHAB but I’m not sure that this includes the push buttons. Or for example the temperature measured by the thermostat.

My apologies if this is not the right place for this question.

Wim

@wimg You would still have to create activities in the Niko Home Control programming software that link your buttons to no or (virtual) outputs. It is these activities that get exposed through the binding. Therefore in the binding it looks like switches that switch an activity on or off (or sliders for dimmers).
I am not sure about the added value of this though. The most expensive component in the NHC installation is the connected controller, which you would need. NHC push buttons are not cheap either. Can’t you use straight Niko push bottons with some other controllers? They have the same look.

@Mherwege Indeed, not an ideal workaround. And I assume reading out temperature is definitely not going to work.
I am looking for a solution based on bus-communication for flexibility and to avoid pulling cables from every place where I want “input” to the switchboard. Same reason why I like DALI: it avoids having to pull a cable from the switchboard to every light you want to control.
I’ll check some other solutions like Bticino, KNX and other bus protocols. In my case, cost is not the main decision factor. Flexibility and my time to get it up and running is as important.

Thanks for the information!

Wim

I just installed Niko Home Control in my new house, and found out Niko didn’t provide a way to use 2 different functions behind a single button (short press/long press). With the use of a Rbp3 with openHabian and NHC-binding, I managed to get this working!

The only problem I’m still facing is my (brand new) Telenet modem-router not allowing DHCP-reservation. When the end of the DHCP-lease for the Niko Connected Controller is reached, it will get a new IP-address and the openHab NHC binding won’t work anymore.
There is no way to assign a static IP-address in the NHC Connected controller itself.

I first triend openHab for Windows, where I could change IP-address to hostname in the binding-properties and save this without any problems.
The rbp3 with openhabian on the other hand automatically changes the hostname back to the IP-address after some time.
When I define the controller as a static “thing” in the default.things-file with the hostname of the controller, the binding keeps having the status “uninitialized”…

Is there a solution for this problem?

I bought my own router to bypass this. Although, in the past, when I only had a Telenet modem/router, my ip’s almost never changed.

But I’m interested how you implemented 2 functions (short/long press) for one button?

NHC II will be released this month, hopefully the binding will still work, because the whole thing has been redesigned.

I think there are multiple options to implement this:

How I did it as a test:

-Button in “drukknopmodus”, define virtual output “Timer 2s”

-link a new action “Button pressed” to this button

-In the START-condition of this action, also set:
0s “Timer 2s” = ON
1s “Timer 2s” = OFF

-define a virtual output “Button pressed < 2s” and a virtual output “Button pressed >2s”
“Button pressed <2s” -> conditional = true when “Button pressed” = YES and “Timer 2s” = NO
"Button pressed >2s" -> conditional = true when “Button pressed” = NO and “Timer 2s” = YES

Now let NHC message a “notice” or “warning” of your choice when either of those virtual outputs get the status TRUE.
Let openHab intercept these messages and call the functions of your choice.

Not tested yet, but seems an easier way to me:
Short press & long press:
-Button in “drukknopmodus”
-link a new action “Drukknop ingedrukt” to this button, link this action also to smartphone.
-write a rule in openHab, measure the time between “Drukknop ingedrukt” = ON and “Drukknop ingedrukt” = OFF
and call the function of your choise

I also think it should be possible to measure double clicks, 2s presses, 3s presses, etc… with a software “timer” in openHab.

A new router would also require the use of “vlans on mac-base” for keeping my digicorders interactive, and I don’t have the hardware or knowledge to get this done.

1 Like

Thanks, I’ll check this out!

Regarding your digicorders: My Telenet modem/router is still in place and has ip 192.168.1.1, my own router has IP 192.198.1.2. So I set up the DMZ adress to my router IP in the ‘Mijn Telenet’ settings.
My digicorder is still plugged in into my Telenet modem/router.

@philippaertske @wars
I have a Telenet modem-router myself. I don’t have an extra router in my network. When I developed this binding, I was faced with the same DHCP problem. I noticed the IP address of the gateway did change sometimes rather unexpectedly.
When you use discovery to discover the NHC gateway, it should find the IP address. It will show this discovered IP address in the configuration parameters. When the connection is lost, the binding should trigger this IP address discovery procedure again and update the IP address you see in the configuration parameters. So that is why you loose the hostname parameter. So there should be no need to set this manually yourself, except in very specific circumstances.
I agree the documentation could have been more specific about this.
If you still have issues, you could adjust the Refresh Interval parameter (show more). This will force a restart of the connection every x minutes, with new search for the IP address.
If all of this does not keep your connection stable, let me know. Best is to get me a debug log of the binding. That should clearly show the re-connection attempts.

@philippaertske Thanks for the good suggestion on the 2 functions for 1 button. There is some development being done in the ESH framework (profiles), that might make it easier for me to put some of this logic into the binding, rather than relying on rules for this. I will keep you posted.

I was not aware about NHC II yet. From what I understand now, it means the software for programming will change, with a firmware update on NHC to go with it. The question will be if there will be an impact on the communication with a smartphone, because that is the protocol I use. If that communication format changes, the binding will have to change. I don’t have a connected controller, only an IP interface, so I will not be able to test this. I also cannot risk upgrading to NHC II and loosing my connection to OH in my own house.

I also only have an IP interface.
If I understand well, our installations will be able to upgrade to NHC II in april 2018. If needed, I’ll do an upgrade to the connected controller. I’ll try to test NHC II with OpenHAB (my father-in-law is an electrician and has a test setup in his workplace)

I see that the programming software for v2 is available now!
more info: Software en apps

@wars Yes, the upgrade will be possible, but only if you replace your controller and IP gateway with a connected controller, which I am not prepared to do in my own setup if it is not broken.
Nice you would be able to test on v2. We could then verify if it work, and if not, try to get a solution.
There is already an NHCII app available as well. What worries me is that you need to login, so it seems to go to the cloud service for connecting. The local communication as I have it right now may not be possible anymore. The description on the Niko website also states both connected controller and app need to be connected to the internet.

Correct, BUT they also write that from april 2018, v1 programs can be converted to v2. So local communication should still be possible… time will tell :slight_smile:

new application will also be the ‘end user’- software. An extra nice feature: up to 50 (previous) versions will be saved to the (connected) controller.

@Mherwege Thanks for the update about IP address discovery, in that case I think there is no issue.
I have no problems at the moment, but expected that this would become one in the near future because openHab connectivity is crucial for the “2-function-button” solution.

@Mherwege @philippaertske I tried to setup the dimmer thing with openhab2 and NHC program software1. In the documentation it’s listed that the dimmer is defined by it’s actionID which refers to the ipInterfaceObjectId used by the Controller. I checked the config.xml as described in the readme but for Dimmers the ipInterfaceObjectId is missing in the config.xml

I have this config for the dimmer in the programming software:

<Action id="680" name="Spots SLPK1 Aan/Uit/Dim" x="1137" y="339" feedbackType="auto" invertFeedback="false" location="25c">
 					<Input input="de" inputAction="SeeInput" previousAction="Nop" />
					<Input input="da" inputAction="SeeInput" previousAction="Nop" />
				        <Input input="e7" inputAction="SeeInput" previousAction="Nop" />
					<Output output="c9" />
					<Behaviour id="681" BehaviourType="Predefined">
              				<StepsOn>
							<ActionStep id="d93" delay="0" action="Used" output="c9" value="0">
								<Parameter name="speed" length="4" value="5" />
							</ActionStep>
						</StepsOn>
						<StepsOff />
					</Behaviour>
				</Action>

I used the predefined behaviour for dimming with holding the button longer. Is there no ipInterfaceObjectId linked to this behaviour?

@robbenaerts Do you have the action available in the Niko App? You have to assign the action to a smartphone/tablet for it to be visible to openHAB. If it is not visible in the app, it won’t be visible to openHAB. Adding a smartphone should also add the parameter to the xml file.
While you can do all of this configuration manually, it is much easier to use discovery in PaperUI.

@Mherwege No I don’t see the dimmers in the app. Only lights that aren’t dimmable. You can see them in the app in your installation? I used pushbuttons as switches in my installation. Is there a specific thing I need to change in the actions or programmation to make them available in the app and PaperUI?

@robbenaerts I also use pushbuttons for dimmers in my installation. And I do see them in the app and openHAB. You need to have a smartphone/tablet defined in the NHC programming software and connect the dimmer action to it. Then load that configuration in the controller. That should expose the dimmers to the Niko App as well. If you can see them there, you can see them in openHAB.

@Mherwege: I have the smartphone/tablet linked with my actions for on/off but the actions with dimming are not able to be added to the smartphone. I was thinking this was by design. But now that you say that you can I might need to recreate these actions in the programming software. I have multiple inputs linked to the same output and all can be used to dim the output via 1 action. That is also not a restriction?

@robbenaerts You are right. I just checked. I have separate actions set up to link the dimmer to the smartphone: only linked to the dimmer and the smartphone. I couldn’t connect the smartphone to an already defined action with push buttons. So you will have to create a second action for it.

@Mherwege Yeah found that out too. Thanks for the help. Next task is exploring the options in OpenHAB to be able to control it via voice. But I need to get more expierence with OpenHAB first. Just starting with it.

I have my niko homecontrol running rock solid with Siri. There is a homekit binding which has some issues and limitations but i found that when I added a certified device like the Hue hub all issues went away. I can check light status and voicecontrol my niko installation with Siri and the home app now from anywhere in the world. 10x better than what Niko themselves could offer. I also started with openhab a few months ago so still learning mainly on the rules definition.

Things like: "Hey Siri Lamp office 50% " works great and you get used to it quickly.

Let me know if you need anyone needs pointers on the homekit setup.