Niko Home Control II


(Angelos) #21

check post #8 Niko Home Control II


(Nicolas Vercauteren) #22

Mark,

No activity logged when i change the ventilation speed with the requested logging (debug & on complete bridge channel). Any suggestions?


(Mark Herwege) #23

The binding should log all kinds of things in the openhab.log file when debug logging is turned on. Do you see any lines in the log like: Niko Home Control: ...?
Can you change the speed of your ventilation from the Niko app? If it is not possible from the app, I may not be able to implement it.
Verify that logging is properly turned on by typing log:list in the Karaf console.
Restart the binding with debug logging turned on and send me the full log when starting the binding.


(Nicolas Vercauteren) #24

Hi Mark,

I’ll try this weekend. It logs activity on lighting (dimmer & switch on off), but i don’t see anything regarding ventilation.
I can change the speed of the ventilation from the Niko App.

Kr,
Nicolas


(Mark Herwege) #25

Nicolas,
If it can be done from the app, it should be possible to program it.
The only other thing I can think off when nothing show up is that I do not start the event handling specifically for that. I would then need to find out the commands for it. The only way to figure that out is by doing a wireshark on the app.
Greetings,
Mark


(Joris Philippaerts) #26

Nicolas,

I also am using the NHC ventilation unit, but I defined some virtual inputs “Ventilation low”, “Ventilation high” and “Ventilation boost” and a few functions to let them control the vent.unit.

This way, I can program the ventilation to go in a different mode during day and night, but also go in boost mode when using toilet, bathroom,…

Openhab can also control these virtual inputs, so controlling the ventilation units from openhab is no issue anymore.


(Mark Herwege) #27

I just created a pull request, PR #4226 for initial support for Niko Home Control II.

I expect lights and dimmers to work, although more testing would be nice. To get to feature parity with the v1 binding, I would need debug logs for use of rollershutters.

The binding can currently be downloaded here.
For the documentation, have a look here.

Note that you will need to configure a touch profile with password in the Niko Programming software. This touch profile will be used for the connection.


(wvanvlaenderen) #28

@Mherwege thanks for the PR. I am new to openHAB and NHC2. I tried dropping the jar in the addons directory, but upon configuring I am getting the following stacktrace. Do I miss any dependencies?

19:49:35.060 [ERROR] [home.core.thing.internal.ThingManager] - Exception occurred while initializing handler of thing 'nikohomecontrol:bridge2:9f99de2a': org/openhab/binding/nikohomecontrol/internal/protocol/nhc2/NhcMqttConnection2
java.lang.NoClassDefFoundError: org/openhab/binding/nikohomecontrol/internal/protocol/nhc2/NhcMqttConnection2
	at org.openhab.binding.nikohomecontrol.internal.protocol.nhc2.NikoHomeControlCommunication2.<init>(NikoHomeControlCommunication2.java:95) ~[?:?]
	at org.openhab.binding.nikohomecontrol.internal.handler.NikoHomeControlBridgeHandler2.initialize(NikoHomeControlBridgeHandler2.java:64) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
	at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [101:org.eclipse.smarthome.core:0.10.0.oh230]
	at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [101:org.eclipse.smarthome.core:0.10.0.oh230]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
	at java.lang.Thread.run(Thread.java:748) [?:?]

(wvanvlaenderen) #29

So I was able to get this to work for NHC2. Please note that openHAB 2.4 or later is required.


(Wegh Christof) #30

Used a clean install. Saw 2 Niko Home Control Bindings installed. Uninstalled the 2.3.0 version.

Following errors in the log:

2018-11-18 00:45:35.770 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.binding.nikohomecontrol-2.4.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.nikohomecontrol [196]
  Unresolved requirement: Import-Package: org.eclipse.jdt.annotation; resolution:="optional"
  Unresolved requirement: Import-Package: org.eclipse.paho.client.mqttv3

Probably I overlooked something, will find it out somewhere tomorrow. Will provide also logs for the thermostats when up and running.


