Drayton Wiser Thermostat Binding

I have the same problem. Open HAB was installed in the last week, on the surface all looks well, but I noticed several times when I have walked past the Wiser Hub, it was RED. It is certainly related to the OH being connected. Before I started using OH I had never seen the hub go RED except when the router was being rebooted.

I am wondering if the hub gets defensive when a message exchange does not complete in time and OH is not responding quickly enough and so goes off line and resets the WIFI, this give rise to the entries in the log.

2020-05-25 22:07:11.776 [hingStatusInfoChangedEvent] - 'draytonwiser:room:WiserHeat02851D:hall' changed from OFFLINE (BRIDGE_OFFLINE) to ONLINE
2020-05-25 22:07:11.781 [hingStatusInfoChangedEvent] - 'draytonwiser:boiler-controller:WiserHeat02851D:controller' changed from OFFLINE (BRIDGE_OFFLINE) to ONLINE
2020-05-25 22:07:11.784 [hingStatusInfoChangedEvent] - 'draytonwiser:itrv:WiserHeat02851D:90FD9FFFFEC37F74' changed from OFFLINE (BRIDGE_OFFLINE) to ONLINE
2020-05-25 22:07:11.787 [hingStatusInfoChangedEvent] - 'draytonwiser:hotwater:WiserHeat02851D:controller' changed from OFFLINE (BRIDGE_OFFLINE) to ONLINE

Mine still does this I am almost at point of giving up with Open HAB. Drayton Wiser binding was the only reason for selecting OpenHAB. It is a shame that this great work seems to have not quite crossed the finish line for some.

In order for the binding being merged I made some changes to the binding code and also reorganized some of it’s internals to be a bit more robust. The kar file can be found here: https://github.com/Hilbrand/openhab-addons/releases/tag/draytonwiser You can drop the file in the addons folder to test. If you will test it I can work on any issues to get the binding completed.

Thanks for the reply, I will drop the code in tonight and run it up over the next few days and keep an eye on the Wiser hub to see if it has improved.

I dropped in the new kar file to see if it would improve the “red-lighting” of the heathub.

With the new kar file just getting cast errors instead.

Openhab v2.5.5
Wiser binding v2.5.6.202006102129

Have switched back for now

Thank you for your help on this.

Thanks for testing. I fixed the issue and uploaded a new kar file.

No Problem happy to help if it gets the job done.

Loaded a fresh openhabian onto a SD card last night so the start is clean for today. I used the kar file i downloaded yesterday as a starting point. I will download the latest and use that once I have checked everything is there on this clean install, no other bindings will be added.

Observations on binding-draytonwiser - 2.5.6.SNAPSHOT so far:

  1. The hub was detected but the search for things was not automatic as before
  2. Before I had even had chance to manually add things this is in the event log
