New Z-Way Binding

Hi @Oliver_Roed_Scholer, thanks for your feedback. I’m already working on it …

I’ve solved the problem of missing configuration :slight_smile:.

Please try the new version of Z-Way Binding (no longer up to date, the latest version is linked in the pull request): @stein_tore_tosse, @Oliver_Roed_Scholer, @mike_mccaffery

Thanks again for the hints. Since the conversion to the JSONDB, the configuration object delivers BigDecimal instead of Integer.

The problem with failed read out of configuration still does not seem to be solved. Please wait with the tests.

Thanks for the fast answer. It seems like it fails to load the instances (that should be the configuration as you say?)

If it helps here is my log

> 2016-12-05 13:41:56.139 [INFO ] [nding.zway.handler.ZWayBridgeHandler] - Initializing Z-Way bridge ...
> 2016-12-05 13:41:56.276 [INFO ] [nding.zway.handler.ZWayBridgeHandler] - Z-Way bridge successfully authenticated
> 2016-12-05 13:41:56.318 [WARN ] [nding.zway.handler.ZWayBridgeHandler] - Z-Way library - Forbidden (HTTP status code: 403).
> 2016-12-05 13:41:56.320 [WARN ] [nding.zway.handler.ZWayBridgeHandler] - Instances not loaded
> 2016-12-05 13:41:56.499 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at /start
> 2016-12-05 13:41:56.553 [INFO ] [basic.internal.servlet.WebAppServlet] - Started Basic UI at /basicui/app
> 2016-12-05 13:41:56.580 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /ui
> 2016-12-05 13:41:56.602 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
> 2016-12-05 13:42:18.356 [INFO ] [discovery.ZWayBridgeDiscoveryService] - (DiscoverySuccess) Z-Way server found on host: 192.168.1.49
> 2016-12-05 13:42:31.912 [INFO ] [discovery.ZWayBridgeDiscoveryService] - (DiscoverySuccess) Z-Way server found on host: 192.168.1.132

In your case, it looks as if the Z-Way user does not have administrator rights. This message I have not seen yet. Can you check which Z-Way user you are using and what rights it has.

Bravo. The bridge now works. It was because of the admin rights. Id suggest you addded a warning in openhab to deal with frustration. I have another error though. I have some Danfoss Thermostats that it discovers just fine but it fails to connect.

Status: OFFLINE - CONFIGURATION_PENDING Checking configuration and bridge…

This is the error