(Mark Herwege) #31

I have been incomplete in my instructions to use this. You need a recent openHAB 2.4 snapshot or milestone release. If you already have the Niko Home Control binding installed, you will need to uninstall it before putting the new binding version in the addons directory.
The binding relies on the v2 mqtt transport. As long as the new binding version is not part of the release (i.e. the code has not been merged yet), you will need to make sure this is available in your system. You can do that by manually installing the feature in the karaf console (feature:install esh-io-transport-mqtt) or by installing the mqtt v2 binding. Just having the binding there without configuration will fulfill the pre-requisite.


(Wegh Christof) #32

Not working here unfortunately. Also showing 2 IP addresses. 192.168.0.199 is the CoCo.

   ==> /var/log/openhab2/openhab.log <==
2018-11-25 23:35:25.945 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.0.199' with clientid paho693666196230231 and file store '/var/lib/openhab2/mqtt/192.168.0.199'
2018-11-25 23:35:25.949 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '192.168.0.165'. Next attempt in 10000ms
2018-11-25 23:35:25.958 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.0.165' with clientid paho693606189004898 and file store '/var/lib/openhab2/mqtt/192.168.0.165'
2018-11-25 23:35:25.961 [WARN ] [l.nhc2.NikoHomeControlCommunication2] - Niko Home Control: error in mqtt communication, {}
org.eclipse.smarthome.io.transport.mqtt.MqttException: MqttException with reason 0
	at org.openhab.binding.nikohomecontrol.internal.protocol.nhc2.NhcMqttConnection2.startConnection(NhcMqttConnection2.java:125) ~[?:?]
	at org.openhab.binding.nikohomecontrol.internal.protocol.nhc2.NikoHomeControlCommunication2.startCommunication(NikoHomeControlCommunication2.java:112) ~[?:?]
	at org.openhab.binding.nikohomecontrol.internal.handler.NikoHomeControlBridgeHandler.lambda$0(NikoHomeControlBridgeHandler.java:74) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
	at java.lang.Thread.run(Thread.java:748) [?:?]
2018-11-25 23:35:26.020 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '192.168.0.199'. Next attempt in 10000ms
2018-11-25 23:35:26.025 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.0.199' with clientid paho693546224164985 and file store '/var/lib/openhab2/mqtt/192.168.0.199'
2018-11-25 23:35:29.046 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '192.168.0.199'. Next attempt in 10000ms

(Mark Herwege) #33

@cwegh Sorry about this.
How did you configure the binding? Did you do it through PaperUI? Did you set any parameters? Do you have any ip reservation for your CoCo in you router? Are you sure there was no bridge already configured before addinga new one?

I would suggest trying to clear the cache before trying again.

The only reason I would expect different ip addresses is when the CoCo switches ip at some point in time. I have seen that behaviour with v1, so the dhcp lease durations did not seem to respected. I am not surpised it does not work if it finds two different ip addresses (it should recover though).
Can you provide a full log from starting the binding to the point above? I want to see the discovery part. Make sure you remove the current bridge before doing that.

Thanks,

Mark


(Wegh Christof) #34

Hi Mark

  1. Through Paper UI
  2. Manual set the IP address (although it sometimes gets overwritten)
  3. I use fixed IP address using MAC reservation in DHCP
  4. I did a fresh install

I am hosting Openhab on a Ubuntu server. Also I have seen this behavior in the previous version.

How to clear the cache?

I’ll completely uninstall openhab and I’ll provide the log. Which exact log do you want? openhab.log and/or events.log?

KR

C.


(Mark Herwege) #35

@cwegh,

Try not setting an ip in the binding. It is normal it gets overwritten if the CoCo updates the ip on its side.
I would need an openhab.log with debug enabled.

To clear cache, you can use the openhab-cli. I don’t know the command by heart, would need to look it up.


(Wegh Christof) #36

Hi Mark

Below the debug log. 192.168.0.199 is my Ubuntu server hosting Openhab, this is not CoCo (192.168.0.192).

