Customising z-wave device channels

I’m new to openHab, but have lots of experience with home automation and almost 40 years experience in software engineering, so I’m hoping I can contribute to the project once I get a better understanding of it.

I’m currently in the process of trying to migrate my zipato setup onto OpenHab 3, but have run into a few issues with z-wave devices that aren’t supported fully which are critical to my setup.

I have Danfoss z-wave RS thermostats in every room, and currently use the press button to switch the lights on/off in the room. After including one on openHab I was surprised to see no channel for the button. Appears some questions were raised about this about 8 years ago where button presses produced errors in the log, but couldn’t find any details of fixes or workarounds, so would appreciate any pointers on this.

The second issue I have is with a custom Z-Uno device that I have. A few years ago I reverse engineered the Honeywell LESST interface which is a serial interface onto the old Honeywell smartfit heating controllers so I could control my heating via z-wave. I understand from old conversations on here that it was impossible at the time to provide a standard channel mapping for the z-uno as every one was configured differently, and at the time people had to hack the device database to get them to work. Since then the device has moved on and now supports a mechanism for producing a unique product type/id based on the channel configuration, which people could add to the z-wave device database. I have no idea where to start here, can anyone give me pointers on this? Once I have worked out exactly how to do it I can document it for other users.

Welcome to the journey. :slight_smile:

Please read:

If your Danfoss thermostats are

they should support the Z-Wave command class CENTRAL_SCENE.

Please read

for information on how to enable debugging.

1 Like

Thanks for the links…I’ll check these out properly as soon as I get some spare time!

I checked the z-wave debug and I get:
Received COMMAND_CLASS_CENTRAL_SCENE V1 CENTRAL_SCENE_NOTIFICATION
Received scene 1 at key 2 [Key Held Down]
So all looking good there, but it really isn’t obvious to me how I then hook this in OH3.
Is it possible to do in UI, or do I have to generate some text config for this?

Please identify your DUT - is it a Danfoss 014G0160?

Sorry, yes its showing as a “014G0160 Room Thermostat” in the thing type.

There should be a Scene Number channel (I’m using a different scene controller for demonstration purposes):

Corresponding Z-Wave database item:

Problem:
No COMMAND_CLASS_CENTRAL_SCENE for 016G0160 in the Z-Wave database:

But the manual claims support for COMMAND_CLASS_CENTRAL_SCENE:

Please check if the XML file for your device in /var/lib/openhab/zwave contains COMMAND_CLASS_CENTRAL_SCENE:

grafik

If it does, your XML file should be uploaded to the Z-Wave database - if not, the COMMAND_CLASS_CENTRAL_SCENE must be added to the Endpoints tab. Either way, @chris’ help would be needed. Please post your results.

It now makes sense to me how it should work, and why it doesn’t :slight_smile:

This is all I see in the channels:
image

I’m running OH3.3 on windows so my xml was in a different location (openhab-3.3.0\userdata\zwave\network_ebfa9061__node_26.xml), but it does seem to be have the scene:

image

So I guess my xml will need uploading to the database

One thing to check is the device TYPE:ID pair for your devices compared to the current DB entry. Looking at the manual in the current entry the Central Scene command class should have been uploaded when the person that created the device uploaded the XML. If your device has the same numbers possibly @chris (or someone with a higher level of DB write access than I) can add that command class to the existing entry. If you have a different TYPE:ID pair you can just do the XML upload to create a new device. There can’t be two devices with the same TYPE:ID pair from the same manufacturer without getting down to a “version” level. Currently the DB device is setup for all versions

Birth certificate of the device (Z-Wave database):

Workaround (I don’t know if it still applies to a current version of OH/Z-Wave binding):

I haven’t yet done anything with the text based configuration, and I got errors when trying to define the ‘item’ for the workaround, probably cos I didn’t fully understand the ‘81:command=central_scene’ bit, I assume the 81 had to be replaced with the uuid for my device.

Either way it seems a real botch, is there some reason why the database wasn’t updated so that it appears as a channel?

I’m not the developer, but I see that command class in the binding now. The links above were from 2016 so a lot has changed.

Sorry, just to be clear, the workaround seemed like a botch, and if possible I’d prefer to fix it so that it can be done from the UI, unless there is a major obstacle :slight_smile:
I’m just not clear how to move it forward…

1 Like

What is the TYPE:ID of your device?

manufacturerId = 0002

manufacturerRef = 0003:8010,8003:8001

Ok. So those are the same as in the existing DB. There are two options going forward

  1. We can ask/wait for @chris to add the Central_Scene CC to the existing DB entry for this device. (From the linked posting from 2016 I’m thinking it was manually deleted because it did exist in the binding at that time). AFAIK only Chris can add CCs (or delete anything) to/from the DB. Also, I’m inferring based on his normal Forum/DB activity that he is very busy with his real paying job. Possibly adding this request to the zwave github might also help on this option.
  2. If you haven’t already you can register for the DB and request, write access from Chris via a ticket as described in the blog. Then edit the Type:ID in the existing DB item to random numbers & upload your XML like a new device. Copy all the parameters, associations, references, etc. from the existing entry to your new one and when finished mark “Request review”, but leave the old one as “modified, no review request”. It will be dropped from the next update and the new one will appear. This is more work, but could be quicker than waiting

PS- I needed to ensure your devices were the same before suggesting the options

Just to be clear, this is the database reference - not necessarily for your device.

Anyway, I’ve added CENTRAL_SCENE to this device - hopefully it’s the one you have :slight_smile:

2 Likes

For clarity (re: above comment) your specific device TYPE:ID are on separate lines under the properties tab (and to make matter more confusing) need to be converted to Hex. Example:
Deviceid

You will still DB write access to create a channel under the newly created CC, but that is a lot easier.

1 Like

Thanks for making the update Chris, I double checked the details and I have:
zwave_deviceid = 32784 (0x8010)
zwave_devicetype = 3
so I think the device does match!.
Searching the previous posts it look as though I have to delete the ‘thing’ for the device and uninstall the zwave binding and reinstall the new one that Jenkins builds (looks like next one will be 29/11), can someone confirm this is the right thing to do? Thanks

Yes.
General outline

  1. Remove UI Zwave binding - Don’t want two running
  2. In karaf feature:install openhab-transport-serial - Needed in most systems, normally installed by UI
  3. Download and place jar in addons (same folder as the openhab-addons-3.3.0.kar)
  4. wait 30 seconds
  5. Delete Thing from the device UI page (do not exclude device from controller page)
  6. Go to inbox zwave scan to pick up new channels

Assuming you are on OH3.3 there should be no problem