2016-12-05 15:25:42.643 [ERROR] [ome.core.thing.internal.ThingManager] - Exception occured while calling thing updated at ThingHandler 'org.openhab.binding.zway.handler.ZWayZWaveDeviceHandler@e39be6: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.math.BigDecimal
java.util.concurrent.ExecutionException: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.math.BigDecimal
	at java.util.concurrent.FutureTask.report(Unknown Source)[:1.8.0_101]
	at java.util.concurrent.FutureTask.get(Unknown Source)[:1.8.0_101]
	at org.eclipse.smarthome.core.common.SafeMethodCaller.callAsynchronous(SafeMethodCaller.java:186)[96:org.eclipse.smarthome.core:0.9.0.b1]
	at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:79)[96:org.eclipse.smarthome.core:0.9.0.b1]
	at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:63)[96:org.eclipse.smarthome.core:0.9.0.b1]
	at org.eclipse.smarthome.core.thing.internal.ThingManager.thingUpdated(ThingManager.java:556)[102:org.eclipse.smarthome.core.thing:0.9.0.b1]
	at org.eclipse.smarthome.core.thing.internal.ThingRegistryImpl.notifyTrackers(ThingRegistryImpl.java:226)[102:org.eclipse.smarthome.core.thing:0.9.0.b1]
	at org.eclipse.smarthome.core.thing.internal.ThingRegistryImpl.notifyListenersAboutUpdatedElement(ThingRegistryImpl.java:149)[102:org.eclipse.smarthome.core.thing:0.9.0.b1]
	at org.eclipse.smarthome.core.thing.internal.ThingRegistryImpl.notifyListenersAboutUpdatedElement(ThingRegistryImpl.java:1)[102:org.eclipse.smarthome.core.thing:0.9.0.b1]
	at org.eclipse.smarthome.core.common.registry.AbstractRegistry.updated(AbstractRegistry.java:167)[96:org.eclipse.smarthome.core:0.9.0.b1]
	at org.eclipse.smarthome.core.common.registry.AbstractProvider.notifyListeners(AbstractProvider.java:57)[96:org.eclipse.smarthome.core:0.9.0.b1]
	at org.eclipse.smarthome.core.common.registry.AbstractProvider.notifyListenersAboutUpdatedElement(AbstractProvider.java:82)[96:org.eclipse.smarthome.core:0.9.0.b1]
	at org.eclipse.smarthome.core.common.registry.AbstractManagedProvider.update(AbstractManagedProvider.java:134)[96:org.eclipse.smarthome.core:0.9.0.b1]
	at org.eclipse.smarthome.config.discovery.internal.PersistentInbox.add(PersistentInbox.java:201)[93:org.eclipse.smarthome.config.discovery:0.9.0.b1]
	at org.eclipse.smarthome.config.discovery.internal.PersistentInbox.thingDiscovered(PersistentInbox.java:289)[93:org.eclipse.smarthome.config.discovery:0.9.0.b1]
	at org.eclipse.smarthome.config.discovery.internal.DiscoveryServiceRegistryImpl$2.run(DiscoveryServiceRegistryImpl.java:268)[93:org.eclipse.smarthome.config.discovery:0.9.0.b1]
	at org.eclipse.smarthome.config.discovery.internal.DiscoveryServiceRegistryImpl$2.run(DiscoveryServiceRegistryImpl.java:1)[93:org.eclipse.smarthome.config.discovery:0.9.0.b1]
	at java.security.AccessController.doPrivileged(Native Method)[:1.8.0_101]
	at org.eclipse.smarthome.config.discovery.internal.DiscoveryServiceRegistryImpl.thingDiscovered(DiscoveryServiceRegistryImpl.java:265)[93:org.eclipse.smarthome.config.discovery:0.9.0.b1]
	at org.eclipse.smarthome.config.discovery.AbstractDiscoveryService.thingDiscovered(AbstractDiscoveryService.java:253)[93:org.eclipse.smarthome.config.discovery:0.9.0.b1]
	at org.openhab.binding.zway.internal.discovery.ZWayDeviceDiscoveryService.scan(ZWayDeviceDiscoveryService.java:141)[209:org.openhab.binding.zway:2.0.0.201612051004]
	at org.openhab.binding.zway.internal.discovery.ZWayDeviceDiscoveryService.access$0(ZWayDeviceDiscoveryService.java:57)[209:org.openhab.binding.zway:2.0.0.201612051004]
	at org.openhab.binding.zway.internal.discovery.ZWayDeviceDiscoveryService$ZWayDeviceScan.run(ZWayDeviceDiscoveryService.java:215)[209:org.openhab.binding.zway:2.0.0.201612051004]
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)[:1.8.0_101]
	at java.util.concurrent.FutureTask.runAndReset(Unknown Source)[:1.8.0_101]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)[:1.8.0_101]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)[:1.8.0_101]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)[:1.8.0_101]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)[:1.8.0_101]
	at java.lang.Thread.run(Unknown Source)[:1.8.0_101]
Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.math.BigDecimal
	at org.openhab.binding.zway.handler.ZWayZWaveDeviceHandler.loadAndCheckConfiguration(ZWayZWaveDeviceHandler.java:162)[209:org.openhab.binding.zway:2.0.0.201612051004]
	at org.openhab.binding.zway.handler.ZWayZWaveDeviceHandler.initialize(ZWayZWaveDeviceHandler.java:138)[209:org.openhab.binding.zway:2.0.0.201612051004]
	at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.thingUpdated(BaseThingHandler.java:184)[102:org.eclipse.smarthome.core.thing:0.9.0.b1]
	at org.eclipse.smarthome.core.thing.internal.ThingManager$6.call(ThingManager.java:560)[102:org.eclipse.smarthome.core.thing:0.9.0.b1]
	at org.eclipse.smarthome.core.thing.internal.ThingManager$6.call(ThingManager.java:1)[102:org.eclipse.smarthome.core.thing:0.9.0.b1]
	at org.eclipse.smarthome.core.common.SafeMethodCaller$CallableWrapper.call(SafeMethodCaller.java:177)[96:org.eclipse.smarthome.core:0.9.0.b1]
	at java.util.concurrent.FutureTask.run(Unknown Source)[:1.8.0_101]
	... 3 more