2018-11-26 19:57:25.861 [DEBUG] [org.openhab.binding.nikohomecontrol ] - BundleEvent STARTING - org.openhab.binding.nikohomecontrol
2018-11-26 19:57:25.881 [DEBUG] [org.openhab.binding.nikohomecontrol ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={service.id=344, service.bundleid=190, service.scope=bundle, component.name=org.openhab.binding.nikohomecontrol.internal.NikoHomeControlHandlerFactory, component.id=203} - org.openhab.binding.nikohomecontrol
2018-11-26 19:57:25.890 [DEBUG] [ikoHomeControlBridgeDiscoveryService] - Niko Home Control: bridge discovery service started
2018-11-26 19:57:25.891 [DEBUG] [ikoHomeControlBridgeDiscoveryService] - Niko Home Control: Start background bridge discovery
2018-11-26 19:57:25.892 [DEBUG] [ikoHomeControlBridgeDiscoveryService] - Niko Home Control: discovery broadcast on 192.168.0.255
2018-11-26 19:57:25.893 [DEBUG] [nal.protocol.NikoHomeControlDiscover] - Niko Home Control: IP address is /192.168.0.199, unique ID is 302e302e302e
2018-11-26 19:57:25.894 [DEBUG] [ikoHomeControlBridgeDiscoveryService] - Niko Home Control: NHC II bridge found at /192.168.0.199
2018-11-26 19:57:25.899 [DEBUG] [org.openhab.binding.nikohomecontrol ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=345, service.bundleid=190, service.scope=bundle, component.name=org.openhab.binding.nikohomecontrol.internal.discovery.NikoHomeControlBridgeDiscoveryService, component.id=204} - org.openhab.binding.nikohomecontrol
2018-11-26 19:57:25.911 [DEBUG] [org.openhab.binding.nikohomecontrol ] - BundleEvent STARTED - org.openhab.binding.nikohomecontrol
2018-11-26 19:57:32.483 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '192.168.0.199'. Next attempt in 10000ms
2018-11-26 19:57:32.485 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.0.199' with clientid paho766542489655099 and file store '/var/lib/openhab2/mqtt/192.168.0.199'
2018-11-26 19:57:42.486 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '192.168.0.199'. Next attempt in 10000ms
2018-11-26 19:57:42.488 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.0.199' with clientid paho766542489655099 and file store '/var/lib/openhab2/mqtt/192.168.0.199'
2018-11-26 19:57:52.489 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '192.168.0.199'. Next attempt in 10000ms
2018-11-26 19:57:52.493 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.0.199' with clientid paho766542489655099 and file store '/var/lib/openhab2/mqtt/192.168.0.199'
2018-11-26 19:58:02.494 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '192.168.0.199'. Next attempt in 10000ms
2018-11-26 19:58:02.502 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.0.199' with clientid paho766542489655099 and file store '/var/lib/openhab2/mqtt/192.168.0.199'
2018-11-26 19:58:12.503 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '192.168.0.199'. Next attempt in 10000ms
2018-11-26 19:58:12.508 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.0.199' with clientid paho766542489655099 and file store '/var/lib/openhab2/mqtt/192.168.0.199'
2018-11-26 19:58:22.494 [DEBUG] [very.NikoHomeControlDiscoveryService] - Niko Home Control: discovery service org.openhab.binding.nikohomecontrol.internal.handler.NikoHomeControlBridgeHandler2@64c13af9
2018-11-26 19:58:22.496 [DEBUG] [org.openhab.binding.nikohomecontrol ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=346, service.bundleid=190, service.scope=singleton} - org.openhab.binding.nikohomecontrol
2018-11-26 19:58:22.510 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '192.168.0.199'. Next attempt in 10000ms
2018-11-26 19:58:22.512 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.0.199' with clientid paho766542489655099 and file store '/var/lib/openhab2/mqtt/192.168.0.199'
2018-11-26 19:58:25.895 [DEBUG] [ikoHomeControlBridgeDiscoveryService] - Niko Home Control: discovery broadcast on 192.168.0.255
2018-11-26 19:58:25.896 [DEBUG] [nal.protocol.NikoHomeControlDiscover] - Niko Home Control: IP address is /192.168.0.199, unique ID is 302e302e302e
2018-11-26 19:58:25.897 [DEBUG] [ikoHomeControlBridgeDiscoveryService] - Niko Home Control: NHC II bridge found at /192.168.0.199
2018-11-26 19:58:32.518 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '192.168.0.199'. Next attempt in 10000ms
2018-11-26 19:58:32.520 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.0.199' with clientid paho766542489655099 and file store '/var/lib/openhab2/mqtt/192.168.0.199'
2018-11-26 19:58:42.520 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '192.168.0.199'. Next attempt in 10000ms
2018-11-26 19:58:42.523 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.0.199' with clientid paho766542489655099 and file store '/var/lib/openhab2/mqtt/192.168.0.199'
2018-11-26 19:58:52.524 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '192.168.0.199'. Next attempt in 10000ms
2018-11-26 19:58:52.530 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.0.199' with clientid paho766542489655099 and file store '/var/lib/openhab2/mqtt/192.168.0.199'
2018-11-26 19:59:02.531 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '192.168.0.199'. Next attempt in 10000ms
2018-11-26 19:59:02.533 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.0.199' with clientid paho766542489655099 and file store '/var/lib/openhab2/mqtt/192.168.0.199'
2018-11-26 19:59:12.534 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '192.168.0.199'. Next attempt in 10000ms
2018-11-26 19:59:12.536 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.0.199' with clientid paho766542489655099 and file store '/var/lib/openhab2/mqtt/192.168.0.199'
2018-11-26 19:59:22.537 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '192.168.0.199'. Next attempt in 10000ms
2018-11-26 19:59:22.542 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.0.199' with clientid paho766542489655099 and file store '/var/lib/openhab2/mqtt/192.168.0.199'
2018-11-26 19:59:25.897 [DEBUG] [ikoHomeControlBridgeDiscoveryService] - Niko Home Control: discovery broadcast on 192.168.0.255
2018-11-26 19:59:25.899 [DEBUG] [nal.protocol.NikoHomeControlDiscover] - Niko Home Control: IP address is /192.168.0.199, unique ID is 302e302e302e
2018-11-26 19:59:25.899 [DEBUG] [ikoHomeControlBridgeDiscoveryService] - Niko Home Control: NHC II bridge found at /192.168.0.199
2018-11-26 19:59:25.909 [DEBUG] [andler.NikoHomeControlBridgeHandler2] - Niko Home Control: initializing NHC II bridge handler
2018-11-26 19:59:25.909 [DEBUG] [andler.NikoHomeControlBridgeHandler2] - Niko Home Control: touch profile Keuken
2018-11-26 19:59:25.912 [DEBUG] [l.nhc2.NikoHomeControlCommunication2] - Niko Home Control: initializing for mqtt connection to CoCo on 192.168.0.199:8883
2018-11-26 19:59:25.913 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.0.199' with clientid paho767106170535616 and file store '/var/lib/openhab2/mqtt/192.168.0.199'
2018-11-26 19:59:25.929 [WARN ] [l.nhc2.NikoHomeControlCommunication2] - Niko Home Control: error in mqtt communication, {}
org.eclipse.smarthome.io.transport.mqtt.MqttException: MqttException with reason 0
	at org.openhab.binding.nikohomecontrol.internal.protocol.nhc2.NhcMqttConnection2.startConnection(NhcMqttConnection2.java:125) ~[?:?]
	at org.openhab.binding.nikohomecontrol.internal.protocol.nhc2.NikoHomeControlCommunication2.startCommunication(NikoHomeControlCommunication2.java:112) ~[?:?]
	at org.openhab.binding.nikohomecontrol.internal.handler.NikoHomeControlBridgeHandler.lambda$0(NikoHomeControlBridgeHandler.java:74) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
	at java.lang.Thread.run(Thread.java:748) [?:?]
2018-11-26 19:59:32.542 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '192.168.0.199'. Next attempt in 10000ms
2018-11-26 19:59:32.544 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.0.199' with clientid paho766542489655099 and file store '/var/lib/openhab2/mqtt/192.168.0.199'
2018-11-26 19:59:42.545 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '192.168.0.199'. Next attempt in 10000ms
2018-11-26 19:59:42.547 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.0.199' with clientid paho766542489655099 and file store '/var/lib/openhab2/mqtt/192.168.0.199'
2018-11-26 19:59:52.547 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '192.168.0.199'. Next attempt in 10000ms
2018-11-26 19:59:52.551 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.0.199' with clientid paho766542489655099 and file store '/var/lib/openhab2/mqtt/192.168.0.199'
2018-11-26 20:00:02.554 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '192.168.0.199'. Next attempt in 10000ms
2018-11-26 20:00:02.559 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.0.199' with clientid paho766542489655099 and file store '/var/lib/openhab2/mqtt/192.168.0.199'
2018-11-26 20:00:12.561 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '192.168.0.199'. Next attempt in 10000ms
2018-11-26 20:00:12.562 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.0.199' with clientid paho766542489655099 and file store '/var/lib/openhab2/mqtt/192.168.0.199'
2018-11-26 20:00:22.563 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '192.168.0.199'. Next attempt in 10000ms
2018-11-26 20:00:22.565 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.0.199' with clientid paho766542489655099 and file store '/var/lib/openhab2/mqtt/192.168.0.199'
2018-11-26 20:00:25.914 [DEBUG] [ikoHomeControlBridgeDiscoveryService] - Niko Home Control: discovery broadcast on 192.168.0.255
2018-11-26 20:00:25.916 [DEBUG] [nal.protocol.NikoHomeControlDiscover] - Niko Home Control: IP address is /192.168.0.199, unique ID is 302e302e302e
2018-11-26 20:00:25.916 [DEBUG] [ikoHomeControlBridgeDiscoveryService] - Niko Home Control: NHC II bridge found at /192.168.0.199
2018-11-26 20:00:25.938 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '192.168.0.199'. Next attempt in 10000ms
2018-11-26 20:00:25.946 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.0.199' with clientid paho767106170535616 and file store '/var/lib/openhab2/mqtt/192.168.0.199'
2018-11-26 20:00:32.565 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '192.168.0.199'. Next attempt in 10000ms
2018-11-26 20:00:32.572 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.0.199' with clientid paho766542489655099 and file store '/var/lib/openhab2/mqtt/192.168.0.199'
2018-11-26 20:00:35.947 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '192.168.0.199'. Next attempt in 10000ms
2018-11-26 20:00:35.948 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.0.199' with clientid paho767106170535616 and file store '/var/lib/openhab2/mqtt/192.168.0.199'
2018-11-26 20:00:42.573 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '192.168.0.199'. Next attempt in 10000ms
2018-11-26 20:00:42.574 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.0.199' with clientid paho766542489655099 and file store '/var/lib/openhab2/mqtt/192.168.0.199'
2018-11-26 20:00:45.949 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '192.168.0.199'. Next attempt in 10000ms
2018-11-26 20:00:45.951 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.0.199' with clientid paho767106170535616 and file store '/var/lib/openhab2/mqtt/192.168.0.199'
2018-11-26 20:00:52.575 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '192.168.0.199'. Next attempt in 10000ms
2018-11-26 20:00:52.578 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.0.199' with clientid paho766542489655099 and file store '/var/lib/openhab2/mqtt/192.168.0.199'
2018-11-26 20:00:55.952 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '192.168.0.199'. Next attempt in 10000ms
2018-11-26 20:00:55.954 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.0.199' with clientid paho767106170535616 and file store '/var/lib/openhab2/mqtt/192.168.0.199'
2018-11-26 20:01:02.581 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '192.168.0.199'. Next attempt in 10000ms
2018-11-26 20:01:02.583 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.0.199' with clientid paho766542489655099 and file store '/var/lib/openhab2/mqtt/192.168.0.199'
2018-11-26 20:01:05.954 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '192.168.0.199'. Next attempt in 10000ms
2018-11-26 20:01:05.956 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.0.199' with clientid paho767106170535616 and file store '/var/lib/openhab2/mqtt/192.168.0.199'
2018-11-26 20:01:12.585 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '192.168.0.199'. Next attempt in 10000ms
2018-11-26 20:01:12.587 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.0.199' with clientid paho766542489655099 and file store '/var/lib/openhab2/mqtt/192.168.0.199'
2018-11-26 20:01:15.957 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '192.168.0.199'. Next attempt in 10000ms
2018-11-26 20:01:15.959 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.0.199' with clientid paho767106170535616 and file store '/var/lib/openhab2/mqtt/192.168.0.199'
2018-11-26 20:01:22.587 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '192.168.0.199'. Next attempt in 10000ms
2018-11-26 20:01:22.589 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.0.199' with clientid paho766542489655099 and file store '/var/lib/openhab2/mqtt/192.168.0.199'
2018-11-26 20:01:25.917 [DEBUG] [ikoHomeControlBridgeDiscoveryService] - Niko Home Control: discovery broadcast on 192.168.0.255
2018-11-26 20:01:25.919 [DEBUG] [nal.protocol.NikoHomeControlDiscover] - Niko Home Control: IP address is /192.168.0.199, unique ID is 302e302e302e
2018-11-26 20:01:25.919 [DEBUG] [ikoHomeControlBridgeDiscoveryService] - Niko Home Control: NHC II bridge found at /192.168.0.199
2018-11-26 20:01:25.960 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '192.168.0.199'. Next attempt in 10000ms
2018-11-26 20:01:25.961 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.0.199' with clientid paho767106170535616 and file store '/var/lib/openhab2/mqtt/192.168.0.199'
2018-11-26 20:01:32.589 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '192.168.0.199'. Next attempt in 10000ms
2018-11-26 20:01:32.591 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.0.199' with clientid paho766542489655099 and file store '/var/lib/openhab2/mqtt/192.168.0.199'
2018-11-26 20:01:35.962 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '192.168.0.199'. Next attempt in 10000ms

(Mark Herwege) #37

@cwegh
This is very strange. I did not touch the logic to find the ip for the controller from the v1 binding at all. And it works for all others.
Can you try removing the bridge from PaperUI? The bridge should then appear in the inbox again. Accept this bridge in the inbox. Post the log here.
Thanks,
Mark


(bccrew) #38

Hello @cwegh and @wvanvlaenderen, glad to see people can finally benefit from the work @Mherwege and I have performed so far. It took a lot of time to understand how the NHC2 controller can be controlled by private MQTT messages. So far we are able to control lights and dimmers via MQTT. Based on this research and commands, @Mherwege wrote this first implementation.

@Mherwege, for me the lights are working but the dimmer still needs some more investigation.


(Wegh Christof) #39

I suspect it is a v1 problem, where I had the same behavior.

I’ll try your option and post the logs.


(Mark Herwege) #40

@cwegh I had a look at the discovery mechanism code again. I don’t understand how it can ever return the IP address of your Ubuntu server. The binding sends a UDP discovery packet to the broadcast address (in your case 192.168.0.255), port 10000. The CoCo listens on this port and responds with a packet. The source address of this packet is used as the address of the CoCo.
Is their something special in the firewall setup of your Ubuntu server that does something with the source address of incoming UDP packets?
You could try wireshark to debug this and look for an UDP broadcast packet being sent to port 10000 from the Ubuntu server, and the response to that.
Alternatively, try installing on a different machine and see if you have the same behaviour.