Niko Home Control II

Hello,

I’m trying to install the Niko Home Assistant II but i have still the issue with the “OFFLINE - COMMUNICATION_ERROR”.
I have added the jar in the addon folder and the bindings is well “Niko Home Control II Bridge”.
However i don’t what i need to add for the “profile” here is the log : Niko Home Control: profile ‘***’ does not match a profile in the controller.

Thank you for your help.

After accepting the bridge you have to set the touch profile parameter. You need to define a touch profile in the Niko Home Control programming software with a password on it. This will be used to communicate. So even if you do not have a Niko touchscreen in your installation, you need to set up such a profile. That’s what the error message says. The bridge will return a list of configured touch profiles, but does not find one with a name that matches the touch profile parameter on the bridge configuration in your case.

thanks a lot now it’s connected !

It took some time before I got the addon working. For some reason it always installed the 2.4 version. Now its working really great. Also connected it to influxdb and grafana for logging. I’m especially interested in the thermostat data. I got 4 data streams for each thermostat:

  • measured
  • mode
  • setpoint
  • overruletime

The measured and setpoint work as expected. The mode gives weird results. For some modules I got mode 5 and for some mode 3. But they got changed to 0 for some reason. See graphs and logs on dropbox.

I mis a link to view the heating demand. “Devices”:[{“Properties”:[{“Demand”:“Heating”}]
In the end I want to create metrics on the cost of heating each room and the total heating.
Is it possible to add it to the connector?

If you want I can share logs or test a feature.

Can’t upload documents on here (new user) so uploaded them to dropbox.
I switched through the modes and enabled override heating.

Already a big thanks for this awesome binding.

@Brett It looks there was a bug in the binding, that reset the mode to 0 (Day) when messages arrived from NHC that did not contain the current mode. I did a change to the binding to keep the old mode.
I hadn’t considered the demand property so far. I created a new channel for that on the thermostat. It should be set to 0 when nothing happens, 1 when heating and -1 when cooling (if your system allows that). It is a readonly channel. Would that work for you? You could easily map that in a sitemap with a map file to show heating or cooling. It is also easy to put it in a graph.
Just drop the new binding .jar you find here in your addons folder to test. You will have to remove the thermostats and add them again to get the new channel for heating/cooling demand.
Please run through your test again and let me know if it now works as expected.

2 Likes

@Mherwege thankyou for the fast update. I’m testing the updates now. Will share the results this week.

Tested the new Jar but the demand channel stays zero.
I added an additional log file in the dropbox and a graph view.

@Brett Thanks again for testing. I found an error in my code. Please try again and let me know.

@Brett, has your problem been resolved with latest update?

With the last version i have installed, i have some issues. The roller shutters only get updated when i push the button, i have groups that move automatic and those actions are not stored. For the thermostats i have no variable to check when the heating was on for each room. Also the status gives weird reults. Not sure if I have the latest version. Wedding in 2 weeks so not a lot of time to play with openhab. Will give more feedback and support later this year. The plugin is stable enough to use only the logging needs some extra work. So all in all good enough to include this binding in the next release.

I updated my nikohomecontrol to version 2.4.3 and the bridge stopped working. I also switched to the latest official snapshot and back so I’m only 95% sure that the update is the problem. Can Anyone verify this and test with an updated controller?

019-05-15 02:04:21.283 [DEBUG] [very.NikoHomeControlDiscoveryService] - Niko Home Control: discovery service org.openhab.binding.nikohomecontrol.internal.handler.NikoHomeControlBridgeHandler2@954e23

2019-05-15 02:04:21.291 [DEBUG] [org.openhab.binding.nikohomecontrol ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=383, service.bundleid=228, service.scope=singleton} - org.openhab.binding.nikohomecontrol

2019-05-15 02:04:21.316 [DEBUG] [andler.NikoHomeControlBridgeHandler2] - Niko Home Control: initializing NHC II bridge handler

2019-05-15 02:04:21.319 [DEBUG] [andler.NikoHomeControlBridgeHandler2] - Niko Home Control: touch profile touch

2019-05-15 02:04:21.323 [DEBUG] [nal.protocol.nhc2.NhcMqttConnection2] - Niko Home Control: base persistence path set to /var/lib/openhab2/nikohomecontrol

==> /var/log/openhab2/events.log <==

2019-05-15 02:04:21.336 [hingStatusInfoChangedEvent] - 'nikohomecontrol:bridge2:559e86af' changed from UNINITIALIZED to INITIALIZING

==> /var/log/openhab2/openhab.log <==

2019-05-15 02:04:21.342 [DEBUG] [l.nhc2.NikoHomeControlCommunication2] - Niko Home Control: initializing for mqtt connection to CoCo on 192.168.0.226:8883

2019-05-15 02:04:21.345 [DEBUG] [nal.protocol.nhc2.NhcMqttConnection2] - Niko Home Control: starting public connection...

2019-05-15 02:04:21.348 [DEBUG] [nal.protocol.nhc2.NhcMqttConnection2] - Niko Home Control: persistence path set to /var/lib/openhab2/nikohomecontrol/192_168_0_241-nikohomecontrol_bridge2_559e86af-public

==> /var/log/openhab2/events.log <==

2019-05-15 02:04:21.361 [.ItemChannelLinkAddedEvent] - Link 'nikohomecontrol_bridge2_559e86af_alarm-nikohomecontrol:bridge2:559e86af:alarm' has been added.

2019-05-15 02:04:21.371 [.ItemChannelLinkAddedEvent] - Link 'nikohomecontrol_bridge2_559e86af_notice-nikohomecontrol:bridge2:559e86af:notice' has been added.

==> /var/log/openhab2/openhab.log <==

2019-05-15 02:04:21.376 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.0.226' with clientid 192_168_0_241-nikohomecontrol_bridge2_559e86af-public and file store '/var/lib/openhab2/nikohomecontrol/192_168_0_241-nikohomecontrol_bridge2_559e86af-public'

2019-05-15 02:04:21.590 [DEBUG] [nal.protocol.nhc2.NhcMqttConnection2] - Niko Home Control: error connecting

2019-05-15 02:04:21.593 [DEBUG] [l.nhc2.NikoHomeControlCommunication2] - Niko Home Control: error in mqtt communication

2019-05-15 02:04:21.598 [DEBUG] [nal.protocol.nhc2.NhcMqttConnection2] - Niko Home Control: stopping public connection...

2019-05-15 02:04:21.603 [DEBUG] [nal.protocol.nhc2.NhcMqttConnection2] - Niko Home Control: stopping profile connection...

==> /var/log/openhab2/events.log <==

2019-05-15 02:04:21.638 [hingStatusInfoChangedEvent] - 'nikohomecontrol:bridge2:559e86af' changed from INITIALIZING to OFFLINE (COMMUNICATION_ERROR): Niko Home Control: error starting bridge connection

@Brett This is likely caused by the switch to the most recent snapshot. I am aware of the problem and trying to resolve it. When going back to openHAB 2.4, make sure you don’t use the binding from the snapshot, but the one downloaded from the link I provided earlier in this thread.

@Brett Problem is fixed in latest snapshots.

Tested it, and it is indeed fixed. Thanks

I saw the release notes of v 2.5.1 today, and something grabbed my attention:

Hobby API integration: local API intended for non-professional use, available on the connected
controller and wireless smart hub programmed with Niko Home Control II

Besides that, I think I will buy the smart hub to integrate extra Niko power outlets and motion sensors (Zigbee).

Yup, we know about this. There will probably be a closed betatest soon. Too bad, the wireless hub doesn’t support zwave :frowning:

It’s a really funny approach :slight_smile: check this out :slight_smile:

http://guide.niko.eu/display/SMNHCIIV251/API+connection+for+DIY

Unfortunately, I don’t see this under connected services? I’m not able to add it. Can anyone confirm?

Cool, even openhab is mentioned!
Does this mean we will be able to integrate eg an ESP module via mqtt in nhc?

I also see that currently, the hub can’t be used together with the connected controller. http://guide.niko.eu/pages/viewpage.action?pageId=23633241

You can already integrate an ESP device in Openhab and in combination with rules, you can basically do whatever you want. I succesfully managed to bind a Sonof Wall switch with 3 pushbuttons (tasmota) and I can use it to turn on/off lights in my nhc2 setup. It does not receive feedback from when a niko button is pushed.

Is it possible to explain this briefly? This sounds very interesting.

Well, I installed the embedded MQTT broker in Openhab and configured a channel with a publish trigger. The Sonoff wall switch sends the following commands to a configured MQTT broker when a touch button is pushed:

state_topic: “stat/sonoff/POWER1”
command_topic: “cmnd/sonoff/POWER1”

payload_on: “ON”
payload_off: “OFF”

Then, I made a rule in Openhab which acts on a trigger:

rule “Sonoff T1 Button 1 OFF”
when
Channel “mqtt:systemBroker:embedded-mqtt-broker:T1BUTTON1-OFF” triggered OFF
then
Lichtpunt_hobbyzolder.sendCommand(OFF)
end

POWER2 and POWER3 is for the 2 other buttons.

I have been looking into getting feedback from pushing a Niko button to that state of the Sonoff Wall Switch buttons. I think it should be possible to make a rule that acts on an event in Openhab

Lichtpunt_wasplaats changed from ON to OFF

—> send a http command back to the Sonoff device

http://sonoff/cm?cmnd=Power%20TOGGLE
http://sonoff/cm?cmnd=Power%20On
http://sonoff/cm?cmnd=Power%20off
http://sonoff/cm?user=admin&password=joker&cmnd=Power%20Toggle

Another approach would be to hack the tasmota firmware so the device can talk directly to the CoCo. Only downside is that the memory of a sonoff device is too low to handle secure MQTT (TLS with certificate). And if you compile tasmota with MQTTS, it cannot have the web interface because of rom size I think. Also, getting feedback from the CoCo whenever a true Niko button is pushed would be a bit hard to figure out. Maybe the API can help with that but it would mean that the tasmota firmware needs a total adaptation, espcially for the NHC2 setup.