2016-12-05 15:25:43.628 [ERROR] [ome.core.thing.internal.ThingManager] - Exception occured while calling thing updated at ThingHandler 'org.openhab.binding.zway.handler.ZWayZWaveDeviceHandler@10f299f: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.math.BigDecimal
java.util.concurrent.ExecutionException: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.math.BigDecimal
	at java.util.concurrent.FutureTask.report(Unknown Source)[:1.8.0_101]
	at java.util.concurrent.FutureTask.get(Unknown Source)[:1.8.0_101]
	at org.eclipse.smarthome.core.common.SafeMethodCaller.callAsynchronous(SafeMethodCaller.java:186)[96:org.eclipse.smarthome.core:0.9.0.b1]
	at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:79)[96:org.eclipse.smarthome.core:0.9.0.b1]
	at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:63)[96:org.eclipse.smarthome.core:0.9.0.b1]
	at org.eclipse.smarthome.core.thing.internal.ThingManager.thingUpdated(ThingManager.java:556)[102:org.eclipse.smarthome.core.thing:0.9.0.b1]
	at org.eclipse.smarthome.core.thing.internal.ThingRegistryImpl.notifyTrackers(ThingRegistryImpl.java:226)[102:org.eclipse.smarthome.core.thing:0.9.0.b1]
	at org.eclipse.smarthome.core.thing.internal.ThingRegistryImpl.notifyListenersAboutUpdatedElement(ThingRegistryImpl.java:149)[102:org.eclipse.smarthome.core.thing:0.9.0.b1]
	at org.eclipse.smarthome.core.thing.internal.ThingRegistryImpl.notifyListenersAboutUpdatedElement(ThingRegistryImpl.java:1)[102:org.eclipse.smarthome.core.thing:0.9.0.b1]
	at org.eclipse.smarthome.core.common.registry.AbstractRegistry.updated(AbstractRegistry.java:167)[96:org.eclipse.smarthome.core:0.9.0.b1]
	at org.eclipse.smarthome.core.common.registry.AbstractProvider.notifyListeners(AbstractProvider.java:57)[96:org.eclipse.smarthome.core:0.9.0.b1]
	at org.eclipse.smarthome.core.common.registry.AbstractProvider.notifyListenersAboutUpdatedElement(AbstractProvider.java:82)[96:org.eclipse.smarthome.core:0.9.0.b1]
	at org.eclipse.smarthome.core.common.registry.AbstractManagedProvider.update(AbstractManagedProvider.java:134)[96:org.eclipse.smarthome.core:0.9.0.b1]
	at org.eclipse.smarthome.config.discovery.internal.PersistentInbox.add(PersistentInbox.java:201)[93:org.eclipse.smarthome.config.discovery:0.9.0.b1]
	at org.eclipse.smarthome.config.discovery.internal.PersistentInbox.thingDiscovered(PersistentInbox.java:289)[93:org.eclipse.smarthome.config.discovery:0.9.0.b1]
	at org.eclipse.smarthome.config.discovery.internal.DiscoveryServiceRegistryImpl$2.run(DiscoveryServiceRegistryImpl.java:268)[93:org.eclipse.smarthome.config.discovery:0.9.0.b1]
	at org.eclipse.smarthome.config.discovery.internal.DiscoveryServiceRegistryImpl$2.run(DiscoveryServiceRegistryImpl.java:1)[93:org.eclipse.smarthome.config.discovery:0.9.0.b1]
	at java.security.AccessController.doPrivileged(Native Method)[:1.8.0_101]
	at org.eclipse.smarthome.config.discovery.internal.DiscoveryServiceRegistryImpl.thingDiscovered(DiscoveryServiceRegistryImpl.java:265)[93:org.eclipse.smarthome.config.discovery:0.9.0.b1]
	at org.eclipse.smarthome.config.discovery.AbstractDiscoveryService.thingDiscovered(AbstractDiscoveryService.java:253)[93:org.eclipse.smarthome.config.discovery:0.9.0.b1]
	at org.openhab.binding.zway.internal.discovery.ZWayDeviceDiscoveryService.scan(ZWayDeviceDiscoveryService.java:141)[209:org.openhab.binding.zway:2.0.0.201612051004]
	at org.openhab.binding.zway.internal.discovery.ZWayDeviceDiscoveryService.access$0(ZWayDeviceDiscoveryService.java:57)[209:org.openhab.binding.zway:2.0.0.201612051004]
	at org.openhab.binding.zway.internal.discovery.ZWayDeviceDiscoveryService$ZWayDeviceScan.run(ZWayDeviceDiscoveryService.java:215)[209:org.openhab.binding.zway:2.0.0.201612051004]
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)[:1.8.0_101]
	at java.util.concurrent.FutureTask.runAndReset(Unknown Source)[:1.8.0_101]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)[:1.8.0_101]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)[:1.8.0_101]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)[:1.8.0_101]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)[:1.8.0_101]
	at java.lang.Thread.run(Unknown Source)[:1.8.0_101]
Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.math.BigDecimal
	at org.openhab.binding.zway.handler.ZWayZWaveDeviceHandler.loadAndCheckConfiguration(ZWayZWaveDeviceHandler.java:162)[209:org.openhab.binding.zway:2.0.0.201612051004]
	at org.openhab.binding.zway.handler.ZWayZWaveDeviceHandler.initialize(ZWayZWaveDeviceHandler.java:138)[209:org.openhab.binding.zway:2.0.0.201612051004]
	at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.thingUpdated(BaseThingHandler.java:184)[102:org.eclipse.smarthome.core.thing:0.9.0.b1]
	at org.eclipse.smarthome.core.thing.internal.ThingManager$6.call(ThingManager.java:560)[102:org.eclipse.smarthome.core.thing:0.9.0.b1]
	at org.eclipse.smarthome.core.thing.internal.ThingManager$6.call(ThingManager.java:1)[102:org.eclipse.smarthome.core.thing:0.9.0.b1]
	at org.eclipse.smarthome.core.common.SafeMethodCaller$CallableWrapper.call(SafeMethodCaller.java:177)[96:org.eclipse.smarthome.core:0.9.0.b1]
	at java.util.concurrent.FutureTask.run(Unknown Source)[:1.8.0_101]
	... 3 more

