Thanks. I goofed something up trying to manually install the XML. I think I’ll wait for the next release.
I’m not sure that it is a good idea to change the power alarm to Battery as that’s something different (I believe). In any case, at least in my installation, both Alarm (power) and Alarm (system) are consistently NULL.
The alarms need to match the configurations in the binding. tl;dr; version
// Battery alarms
events = new HashMap<NotificationEvent, State>();
events.put(NotificationEvent.POWER_MANAGEMENT__NONE, OnOffType.OFF);
events.put(NotificationEvent.POWER_MANAGEMENT__BATTERY_CHARGING, OnOffType.OFF);
events.put(NotificationEvent.POWER_MANAGEMENT__BATTERY_FULL, OnOffType.OFF);
events.put(NotificationEvent.POWER_MANAGEMENT__REPLACE_BATTERY_SOON, OnOffType.ON);
events.put(NotificationEvent.POWER_MANAGEMENT__REPLACE_BATTERY_NOW, OnOffType.ON);
events.put(NotificationEvent.POWER_MANAGEMENT__CHARGE_BATTERY_SOON, OnOffType.ON);
events.put(NotificationEvent.POWER_MANAGEMENT__CHARGE_BATTERY_NOW, OnOffType.ON);
notifications.put("alarm_battery", events);
// Power alarms
events = new HashMap<NotificationEvent, State>();
events.put(NotificationEvent.POWER_MANAGEMENT__NONE, OnOffType.OFF);
events.put(NotificationEvent.POWER_MANAGEMENT__OVER_CURRENT, OnOffType.ON);
events.put(NotificationEvent.POWER_MANAGEMENT__MAINS_DISCONNECTED, OnOffType.ON);
events.put(NotificationEvent.POWER_MANAGEMENT__MAINS_APPLIED, OnOffType.OFF);
events.put(NotificationEvent.POWER_MANAGEMENT__MAINS_RECONNECTED, OnOffType.OFF);
notifications.put("alarm_power", events);
According to the manual the device sends alarm_battery, not alarm_power. Also in my experience it will be null until the battery gets low.
As to the system alarms, the codes 1-4 are not in the binding under alarm_system, so that will always be null until that is fixed with a PR. Possible;
SYSTEM__NONE("SYSTEM", 0),
SYSTEM__HARDWARE_FAILURE("SYSTEM", 1),
SYSTEM__SOFTWARE_FAILURE("SYSTEM", 2),
SYSTEM__HARDWARE_FAILURE_MANUFACTURER_CODE("SYSTEM", 3),
SYSTEM__SOFTWARE_FAILURE_MANUFACTURER_CODE("SYSTEM", 4),
SYSTEM__HEARTBEAT("SYSTEM", 5),
SYSTEM__TAMPERING("SYSTEM", 6),
SYSTEM__EMERGENCY_SHUTOFF("SYSTEM", 7),
But only these are triggered with alarm_system,
// Heart beats
events = new HashMap<NotificationEvent, State>();
events.put(NotificationEvent.SYSTEM__HEARTBEAT, OnOffType.ON); // 0x05
events.put(NotificationEvent.SYSTEM__NONE, OnOffType.OFF); // 0x0
notifications.put("alarm_system", events);
I‘m afraid I am a bit lost there. I have no idea how the event system works in openhab respectively in the z-wave binding.
If I understand correctly, there some bits and pieces missing in the binding to be able to map device events to bibding events. Am I right?
It is a little tricky, but basically you are right regarding the alarm_system. The alarm_power just needs to be changed to alarm_battery because that is what the device manual says is being sent.
Probably more than you wanted to know, but IMO there is not enough guidance for people creating devices in the ZW DB when choosing channels. I wrote this as a suggestion, but hasn’t been included yet.
alarm-channel-mapping2.pdf (525.3 KB)