2020-06-12 11:09:48.128 [hingStatusInfoChangedEvent] - 'draytonwiser:heathub:WiserHeat02851D' changed from UNINITIALIZED (HANDLER_CONFIGURATION_PENDING) to INITIALIZING
2020-06-12 11:09:48.213 [hingStatusInfoChangedEvent] - 'draytonwiser:heathub:WiserHeat02851D' changed from INITIALIZING to UNKNOWN
2020-06-12 11:09:49.942 [hingStatusInfoChangedEvent] - 'draytonwiser:heathub:WiserHeat02851D' changed from UNKNOWN to ONLINE
2020-06-12 11:09:49.948 [me.event.ThingUpdatedEvent] - Thing 'draytonwiser:heathub:WiserHeat02851D' has been updated.
2020-06-12 11:20:16.002 [hingStatusInfoChangedEvent] - 'draytonwiser:boiler-controller:92516180' changed from UNINITIALIZED to INITIALIZING
2020-06-12 11:20:16.035 [hingStatusInfoChangedEvent] - 'draytonwiser:boiler-controller:92516180' changed from INITIALIZING to UNKNOWN
2020-06-12 11:20:16.162 [hingStatusInfoChangedEvent] - 'draytonwiser:heathub:WiserHeat02851D' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Cannot cast org.eclipse.smarthome.core.thing.internal.ThingImpl to org.openhab.binding.draytonwiser.internal.DraytonWiserRefreshListener
2020-06-12 11:20:16.165 [hingStatusInfoChangedEvent] - 'draytonwiser:boiler-controller:92516180' changed from UNKNOWN to OFFLINE (BRIDGE_OFFLINE)
2020-06-12 11:20:54.561 [hingStatusInfoChangedEvent] - 'draytonwiser:heathub:WiserHeat02851D' changed from OFFLINE (COMMUNICATION_ERROR): Cannot cast org.eclipse.smarthome.core.thing.internal.ThingImpl to org.openhab.binding.draytonwiser.internal.DraytonWiserRefreshListener to ONLINE
2020-06-12 11:20:54.567 [hingStatusInfoChangedEvent] - 'draytonwiser:boiler-controller:92516180' changed from OFFLINE (BRIDGE_OFFLINE) to UNKNOWN
2020-06-12 11:20:54.571 [hingStatusInfoChangedEvent] - 'draytonwiser:heathub:WiserHeat02851D' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Cannot cast org.eclipse.smarthome.core.thing.internal.ThingImpl to org.openhab.binding.draytonwiser.internal.DraytonWiserRefreshListener
2020-06-12 11:20:54.575 [hingStatusInfoChangedEvent] - 'draytonwiser:boiler-controller:92516180' changed from UNKNOWN to OFFLINE (BRIDGE_OFFLINE)
2020-06-12 11:21:55.257 [hingStatusInfoChangedEvent] - 'draytonwiser:heathub:WiserHeat02851D' changed from OFFLINE (COMMUNICATION_ERROR): Cannot cast org.eclipse.smarthome.core.thing.internal.ThingImpl to org.openhab.binding.draytonwiser.internal.DraytonWiserRefreshListener to ONLINE
2020-06-12 11:21:55.261 [hingStatusInfoChangedEvent] - 'draytonwiser:boiler-controller:92516180' changed from OFFLINE (BRIDGE_OFFLINE) to UNKNOWN
2020-06-12 11:21:55.264 [hingStatusInfoChangedEvent] - 'draytonwiser:heathub:WiserHeat02851D' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Cannot cast org.eclipse.smarthome.core.thing.internal.ThingImpl to org.openhab.binding.draytonwiser.internal.DraytonWiserRefreshListener
2020-06-12 11:21:55.268 [hingStatusInfoChangedEvent] - 'draytonwiser:boiler-controller:92516180' changed from UNKNOWN to OFFLINE (BRIDGE_OFFLINE)
2020-06-12 11:22:54.907 [hingStatusInfoChangedEvent] - 'draytonwiser:heathub:WiserHeat02851D' changed from OFFLINE (COMMUNICATION_ERROR): Cannot cast org.eclipse.smarthome.core.thing.internal.ThingImpl to org.openhab.binding.draytonwiser.internal.DraytonWiserRefreshListener to ONLINE
2020-06-12 11:22:54.910 [hingStatusInfoChangedEvent] - 'draytonwiser:boiler-controller:92516180' changed from OFFLINE (BRIDGE_OFFLINE) to UNKNOWN
2020-06-12 11:22:54.913 [hingStatusInfoChangedEvent] - 'draytonwiser:heathub:WiserHeat02851D' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Cannot cast org.eclipse.smarthome.core.thing.internal.ThingImpl to org.openhab.binding.draytonwiser.internal.DraytonWiserRefreshListener
2020-06-12 11:22:54.915 [hingStatusInfoChangedEvent] - 'draytonwiser:boiler-controller:92516180' changed from UNKNOWN to OFFLINE (BRIDGE_OFFLINE)
2020-06-12 11:23:55.801 [hingStatusInfoChangedEvent] - 'draytonwiser:heathub:WiserHeat02851D' changed from OFFLINE (COMMUNICATION_ERROR): Cannot cast org.eclipse.smarthome.core.thing.internal.ThingImpl to org.openhab.binding.draytonwiser.internal.DraytonWiserRefreshListener to ONLINE
2020-06-12 11:23:55.804 [hingStatusInfoChangedEvent] - 'draytonwiser:boiler-controller:92516180' changed from OFFLINE (BRIDGE_OFFLINE) to UNKNOWN
2020-06-12 11:23:55.808 [hingStatusInfoChangedEvent] - 'draytonwiser:heathub:WiserHeat02851D' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Cannot cast org.eclipse.smarthome.core.thing.internal.ThingImpl to org.openhab.binding.draytonwiser.internal.DraytonWiserRefreshListener
2020-06-12 11:23:55.810 [hingStatusInfoChangedEvent] - 'draytonwiser:boiler-controller:92516180' changed from UNKNOWN to OFFLINE (BRIDGE_OFFLINE)```

When uninstalling the binding, it fails to cleanly uninstall leaving the binding visible and the wait icon just circling on the addons/binding page of paperui. Here are the new lines added to the event log

2020-06-12 11:31:21.195 [hingStatusInfoChangedEvent] - 'draytonwiser:boiler-controller:92516180' changed from REMOVING to REMOVED
2020-06-12 11:31:21.211 [hingStatusInfoChangedEvent] - 'draytonwiser:boiler-controller:92516180' changed from REMOVED to UNINITIALIZED
2020-06-12 11:31:21.253 [hingStatusInfoChangedEvent] - 'draytonwiser:boiler-controller:92516180' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
2020-06-12 11:31:27.914 [hingStatusInfoChangedEvent] - 'draytonwiser:heathub:WiserHeat02851D' changed from OFFLINE (COMMUNICATION_ERROR): Cannot cast org.eclipse.smarthome.core.thing.internal.ThingImpl to org.openhab.binding.draytonwiser.internal.DraytonWiserRefreshListener to REMOVING
2020-06-12 11:31:27.921 [hingStatusInfoChangedEvent] - 'draytonwiser:heathub:WiserHeat02851D' changed from REMOVING to REMOVED
2020-06-12 11:31:27.927 [hingStatusInfoChangedEvent] - 'draytonwiser:heathub:WiserHeat02851D' changed from REMOVED to UNINITIALIZED
2020-06-12 11:31:27.960 [hingStatusInfoChangedEvent] - 'draytonwiser:heathub:WiserHeat02851D' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)```