Please try again with new version of Z-Way Binding (no longer up to date, the latest version is linked in the pull request). I hope the configuration is read correctly now.

I have some issues with the snapshot im using. What version are you running? @pathec

Latest snapshot from today.

It seems to stay online but the snapshot added items? The channels arent enabled by default and to enable i have to link it with an item but when i press + it doesnt do anything. How do i configure this?

Edit: I enabled simple mode in settings and it works
Edit: Thank you very much for making this binding. It is very easy to use and i love that i can connect to the zwave controller from the openhab server. GREAT work!

Hi @pathec! I’ve now started testing on the latest binding.
So far it seems good, I’ve connected a couple of lights and a motion sensor through the binding so far.

Will let you know how it works out in a couple of days.

All working fine for me as discussed…

I’ve added and removed bridges, things. links and items… all work flawlessly that I can see. Defined rules all work as expected using item updated…

Polling also now fixed…

Sooner the PR gets merged the better in my view.

M

Thanks for creating the z-way binding. i am reading here https://github.com/pathec/openhab2-addons/blob/zway-binding/addons/binding/org.openhab.binding.zway/README.md that “… rollershutter - will be implemented soon …”

Do you already have a timeline when you going to support rollershutters?

Hi,

I’ve added the support for rollershutter in a separate build. It would be great if you could test that. I’ve added a new channel type for blinds and the commands startDown(), startUp() and stop(). I can’t test this, but it should work.

I’ve created a workaround to the thermostat modes. Because the thermostat modes are not mapped correctly in the virtual abstraction layer of Z-Way, only as a binary switch. Therefore, I’ve connected the ZWaveAPI (used by the ExpertUI of Z-Way). From the latest version (see pull pequest), an additional channel is added to the thermostat. First I wanted to create a selection list with possible modes, but unfortunately it can’t be created dynamically and must be defined in the XML description. Thus, only the input of the number of the mode has been given (0, 1, 11, 31). I hope the support in the virtual abstraction layer of Z-Way is done soon.

Hi there!

Nice work with the binding Patrick!
Everything is working right, but I do have a small problem…
I’m very new to the z-wave stuff and only started playing with z-wave and openhab roughly 3 weeks ago.
I have a Raspberry Pi, a Razberry dauther board, Z-Wave.me server, OpenHAB2 and 4 Danfos thermostats.
Up until yesterday, I could see the battery info from the thermostats in OpenHAB, but yesterday I made a apt-get upgrade. OpenHAB was upgraded to latest snapshot offline and I also upgraded your binding.
Right now, I cannot see the battery levels of the thermostats.
Any idea what can be wrong?
I have set up OpenHAB to log the debug messages from zway binding separately so I can provide the file if needed.
.items:

Number Bedroom_Thermostat_Temperature "Temperature [%.1f °C]" <temperature> (Danfoss, Bedroom, Temperature) {channel="zway:zwayDevice:192_168_200_202:6:thermostatSetPoint-ZWayVDev_zway_6-0-67-1"}
Number Bedroom_Thermostat_Battery "Battery [%.1f %%]" <battery> (Danfoss, Bedroom, Battery) {channel="zway:zwayDevice:192_168_200_202:6:battery-ZWayVDev_zway_6-0-128"}

