I picked up a couple Z-wave sensors with the thought of adding support to the Zwave driver posted on this forum.
I have three devices:
- HomeManageables HM-DW001 Door/Window Sensor (also known as Everspring SM103)
- ACT ZIR000 PIR motion Motion Sensor
- HomeManageables HM-FS001 Flood Sensor
First Question:
All three of these devices are classified as Binary Sensors, yet the device class in the "Leviton" Zwave module is called MotionDetector. I believe this class should be renamed BinarySensor. Is this agreeable? It seems logical to me, since the actual connection to a MotionDetector, WindowSensor, DoorSensor, WaterSensor, etc. happens when the Zwave device is bound to an object in the "Home".
Second Question:
The Leviton MotionDetector class (the one that I propose renaming to BinarySensor) inherits from a class called MotionDetector, but I can't seem to locate where that class is defined. Any guidance here?
I've already modified the following methods to support the discovery of the DW001 and ZIR000:
ViziaRF.OnChangeOnNewData
Devices.UpdateDevices
Devices.AddDevice
I've also added the following methods to process commands from the DW001 and ZIR000:
Devices.SetMotionDetected - detects state changes (motion on/off, contact open/closed, water detected, etc.) set from the device
Devices.SetLastNotificationTime - handles wakeup notifications sent from the device every 4 hours
Devices.SetTamperAlarm - handles tamper alarm sent from device
I've added the following properties to the MotionDetector class:
LastWakeupNotificationTime (DateTime: readonly / bindable) - gets set to the time when the wakeup notification is received
TamperAlarm (Boolean: readonly / bindable / momentary) - gets set to true when the tamper alarm is received
LastTamperAlarmTime (DateTime: readonly / bindable) - gets set to the time when the tamper alarm is received
Everything seems to be working fine. The devices are discovered correctly, and I can receive and process state changes, wakeup notifications, and tamper alarms. In a logic diagram, I wired the TamperAlarm to my email sender, and it worked great!
I haven't added support for low battery notifications yet, and I'm not sure how to test that without tracking down some old batteries and just waiting days, weeks, or months for something to happen. I've instrumented OnChangeOnNewData with debugout to log unknown events so I can see them in debugview, so I should be ok there.
Anyway, does all this make sense? I'm a Premise noob, so I need to know if I'm on the right track? If all this is agreeable, I'll add the final sensor, then post a work in progress so someone with more Premise knowledge can check my work...
Mark
I have three devices:
- HomeManageables HM-DW001 Door/Window Sensor (also known as Everspring SM103)
- ACT ZIR000 PIR motion Motion Sensor
- HomeManageables HM-FS001 Flood Sensor
First Question:
All three of these devices are classified as Binary Sensors, yet the device class in the "Leviton" Zwave module is called MotionDetector. I believe this class should be renamed BinarySensor. Is this agreeable? It seems logical to me, since the actual connection to a MotionDetector, WindowSensor, DoorSensor, WaterSensor, etc. happens when the Zwave device is bound to an object in the "Home".
Second Question:
The Leviton MotionDetector class (the one that I propose renaming to BinarySensor) inherits from a class called MotionDetector, but I can't seem to locate where that class is defined. Any guidance here?
I've already modified the following methods to support the discovery of the DW001 and ZIR000:
ViziaRF.OnChangeOnNewData
Devices.UpdateDevices
Devices.AddDevice
I've also added the following methods to process commands from the DW001 and ZIR000:
Devices.SetMotionDetected - detects state changes (motion on/off, contact open/closed, water detected, etc.) set from the device
Devices.SetLastNotificationTime - handles wakeup notifications sent from the device every 4 hours
Devices.SetTamperAlarm - handles tamper alarm sent from device
I've added the following properties to the MotionDetector class:
LastWakeupNotificationTime (DateTime: readonly / bindable) - gets set to the time when the wakeup notification is received
TamperAlarm (Boolean: readonly / bindable / momentary) - gets set to true when the tamper alarm is received
LastTamperAlarmTime (DateTime: readonly / bindable) - gets set to the time when the tamper alarm is received
Everything seems to be working fine. The devices are discovered correctly, and I can receive and process state changes, wakeup notifications, and tamper alarms. In a logic diagram, I wired the TamperAlarm to my email sender, and it worked great!
I haven't added support for low battery notifications yet, and I'm not sure how to test that without tracking down some old batteries and just waiting days, weeks, or months for something to happen. I've instrumented OnChangeOnNewData with debugout to log unknown events so I can see them in debugview, so I should be ok there.
Anyway, does all this make sense? I'm a Premise noob, so I need to know if I'm on the right track? If all this is agreeable, I'll add the final sensor, then post a work in progress so someone with more Premise knowledge can check my work...
Mark