Niko Home Control


(Joris Philippaerts) #102

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.


(Ward) #103

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.


(Mark Herwege) #104

@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.


(Ward) #105

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: https://niko.eu/nlbe/producten/niko-home-control/software-en-apps


(Mark Herwege) #106

@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.


(Ward) #107

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.


(Joris Philippaerts) #108

@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.


(Robben Aerts) #109

@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?


(Mark Herwege) #110

@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.


(Robben Aerts) #111

@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?


(Mark Herwege) #112

@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.


(Robben Aerts) #113

@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?


(Mark Herwege) #114

@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.


(Robben Aerts) #115

@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.


(Christophe) #116

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.


(Ward) #117

Hopefully an integration with Google Assistent will arrive also. I think it would je nice to control my house like that.

Did someone already tested NHC 2 with OpenHAB? I’ll try to do this asap.


(serrrano) #118

Hi
Thanks to Extric99 for showing me this owesom tool, and also to Mherwege for his code :raised_hands:

i want to ask
I stack on my switch light in homekit is showing up but when i switch on and switch off nothing happened. in papaer UI is everything working
i think problem is that i have on my niko installation names of switch with “space” (kitchen light)
i change in paper UI the name of my niko switch to name withou space “kitchenlight” as you need to have in home.items things like this
Switch Light_Test “Light Livingroom” [ “Lighting” ]
but not in my niko installaiton
do i need to change it also in my niko installaion??? name of switch to name without space ?

thanks


(Mark Herwege) #119

@Serrrano Spaces in the NHC switch names should not matter. If you look at the channel names in paperUI, you will see these channels don’t have spaces, but refer to the NHC id (if created with discovery), so no spaces there.
I don’t know about the Homekit integration part, as I do not use that myself.


(serrrano) #120

@Mherwege
Thanks a LOT
that was a point. my configuration need to be like this

Switch nikohomecontrol_onOff_440e00ee2c16_83_switch “Kitchen LED” [ “Lighting” ]
and everything is working

thanks for your hint i just copied channels ID from binding to home.items configuration

good job


(serrrano) #121

@extric99 Do you have also rollershutter inyour configuration with apple homekit?

i have this in my home.items for roolershutter but withou success
Rollershutter nikohomecontrol_blind_440e00ee2c16_109_rollershutter “Terrace right” [ “Switchable” ]

i cant move up or down… in paper UI is everything OK