and in the log files I have:

2016-12-07 14:22:40.254 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate update '91' for item 'Bedroom_Thermostat_Battery' to handler for channel 'zway:zwayDevice:192_168_200_202:6:battery-ZWayVDev_zway_6-0-128', because no thing with the UID 'zway:zwayDevice:192_168_200_202:6' could be found.
2016-12-07 14:22:40.287 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate update '25.5' for item 'Bedroom_Thermostat_Temperature' to handler for channel 'zway:zwayDevice:192_168_200_202:6:thermostatSetPoint-ZWayVDev_zway_6-0-67-1', because no thing with the UID 'zway:zwayDevice:192_168_200_202:6' could be found.

In the new jsondb file I have the following definitions from the bedroom thermostat:

 "zway:zwayDevice:192_168_200_202:6": {
    "class": "org.eclipse.smarthome.core.thing.internal.ThingImpl",
    "value": {
      "label": "Bedroom Thermostat (Danfoss)",
      "bridgeUID": {
        "segments": [
          "zway",
          "zwayServer",
          "192_168_200_202"
        ]
      },
      "channels": [
        {
          "acceptedItemType": "Number",
          "kind": "STATE",
          "uid": {
            "segments": [
              "zway",
              "zwayDevice",
              "192_168_200_202",
              "6",
              "thermostatSetPoint-ZWayVDev_zway_6-0-67-1"
            ]
          },
          "channelTypeUID": {
            "segments": [
              "zway",
              "thermostatSetPoint"
            ]
          },
          "label": "Danfoss Thermostat Heat (6.0)",
          "configuration": {
            "properties": {}
          },
          "properties": {
            "deviceId": "ZWayVDev_zway_6-0-67-1"
          },
          "defaultTags": []
        },
        {
          "acceptedItemType": "Number",
          "kind": "STATE",
          "uid": {
            "segments": [
              "zway",
              "zwayDevice",
              "192_168_200_202",
              "6",
              "battery-ZWayVDev_zway_6-0-128"
            ]
          },
          "channelTypeUID": {
            "segments": [
              "zway",
              "battery"
            ]
          },
          "label": "Danfoss Battery (6.0)",
          "configuration": {
            "properties": {}
          },
          "properties": {
            "deviceId": "ZWayVDev_zway_6-0-128"
          },
          "defaultTags": []
        }
      ],
      "configuration": {
        "properties": {
          "nodeId": 6
        }
      },
      "properties": {
        "deviceType": "Thermostat",
        "vendor": "Danfoss",
        "zddxmlfile": "657-0002-0005-0004-06-03-43-01-01.xml",
        "manufacturerId": "2",
        "location": "Bedroom",
        "SDK": "4.55.00"
      },
      "uid": {
        "segments": [
          "zway",
          "zwayDevice",
          "192_168_200_202",
          "6"
        ]
      },
      "thingTypeUID": {
        "segments": [
          "zway",
          "zwayDevice"
        ]
      },
      "location": "Bedroom"
    }

So I have a thing with the UID mentioned in the log…

Any thoughts?

I would love that. Now I’m trying to run z-wave with openhabian and Connector on my RPi3 and i have some problems with that :\ z-wave.me works grate, but openhab2 don’t see anything. I already tried everything but still no luck:


https://www.raspberrypi.org/forums/viewtopic.php?f=45&t=139927

This looks all right. Is the message only when starting openHAB? To exclude this, you can make a small change to the item file and save it so that they can be re-initialized. If there is no warning, it may be when openHAB is started.

Otherwise: Did you try to delete the thermostat (Thing) and re-create.

I think you want to configure the Z-Wave (not Z-Way) binding, right?

If Z-Way (z- wave.me) is running, only the Z-Way server has to be configured in the Z-Way binding, no connection to the RaZberry board.

I think there was something with openHAB itself. I just "apt-get upgrade"ed it and now the battery levels show up properly. Weird…
One more question: how do I see in openHAB the timestamp when one device was last seen, when the device last connected to the network? For the battery powered devices it might be useful to know that.
Anyway, keep up the good work! The binding works absolutely great! Any news as when it will be merged directly into openHAB?
Is there any way that I can get notified when there are new builds of the binding and/or the openHAB connector? I just upgraded the connector to the latest, but it was a coincidence that i looked to the zway server app page and saw that there is a new version…