New Z-Way Binding

@pathec - I don’t suppose there is any way to integrate this with openZwave instead of z-way? That way the binding could be used with any of the supported USB controllers and not just the z-wave.me one.

Many thanks @Bernhard_Boser!

The bridge and things need to be created over the PaperUI because the channels are adjusted at runtime and a textual configuration (via *.thing files) results in read-only elements.

But you can create items manually and connect them to the corresponding things. You just need to disable the item linking (have a look at PaperUI - Configration - System - Item Linking) so that the items are not created automatically.

Now you can add items via *.items file like the following example:

Number fibaroPowerConsumption "Fibaro Wallplug PowerConsumption" { channel="zway:zwayDevice:localhost:3:sensorEnergy-ZWayVDev_zway_3-0-49-4" }

The channel id can copied from PaperUI. This gives you full control over the item name, which is important for the assignment of the MQTT topic to the item.

I use, for example, the MQTT app from Z-Way, which builds the topics according to the pattern: zway/%deviceName%.

The MQTT binding of openHAB does the rest:

stateSubscribeTopic=zway/${item} (extract from mqtt-eventbus.cfg)

I hope this helps.

The binding doesn’t work with OpenZWave (that’s another API), only with Z-Way. But I think other USB controllers are usable in Z-Way.

Ok thanks.

There is a little problem with german umlauts as they are shown as ? in Paper UI

Thanks, I will correct this the next days.

1 Like

When changing setpoint temperature on an zwave Thermostat in openhab i get this in the zway-log:

[2016-12-01 08:26:28.882] [I] [core] Notification: warning (module): Observer not notified - openHAB item: Thermostat_Kinderzimmer_Modus(HTTP Status: 400)

Thermostat_Kinderzimmer_Modus is defined by:

{channel=“zway:zwayDevice:192_168_1_12:80:thermostatMode-ZWayVDev_zway_80-0-64”}

Is this known or do I have a configuration error?

That should not happen. Which Z-Way version do you use?

Can you provide me the definition of Z-Way device?

In your case: http://YOUR_IP:8083/ZAutomation/api/v1/devices/ZWayVDev_zway_80-0-64

It seems that the device status is not converted correctly. For a binary switch, for example, the status must be changed from “on” to “ON”.

I’m using 2.2.5 and this is a stella-z device. It seems that it doesn’t use 0,1 or 11 for mod but only 0 or 1?

This is the definition:

{“data”:{“creationTime”:1480530554,“creatorId”:1,“deviceType”:“switchBinary”,“h”:185464305,“hasHistory”:false,“id”:“ZWayVDev_zway_80-0-64”,“location”:0,“metrics”:{“icon”:“thermostat”,“title”:“Eurotronic Technology Thermostat operation (80.0)”,“level”:“on”},“permanently_hidden”:false,“probeType”:“thermostat_mode”,“tags”:,“visibility”:true,“updateTime”:1480653526},“code”:200,“message”:“200 OK”,“error”:null}

What do you mean by 0, 1 or 11?

The stella-z has 4 “heating-modes”

Frost Protection: BASIC SET 0x01, THERMOSTAT MODE SET 0x00
Energy Saving: BASIC SET 0x00, THERMOSTAT MODE SET 0x0b
Comfort: BASIC SET 0xff, THERMOSTAT MODE SET 0x01
Direct Control: BASIC SET 0xfe, THERMOSTAT MODE SET 0x1f

Direct Control isn’t used by me. So I’m using Thermostat Mode Set 0, 1 and 11 (0x00, 0x0b and 0x01)

I only use the level property of the virtual device (in this case, on / off). What is the state of the stella-z device in Z-Way? How do you set the values in Z-Way via the user interface?

You can set them in the expert view unter control -> Thermostat

In the dropdown there are all of the modes listed

This directly changes the configuration of the device without the intermediate layer of the virtual devices. This is currently not possible. I am working on a solution that allows configuration with a virtual device.

One problem is the Z-Way thermostat mode is mapped incorrectly to a virtual device (in my opion). The configuration is represented as a binary switch. As I understand it, an “on” command sets the mode alternately (heating/cooling). But what happens in several modes I can not test. You can try out what happens in ExpertUI (with thermostat mode) when you trigger an “on” command in Smarthome UI.

However, the HTTP error (400) should not occur. Can you please update the OpenHAB Connector app in Z-Way and provide the error message. I add more information to error message.

The update is possible via Smarthome UI under Apps - Local Apps by clicking on the red button with the arrow.

Thanks for your support to improve the binding!

Hey @pathec, I am not a Z-Wave / Z-Way user myself but when reading this thread, I immediately thought “that would be a nice addition for openHABian”. It’s a RPi image with openHAB preinstalled and with a menu offering optional components. Check it out:

Can you tell me which steps you would recommend to (automatically) install and set up z-way? I’ll then add the needed changes (you may also create a PR if you like). Thanks :wink:

I’ve changed the file encoding from ansi to utf-8 of language file and update the Z-Way binding binary (no longer up to date, the latest version is linked in the pull request).

Hey @ThomDietrich,

Thanks for the offer. I look at this in detail but it probably makes sense only when the Z-Way binding was merged into the official repository. Currently there is only a pull request and a binary for the manual download.

1 Like

Hi, great work on the binding.
I installed the latest version today, but are facing two/three issues:

  1. After a restart of OpenHAB, it fails to connect to my Z-way-server. The PaperUI gives the following error:

Status: OFFLINE - CONFIGURATION_ERROR OpenHAB Port have to be a number.

I manage to solve this by editing the z-way-server configuration and alter a value (not the port) and then save. Now everything works fine.

  1. My devices where found and marked as online the first time I connected to the Z-way-server, but after the restart almost all of them are marked as OFFLINE, with the following error message:

Status: OFFLINE - CONFIGURATION_ERROR Z-Way device id required!

This I have not found out how to fix.

  1. When starting OpenHAB2 I get the following messages in the log from the Z-way-binding (zzz is the z-way-server):
    2016-12-04 21:30:12.851 [INFO ] [discovery.ZWayBridgeDiscoveryService] - No Z-Way server found on host: 192.168.1.zzz
...
    2016-12-04 21:31:56.367 [INFO ] [nding.zway.handler.ZWayBridgeHandler] - Initializing Z-Way bridge ...
    2016-12-04 21:31:56.497 [INFO ] [nding.zway.handler.ZWayBridgeHandler] - Z-Way bridge successfully authenticated
    2016-12-04 21:31:56.595 [WARN ] [.zway.handler.ZWayZWaveDeviceHandler] - Initializing Z-Way device handler failed (device id is null): FirstFloorHallOven (Aeon Labs)
    2016-12-04 21:31:56.596 [WARN ] [.zway.handler.ZWayZWaveDeviceHandler] - Initializing Z-Way device handler failed (device id is null): BathroomDimmer
    2016-12-04 21:31:56.596 [WARN ] [.zway.handler.ZWayZWaveDeviceHandler] - Initializing Z-Way device handler failed (device id is null): GFLivingRoomOldLight
    2016-12-04 21:31:56.596 [WARN ] [.zway.handler.ZWayZWaveDeviceHandler] - Initializing Z-Way device handler failed (device id is null): GFHallMotion (Fibar Group)
 ...   
    2016-12-04 21:31:56.597 [WARN ] [.zway.handler.ZWayZWaveDeviceHandler] - Initializing Z-Way device handler failed (device id is null): GFHallLight
    2016-12-04 21:31:56.597 [WARN ] [.zway.handler.ZWayZWaveDeviceHandler] - Initializing Z-Way device handler failed (device id is null): Device 23 - General Thermostat V2
    2016-12-04 21:31:56.620 [WARN ] [.zway.handler.ZWayZWaveDeviceHandler] - Initializing Z-Way device handler failed (device id is null): GFLivingRoomDiningLight
    2016-12-04 21:31:56.620 [WARN ] [.zway.handler.ZWayZWaveDeviceHandler] - Initializing Z-Way device handler failed (device id is null): Device 25 - General Thermostat V2
    2016-12-04 21:31:56.621 [WARN ] [.zway.handler.ZWayZWaveDeviceHandler] - Initializing Z-Way device handler failed (device id is null): Bathroom_1st_floor_heating
    2016-12-04 21:31:56.621 [WARN ] [.zway.handler.ZWayZWaveDeviceHandler] - Initializing Z-Way device handler failed (device id is null): Device 27 - General Thermostat V2
    2016-12-04 21:31:56.621 [WARN ] [.zway.handler.ZWayZWaveDeviceHandler] - Initializing Z-Way device handler failed (device id is null): Device 26 - General Thermostat V2
...
    2016-12-04 21:31:58.733 [WARN ] [handler.ZWayZAutomationDeviceHandler] - No channel for virtual device added: SwitchControl [ de.fh_zwickau.informatik.sensor.model.devices.types.ToggleButton@48fcb9b3[creationTime=1465154110,creatorId=14,deviceType=toggleButton,h=557861324,hasHistory=false,deviceId=LightScene_14,location=7,permanentlyHidden=false,probeType=,visibility=true,updateTime=1480831604,metrics=de.fh_zwickau.informatik.sensor.model.devices.Metrics@5e02ef84[icon=,title=Stuelys AV,level=on,probeTitle=,scaleTitle=,color=de.fh_zwickau.informatik.sensor.model.devices.Color@7e04a3ab[red=0,green=0,blue=0],min=0,max=0],tags=[]] ]
    2016-12-04 21:31:58.881 [WARN ] [handler.ZWayZAutomationDeviceHandler] - No channel for virtual device added: SwitchControl [ de.fh_zwickau.informatik.sensor.model.devices.types.ToggleButton@1579469c[creationTime=1465154077,creatorId=13,deviceType=toggleButton,h=557861323,hasHistory=false,deviceId=LightScene_13,location=7,permanentlyHidden=false,probeType=,visibility=true,updateTime=1480831610,metrics=de.fh_zwickau.informatik.sensor.model.devices.Metrics@585d2bfc[icon=,title=Stuelys PÅ,level=on,probeTitle=,scaleTitle=,color=de.fh_zwickau.informatik.sensor.model.devices.Color@df071b8[red=0,green=0,blue=0],min=0,max=0],tags=[]] ]

Any tips to get this fixed?

Do you need any more information?
Will there be more info for you if I switch on the DEBUG log?

Thanks for your feedback @stein_tore_tosse!

I guess this is a problem with the new JSONDB. The readout of the configuration supplies incorrect data types.

Once I’ve solved the problem, I publish a new version of the binding.

Hi. As @stein_tore_tosse also had issues with, my openhab also says that Openhab port have to be a number. Ive tried what he did, restart new build etc but it still says the same. The log doesnt give me any further info