Yes please use the latest version. The log you added shows the specific bug I fixed.

It is in and so far running. I am getting a communications error to a Room, but to be fair, the room has been defined as per the wiser app, but does not have any TRV assigned as I do not have the serial number to hand. The auto detection solved this issue, is this a bug or has auto detect been removed?

Can you post the error.

Auto detection has not been removed. I’ve added some debug logging to the binding and uploaded a new kar file. If you enable debug level (log:set DEBUG org.openhab.binding.draytonwiser) and trigger discovery you should see it should find devices.

The room now has the TRV assigned and I can see the TRV fine. The Room is showing in the control panel and has temperatures, but remains as OFFLINE (COMMUNICATION_ERROR) in the Thing panel.


2020-06-12 13:07:49.069 [me.event.ThingUpdatedEvent] - Thing 'draytonwiser:room:692c25a1' has been updated.

2020-06-12 13:07:50.092 [hingStatusInfoChangedEvent] - 'draytonwiser:room:692c25a1' changed from UNKNOWN to OFFLINE (COMMUNICATION_ERROR)

Where do I enable the debug? And what is the cleanest way to load the new kar file? uninstall/reinstall or just copy it in and restart?

Thanks for your help it is starting to look a little more promising.

You can enable debug in the karaf console.

Enabling debug should also give more information about the off line problem of the room.

