Plugwise Home Automation binding for OpenHAB

Still have some problems. Some items just go offline, not sure why but they lose the connection with the binding or the adam? Removing the thing and adding them back solves the issue. Not sure what I can do to make it more clear for you… :slight_smile:

[edit] - just saw my appliance_boiler:adam:PW_Ketel:chState state = ON, which is odd at this time, so i checked plugwise and there it’s OFF. I deleted the Thing appliance boiler and after that one of my zones suddenly changed from 17 degreed to 20.5 but not in the Plugwise adam itself.

So the binding is really unstable, almost unusable, i run the testing version of openhab but that seems pretty stable. hope you could have a look at the binding, it looks like after the 1 - 100 % change, things got weird.

running on this one now for 6 hours without any problems :slight_smile:

Very strange. Thanks for the feedback. Could you provide some logs, events etc?
Did you get any errors, warning?

The code for the temp channels are not changed since that version. Will look into it in the next days.

Yeah, i also have the problem with the above older binding (202101042010)… It stops pulling info so I restart the binding via karaf but the temperatures still arent pulled so I have to delete the thing or item and then it’s working again for a short while. pretty strange, maybe because i’m running the test version 3.0 but I thought you where also running that version.

I checked the logs again and there is an error I did miss that one last time i checked.

2021-01-19 16:50:18.780 [DEBUG] [rnal.handler.PlugwiseHABridgeHandler] - Refreshing the Plugwise Home Automation Controller plugwiseha:gateway:adam
2021-01-19 16:50:18.823 [DEBUG] [ernal.api.model.PlugwiseHAController] - Found 3 Plugwise Home Automation location(s)
2021-01-19 16:50:18.825 [DEBUG] [ernal.api.model.PlugwiseHAController] - Found 3 Plugwise Home Automation location(s)
2021-01-19 16:50:18.827 [DEBUG] [ernal.api.model.PlugwiseHAController] - Found 7 Plugwise Home Automation appliance(s)
2021-01-19 16:50:18.832 [DEBUG] [ernal.api.model.PlugwiseHAController] - Found 7 Plugwise Home Automation appliance(s)
2021-01-19 16:50:18.836 [DEBUG] [ernal.api.model.PlugwiseHAController] - Found 7 Plugwise Home Automation appliance(s)
2021-01-19 16:50:23.838 [DEBUG] [rnal.handler.PlugwiseHABridgeHandler] - Refreshing the Plugwise Home Automation Controller plugwiseha:gateway:adam
2021-01-19 16:50:24.314 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception: 
java.lang.NullPointerException: null
	at org.openhab.binding.plugwiseha.internal.api.model.dto.ActuatorFunctionality.compareDateWith(ActuatorFunctionality.java:88) ~[?:?]
	at org.openhab.binding.plugwiseha.internal.api.model.dto.ActuatorFunctionality.isOlderThan(ActuatorFunctionality.java:93) ~[?:?]
	at org.openhab.binding.plugwiseha.internal.api.model.dto.ActuatorFunctionalities.merge(ActuatorFunctionalities.java:65) ~[?:?]
	at org.openhab.binding.plugwiseha.internal.api.model.dto.Locations.merge(Locations.java:48) ~[?:?]
	at org.openhab.binding.plugwiseha.internal.api.model.dto.DomainObjects.mergeLocations(DomainObjects.java:59) ~[?:?]
	at org.openhab.binding.plugwiseha.internal.api.model.PlugwiseHAController.mergeDomainObjects(PlugwiseHAController.java:430) ~[?:?]
	at org.openhab.binding.plugwiseha.internal.api.model.PlugwiseHAController.getDomainObjects(PlugwiseHAController.java:221) ~[?:?]
	at org.openhab.binding.plugwiseha.internal.api.model.PlugwiseHAController.getUpdatedDomainObjects(PlugwiseHAController.java:229) ~[?:?]
	at org.openhab.binding.plugwiseha.internal.api.model.PlugwiseHAController.refresh(PlugwiseHAController.java:107) ~[?:?]
	at org.openhab.binding.plugwiseha.internal.handler.PlugwiseHABridgeHandler.refresh(PlugwiseHABridgeHandler.java:210) ~[?:?]
	at org.openhab.binding.plugwiseha.internal.handler.PlugwiseHABridgeHandler.run(PlugwiseHABridgeHandler.java:185) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:834) [?:?]

Just stopped the binding and I also see this, didn’t notice it had something to do with plugwise binding:


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

