org.openhab.binding.zwave: ZEN16 not reporting manual SW events due to missing COMMAND_CLASS_BASIC property
Since OH3 was updated in early 2021, zen16_1_0.xml had removed COMMAND_CLASS_BASIC, so OH is no longer reporting events whenever the manual switches (SW1, SW2, and SW3) are used. Instead, the state of each switch/relay is only getting updated via polling.
Comparing OH3 with OH2.5,
<property name="binding:*:OnOffType">COMMAND_CLASS_SWITCH_BINARY:1</property>
<property name="binding:*:OnOffType">COMMAND_CLASS_SWITCH_BINARY:2</property>
<property name="binding:*:OnOffType">COMMAND_CLASS_SWITCH_BINARY:3</property>
should be:
<property name="binding:*:OnOffType">COMMAND_CLASS_SWITCH_BINARY:1,COMMAND_CLASS_BASIC:1</property>
<property name="binding:*:OnOffType">COMMAND_CLASS_SWITCH_BINARY:2,COMMAND_CLASS_BASIC:2</property>
<property name="binding:*:OnOffType">COMMAND_CLASS_SWITCH_BINARY:3,COMMAND_CLASS_BASIC:3</property>
I made the above changes and it fixed my event reporting issue that was introduced when I upgraded from OH2.5 to OH3.0 and OH3.1.
Also, the following eight extraneous channels were incorrectly added at the same time, and should be removed as they do not exist on the ZEN16.
<channel id="switch_binary" typeId="switch_binary">
<channel id="switch_dimmer" typeId="switch_dimmer">
<channel id="scene_number" typeId="scene_number">
<channel id="sensor_binary" typeId="sensor_binary">
<channel id="meter_kwh" typeId="meter_kwh">
<channel id="meter_kvah" typeId="meter_kvah">
<channel id="meter_watts" typeId="meter_watts">
<channel id="battery-level" typeId="system.battery-level">
The database record should also be updated to remove the extra channels: https://opensmarthouse.org/zwavedatabase/1326
Also, if possible, zen16_1_0.xml should really be split into separate configuration files for version 1.20 (aka v1.02 per Zooz) and version 1.30-1.40 (aka v1.03 and v1.04 from Zooz), so users with version 1.20 do not have extra invalid parameters. Version 1.20 introduced parameters 15-20, while version 1.30 introduced parameters 21-24. version 1.40 did not introduce any new parameters.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 42 (10 by maintainers)
This is all new to us too! We started with 5 layers in August, added 5 broilers in March (they threw in 3 extras), then picked up 5 turkeys and 2 nuc bee hives in May. We have a very broody hen right now with 12 eggs under her, so we should have a bunch more in a couple weeks! We are in the process of clearing a 100x100 area in our woods of thorny, poisonous, and invasive plants, as well as LOTS of standing dead trees (old elms and hemlocks), to fence in for a ‘pasture in the woods’. The pigs are going on the other side of the property in another area in the woods. We’ve thought about goats, but they seem too fiesty and destructive, so we had decided to try some sheep in the spring!
I had no idea you guys were into this kind of stuff! I guess you really can understand why I haven’t been around as much! Sorry for being off-topic, @dw-8!
You can find the comparison here -:
https://github.com/openhab/org.openhab.binding.zwave/blob/main/src/main/java/org/openhab/binding/zwave/internal/ZWaveProduct.java#L86
It’s up to you if you want to create multiple versions. Of course, this is best and avoids errors which will otherwise be thrown if there are missing parameters.
I’m not sure what you are doing here. You should not mess with the binding - there is no need. The XML that OH creates is completely different to the one inside the binding and they are completely unrelated.