Remove the file and check the log it has been uninstalled. And then you can put in the new kar file. It should not be needed to restart. Although sometimes when working with updated files manually cleaning cache and tmp and restart might be the safest. But you can always try that if at one point a updated kar file causes errors.

Didn’t even get to the new kar file and this appears in the log

java.lang.NullPointerException: null
        at org.openhab.binding.draytonwiser.internal.handler.RoomHandler.getHumidity(RoomHandler.java:129) ~[?:?]
        at org.openhab.binding.draytonwiser.internal.handler.DraytonWiserThingHandler.updateState(DraytonWiserThingHandler.java:131) ~[?:?]
        at org.openhab.binding.draytonwiser.internal.handler.RoomHandler.refresh(RoomHandler.java:94) ~[?:?]
        at org.openhab.binding.draytonwiser.internal.handler.DraytonWiserThingHandler.onRefresh(DraytonWiserThingHandler.java:103) ~[?:?]
        at org.openhab.binding.draytonwiser.internal.handler.HeatHubHandler.lambda$5(HeatHubHandler.java:166) ~[?:?]
        at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[?:1.8.0_252]
        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:1.8.0_252]
        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:1.8.0_252]
        at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) ~[?:1.8.0_252]
        at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) ~[?:1.8.0_252]
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[?:1.8.0_252]
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) ~[?:1.8.0_252]
        at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[?:1.8.0_252]
        at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[?:1.8.0_252]
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_252]
        at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485) ~[?:1.8.0_252]
        at org.openhab.binding.draytonwiser.internal.handler.HeatHubHandler.notifyListeners(HeatHubHandler.java:166) ~[?:?]
        at org.openhab.binding.draytonwiser.internal.handler.HeatHubHandler.actualRefresh(HeatHubHandler.java:120) ~[?:?]
        at org.eclipse.smarthome.core.cache.ExpiringCache.refreshValue(ExpiringCache.java:101) ~[?:?]
        at org.eclipse.smarthome.core.cache.ExpiringCache.getValue(ExpiringCache.java:72) ~[?:?]
        at org.openhab.binding.draytonwiser.internal.handler.HeatHubHandler.refresh(HeatHubHandler.java:101) ~[?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_252]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_252]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_252]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:1.8.0_252]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_252]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_252]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_252]
2020-06-12 13:55:10.410 [DEBUG] [iser.internal.handler.HeatHubHandler] - Finished refreshing devices

And with the new kar and a search these messages arrive just before the exception, it ties with what I saw initially that the hub was found okay but no connected devices.

2020-06-12 14:14:10.784 [DEBUG] [DraytonWiserMDNSDiscoveryParticipant] - Discovered Heat Hub 'WiserHeat02851D' with uid: draytonwiser:heathub:WiserHeat02851D
2020-06-12 14:14:21.641 [DEBUG] [iser.internal.handler.HeatHubHandler] - Refreshing devices
2020-06-12 14:14:21.644 [DEBUG] [onwiser.internal.api.DraytonWiserApi] - Sending message to heathub: data/domain/
2020-06-12 14:14:21.798 [DEBUG] [onwiser.internal.api.DraytonWiserApi] - Sending message to heathub: data/network/Station/
2020-06-12 14:14:21.848 [DEBUG] [onwiser.internal.handler.RoomHandler] - Exception occurred during refresh: null```

I’ve updated the kar. It could not find the humidity value. I’ve also added an extra logging on level TRACE that will return the raw result returned by the api. If you think it’s missing some data or doesn’t report all data in channels you can send me the log via DM.

Did you get the message not sure it went!!

When I manually try to link the humidity manually there is a server 500 error popup on the PaperUI

The 500 error is probably unrelated to the binding. Maybe the logging shows any additional information. It just looks like humidity is not available on your devices or isn’t reported.