Can Home Assistant set Zwave clocks through COMMAND_CLASS_CLOCK?

I have one of these which has a clock display: https://www.heltun.com/z-wave-heating-thermostat which claims COMMAND_CLASS_CLOCK - manual: https://drive.google.com/open?id=1AKHXZHyFCfpo_2Wd0XrisgIwilpezM7Q

Should HA be able to set the time on this thing?

I don’t think it will, except for some serious work on your part. There’s no “clock” domain and it doesn’t appear that the Z-Wave component recognizes the Clock command class. You can see how the devices are discovered here: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/zwave/discovery_schemas.py. There is nothing yet referencing COMMAND_CLASS_CLOCK. So there won’t be any specific entity to modify, AFAIK. Sounds like a feature request.

You still might be able to set the hours and minutes with the zwave.set_node_value service call. It lets you set any node value, but only to an integer value. So I think string values like the weekday will fail. It is a bit painful to find value ids because HA does not display them for unknown values. I think the values ids are persistent, but I’m not 100% sure.

To find the value ids you can dump the node info, using either the service zwave.print_node or clicking the Print button from the Z-Wave control panel. The complete node data will be printed to the home-assistant.log, as one giant single line string that isn’t pretty printed, so it will be hard to read. In the string somewhere will be the values that are associated with the Clock command class, and its value ids, something cryptic like 72057594084704260. For the clock there will be 3 values, I’d search for the strings “Day”, “Hour” and “Minute”.

Once you have the value ids, just call the service and use the hours (0-23) and mins (0-59) with the appropriate value id. If you tail the OZW_Log.txt file hopefully you’d see it doing something.

If you want to do this outside of HA, the OZW Control Panel would allow you to do so. You can set and view all values that a node provides. Unfortunately the HA Z-Wave control panel does not implement this capability.

1 Like

Thanks for the detailed response. I’ll get the OZW Control Panel installed and create a proper config for the device because it looks like the last effort to do one didn’t get far: https://github.com/OpenZWave/open-zwave/pull/1494

For the record: https://github.com/OpenZWave/open-zwave/pull/1721 . With the .xml config I’ve pushed I can set the clock through ozwcp by using config parameters. It also turns out there is a Ubuntu/Debian package for ozwcp that just works out of the box!

# apt install openzwave-controlpanel

Now I just have to work out why HA doesn’t like my config but that’s another topic