2021-01-19 19:52:43.049 [WARN ] [e.jetty.util.thread.QueuedThreadPool] - QueuedThreadPool[OH-httpClient-common]@45ab3b3d{STOPPING,10<=0<=40,i=7,r=-1,q=3}[NO_TRY] Couldn't stop Thread[OH-httpClient-common-410780,5,main]

2021-01-19 19:52:43.050 [WARN ] [e.jetty.util.thread.QueuedThreadPool] - QueuedThreadPool[OH-httpClient-common]@45ab3b3d{STOPPING,10<=0<=40,i=7,r=-1,q=3}[NO_TRY] Couldn't stop Thread[OH-httpClient-common-248952,5,main]

I will stop openhab service and clear cache to check if the problem is gone after that, will report back here :slight_smile:

By the way, what’s the best way to replace the binding for a new one? I normaly stop the binding via karaf, delete the file in the addons folder and copy the new one to the folder.

[edit] - after reboot en clear cache, got the above error couple of times and the temperature values are stuck again. Hope you find the problem! If you need any help, just send me an message.

NullPointerException was fixed in the previous version, so if you use an older version, that is expected. I didn’t see any strange things for the past 4 hours with the most recent version in my openhab setup. Please use the most recent version and let me know what problems you encounter.
If possible try to reproduce the problem or put the binding in debug mode (that is really loud) so we could check if the state of an channel does not match the SOAP message provided.

Except for the new chState channel, nothing was changed to the handling of the XML in the past versions.

I’m pretty sure I used the last one, but I copied this version > [3.1.0.202101152146] again to the plugins folder just yet to be sure. This morning I updated openhab via openhabian-config and chose the Testing but stable (2nd option) version. So it should be the last version.

I understand this is a tricky one, because it looks like the problem is within my installation, but I can’t pinpoint where it is. On the other side, the binding was really great but for me it’s not so usable anymore, so I hope to fix it :smiley:

Strange thing, I checked the logs. I got 2 nullpointer exceptions today, one around 11.18, it is barely visible in the values in the graph, the temperatures got stuck for a short while. The second one was at 13:59 and after that, the temperatures wheren’t updated anymore. See the graph below. I will enable DEBUG this night as i’m pretty shure this will happen again, I tried everything to solve it from my side. The only thing I changed was upgrading from 3.0.0 stable to 3.1.0 testing. Strange thing is, it’s doesnt show 3.1.0 or such thing in the main UI > help > tech. info > details. Feels like that’s a bug and doesn’t show the Testing version, i’m curious what your info is showing.

As you can see in the graph, most of the values (temperatures, boiler state, hotwater state) don’t change anymore, but the setpoints still work! When the values don’t work, Openhab UI does show all the items online. When I reload the Thing / Item / Binding it is working as it should for a while.

I will report tomorrow what the status of the DEBUG in the logfiles is.

The debug was on this night and the binding crashed after 3 hours. The log doesn’t show much relevant information though:

2021-01-21 01:33:47.598 [DEBUG] [ernal.api.model.PlugwiseHAController] - Found 7 Plugwise Home Automation appliance(s)
2021-01-21 01:33:52.600 [DEBUG] [rnal.handler.PlugwiseHABridgeHandler] - Refreshing the Plugwise Home Automation Controller plugwiseha:gateway:adam
2021-01-21 01:33:52.651 [DEBUG] [ernal.api.model.PlugwiseHAController] - Found 3 Plugwise Home Automation location(s)
2021-01-21 01:33:52.653 [DEBUG] [ernal.api.model.PlugwiseHAController] - Found 3 Plugwise Home Automation location(s)
2021-01-21 01:33:52.655 [DEBUG] [ernal.api.model.PlugwiseHAController] - Found 7 Plugwise Home Automation appliance(s)
2021-01-21 01:33:52.657 [DEBUG] [ernal.api.model.PlugwiseHAController] - Found 7 Plugwise Home Automation appliance(s)
2021-01-21 01:33:52.660 [DEBUG] [ernal.api.model.PlugwiseHAController] - Found 7 Plugwise Home Automation appliance(s)
2021-01-21 01:33:57.662 [DEBUG] [rnal.handler.PlugwiseHABridgeHandler] - Refreshing the Plugwise Home Automation Controller plugwiseha:gateway:adam
2021-01-21 01:33:58.154 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception: 
java.lang.NullPointerException: null
	at org.openhab.binding.plugwiseha.internal.api.model.dto.ActuatorFunctionality.compareDateWith(ActuatorFunctionality.java:88) ~[?:?]
	at org.openhab.binding.plugwiseha.internal.api.model.dto.ActuatorFunctionality.isOlderThan(ActuatorFunctionality.java:93) ~[?:?]
	at org.openhab.binding.plugwiseha.internal.api.model.dto.ActuatorFunctionalities.merge(ActuatorFunctionalities.java:65) ~[?:?]
	at org.openhab.binding.plugwiseha.internal.api.model.dto.Locations.merge(Locations.java:48) ~[?:?]
	at org.openhab.binding.plugwiseha.internal.api.model.dto.DomainObjects.mergeLocations(DomainObjects.java:59) ~[?:?]
	at org.openhab.binding.plugwiseha.internal.api.model.PlugwiseHAController.mergeDomainObjects(PlugwiseHAController.java:430) ~[?:?]
	at org.openhab.binding.plugwiseha.internal.api.model.PlugwiseHAController.getDomainObjects(PlugwiseHAController.java:221) ~[?:?]
	at org.openhab.binding.plugwiseha.internal.api.model.PlugwiseHAController.getUpdatedDomainObjects(PlugwiseHAController.java:229) ~[?:?]
	at org.openhab.binding.plugwiseha.internal.api.model.PlugwiseHAController.refresh(PlugwiseHAController.java:107) ~[?:?]
	at org.openhab.binding.plugwiseha.internal.handler.PlugwiseHABridgeHandler.refresh(PlugwiseHABridgeHandler.java:210) ~[?:?]
	at org.openhab.binding.plugwiseha.internal.handler.PlugwiseHABridgeHandler.run(PlugwiseHABridgeHandler.java:185) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:834) [?:?]

So the [found 3 plugwise home automation locations] & [found 7 plugwise home automation appliances] repeat itself every 5 seconds, but after this error that also stopped. But this morning at 6.46 my temperature was set to 20 degrees and that shows in the log. I tested a couple a minutes ago and setting the tempature still works.

2021-01-21 06:46:00.920 [DEBUG] [ternal.handler.PlugwiseHABaseHandler] - Handling command = 20 °C for channel = plugwiseha:zone:adam:PW_Woonkamer_zone:setpointTemperature
2021-01-21 06:46:00.922 [DEBUG] [ernal.api.model.PlugwiseHAController] - Found 3 Plugwise Home Automation location(s)

Here the graph from this night, so you can see what stops working and what still continues, “ketel status” (green bar) was mostly off this night but went on this morning although not visible, that item/thing also lost connection with the adam.

Strangely, it finds 3 locations and 7 applicances. But I don’t have 3 locations, only 2 (Kantoor & woonkamer) in the Adam. And I only have 4 appliances. In my livingroom I have: My isense thermostat, Tom & Smart plug. And in the office a Lisa.


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

2021-01-21 11:29:53.215 [WARN ] [e.jetty.util.thread.QueuedThreadPool] - QueuedThreadPool[OH-httpClient-common]@63e0f4ae{STOPPING,10<=0<=40,i=6,r=-1,q=0}[NO_TRY] Couldn't stop Thread[OH-httpClient-common-196,5,main]

2021-01-21 11:29:53.217 [WARN ] [e.jetty.util.thread.QueuedThreadPool] - QueuedThreadPool[OH-httpClient-common]@63e0f4ae{STOPPING,10<=0<=40,i=6,r=-1,q=0}[NO_TRY] Couldn't stop Thread[OH-httpClient-common-200,5,main]

This output always comes when I stop and start the binding (via karaf).

and after restart openhab or binding i mostly see one of my devices with status OFFLINE in the UI, and am able te restart it trought the button in the uprightcorner:

Status: 
OFFLINE
COMMUNICATION_ERROR
Error communicating with the Plugwise Home Automation controller

Thanks! that really helped, i have found the bug. Sorry i thought it was fixed in a previous version, but this is a different one. Anyway it was fixed and some other feedback from the PR was added too. I added a new release. I didn’t have time to test it. So hopefully it’s not broken :slight_smile:

Edit: Regarding the zone/appliance count. If possible share your XML: http://adam_ip/core/domain_objects
Don’t forget the boiler and there are some pseudo appliances. The XML should explain it all.

1 Like

thanks, i will test this today :smiley: I’m really doubting my installation though. I upgraded to the Testing version, wanted to go back to the normal version to check if the problem was gone with plugwise but I can’t go back. But when I log via SSH I see “3.0.0 - Release Build”, I thing it should be 3.0.1 - testing build xxxx or such thing.

I found the XML, it’s verry large, how would you like me to send it to you?

[edit] - it’s runnig now, had to stop start a couple of items via UI but it’s working. I will let you know if it’s stable :slight_smile:

What does your SSH login say? you also run the Testing version I remembered?

No problems anymore! Looks stable, nice work! thanks!

I’m using multiple versions for testing, mostly snapshot releases. My production environment is 2.5.x because the envoy binding isn’t available in 3.0 (yet), Hilbrand is working on that.

The binding is getting in a better shape now. If anything is wrong, unstable or if you need special functionality let me know.

1 Like

I found a minor bug. When Openhab (3.0.1) starts, the binding gives an error, see below. After that, some things remain in [ERROR COMM) in the main UI (error communicating with the plugwise home automation controller). The items also never receive an update. A simple disable enable the involving thing, solves the problem. It looks like it’s mosly or alway the Tom or one of my 2 Zones.

My 2 things involving the Error Comm:

Thing zone                      PW_Woonkamer_zone           "Woonkamer"             @ "Woonkamer"       [ id="xxxxxxxxxxxxxxxxxxxxxxxxxxxxx" ]
Thing appliance_valve           PW_TomWoonkamer             "Tom"                   @ "Woonkamer"       [ id="xxxxxxxxxxxxxxxxxxxxxx" ] 

The Error:

2021-01-31 12:03:13.247 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.thingUpdated()' on 'org.openhab.binding.plugwiseha.internal.handler.PlugwiseHAApplianceHandler@594ee784': null

java.lang.NullPointerException: null

	at org.openhab.binding.plugwiseha.internal.handler.PlugwiseHAApplianceHandler.thingUpdated(PlugwiseHAApplianceHandler.java:131) ~[?:?]

	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]

	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]

	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]

	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]

	at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]

	at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]

	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]

	at java.lang.Thread.run(Thread.java:834) [?:?]

[Feature request]
Is it possible to implement the modulation from the boiler? Nice to see how much the gas throttle is opened :smiley:

I added 12 channels to the boiler (all i could find) and fixed the NPE. Because i’m busy recabling my house, my openhab is down and unable to test this. So i’ll be back next week with an updated version.

Great! Take your time. No worries😊

Nice extra’s!

The binding doesn’t work for me unfortunately. When I set one of my zones from 15 to 21 degrees, the setpoint changes back to the original state: 15 degrees but in the Plugwise App the temperature setpoint stays at 21 degrees. I waited a minute or so but it doesn’t update.

Also the modulation doens’t update anything and stays at 0. The temperatures from the boiler are loaded 1 time and don’t change.

Here is my TRACE log from the time of installing the binding:

https://drive.google.com/file/d/1q-_X28xrobOOO1sBQLV2ClIENx7ls0f9/view?usp=sharing

(15:10 > replaced the file with one with some more info in it)

By the way. The binding filename is 3.1.0-Snapshot, But I think that should be 3.0.1-SNAPHOT :slight_smile:

(I reverted to the previous binding, this one has OFFLINE - ONLINE status changes for the things every x minutes but works good in showing and setting temperatures).

Stale value’s should be fixed now. It is a 3.1.0 snapshot, that is how it should be. I have my openhab up and running again. All looks fine for the moment.

1 Like

Thanks for the quick update! I updated the previous one and all the values are updated instant. Should be fine as it runs good on your system :slight_smile:

So I should see the 3.1.0-snapshot as > for future 3.1.0 version? Didn’t know that, thought it might be a typo :slight_smile:

Running for 10 days now with no problems. This version is rocksolid and lots of features!

Thanks, same here. Just waiting for it to get picked up and merged by the maintainers.

Hi,

First off, thanks a lot for keeping this binding alive! :slight_smile:
I have upgraded my openhab instance today to openhab3. Almos everything seems to be working out fine. I only seem to be impacted by the same (similar) UoM issue that has been report above. I am using an Anna thermostat in the metric system (not sure if this matters).

The setpoint temperature is working nicely. But the current (real) temperature is off. It reports -7.5 C where it should have been ~ 18 C.

I tried with the first openhab 3 release of this binding, and for that binding, both setpoint and real temperature were off. Seems that only the set temperature has been fixed. Could this be the case?

Thanks a bunch!
Maarten