OpenZWave / node-openzwave-shared

OpenZWave addon for Node.js (all versions) including management and security functions
Other
199 stars 113 forks source link

Values reported by sensor #250

Closed fborotknetik closed 5 years ago

fborotknetik commented 6 years ago

When working with the Ecolink Water/Freeze Sensor( model FLF-ZWAVE5) I see in the openzwave C++ logs these lines when reaching Freezing temp (1st 5 lines) and then 5 mins later (next 5 lines) when temp increased above freezing point

`2018-10-10 18:21:07.087 Detail, Node004, Received: 0x01, 0x0a, 0x00, 0x04, 0x00, 0x04, 0x04, 0x30, 0x03, 0xff, 0x07, 0x3a 2018-10-10 18:21:07.088 Info, Node004, Received SensorBinary report: Sensor:7 State=On 2018-10-10 18:21:07.088 Detail, Node004, Refreshed Value: old value=false, new value=true, type=bool 2018-10-10 18:21:07.088 Detail, Node004, Changes to this value are not verified 2018-10-10 18:21:07.088 Detail, Node004, Notification: ValueChanged

2018-10-10 18:26:09.705 Detail, Node004, Received: 0x01, 0x0a, 0x00, 0x04, 0x00, 0x04, 0x04, 0x30, 0x03, 0x00, 0x07, 0xc5 2018-10-10 18:26:09.706 Info, Node004, Received SensorBinary report: Sensor:7 State=Off 2018-10-10 18:26:09.706 Detail, Node004, Refreshed Value: old value=true, new value=false, type=bool 2018-10-10 18:26:09.706 Detail, Node004, Changes to this value are not verified 2018-10-10 18:26:09.706 Detail, Node004, Notification: ValueChanged`

But on the 'value changed' event I get these lines with no mention at all of the Freeze event `node4: Value Changed: [48]-[{"value_id":"4-48-1-0","node_id":4,"class_id":48,"type":"bool","genre":"user","instance":1,"index":0,"label":"SensorFlood","units":"","help":"","read_only":true,"write_only":false,"min":0,"max":0,"is_polled":false,"value":true}] node4: changed: 48:SensorFlood:false->true

node4: Value Changed: [48]-[{"value_id":"4-48-1-0","node_id":4,"class_id":48,"type":"bool","genre":"user","instance":1,"index":0,"label":"SensorFlood","units":"","help":"","read_only":true,"write_only":false,"min":0,"max":0,"is_polled":false,"value":false}] node4: changed: 48:SensorFlood:true->false ` However, when water is detected the devices sends the alert notification (0x71) and the sensor_binary command classes (0x30). Here you can see the logs of the water_detected events. Information shown in 'value changed' event:

node4: Value Changed: [113]-[{"value_id":"4-113-1-8","node_id":4,"class_id":113,"type":"byte","genre":"user","instance":1,"index":8,"label":"Flood","units":"","help":"","read_only":true,"write_only":false,"min":0,"max":255,"is_polled":false,"value":2}] node4: changed: 113:Flood:4->2 node4: Value Changed: [48]-[{"value_id":"4-48-1-0","node_id":4,"class_id":48,"type":"bool","genre":"user","instance":1,"index":0,"label":"SensorFlood","units":"","help":"","read_only":true,"write_only":false,"min":0,"max":0,"is_polled":false,"value":true}] node4: changed: 48:SensorFlood:false->true and information shown in the C++ openzwave log:

2018-10-11 15:36:14.620 Detail, Node004, Received: 0x01, 0x10, 0x00, 0x04, 0x00, 0x04, 0x0a, 0x71, 0x05, 0x00, 0x00, 0x00, 0xff, 0x05, 0x02, 0x00, 0x00, 0x69 2018-10-11 15:36:14.621 Info, Node004, Received Alarm report: type=0, level=0, sensorSrcID=0, type:Flood event:2, status=255 2018-10-11 15:36:14.621 Detail, Node004, Refreshed Value: old value=0, new value=0, type=byte 2018-10-11 15:36:14.622 Detail, Node004, Changes to this value are not verified 2018-10-11 15:36:14.622 Detail, Node004, Refreshed Value: old value=0, new value=0, type=byte 2018-10-11 15:36:14.622 Detail, Node004, Changes to this value are not verified 2018-10-11 15:36:14.622 Detail, Node004, Refreshed Value: old value=0, new value=0, type=byte 2018-10-11 15:36:14.623 Detail, Node004, Changes to this value are not verified 2018-10-11 15:36:14.623 Detail, Node004, Refreshed Value: old value=4, new value=2, type=byte 2018-10-11 15:36:14.623 Detail, Node004, Changes to this value are not verified 2018-10-11 15:36:14.624 Detail, Node004, Notification: ValueChanged 2018-10-11 15:36:14.624 Detail, Node004, Notification: ValueChanged 2018-10-11 15:36:14.627 Detail, Node004, Notification: ValueChanged 2018-10-11 15:36:14.629 Detail, Node004, Notification: ValueChanged 2018-10-11 15:36:14.639 Detail, Node004, Received: 0x01, 0x0a, 0x00, 0x04, 0x00, 0x04, 0x04, 0x30, 0x03, 0xff, 0x06, 0x3b 2018-10-11 15:36:14.640 Info, Node004, Received SensorBinary report: Sensor:6 State=On 2018-10-11 15:36:14.640 Detail, Node004, Refreshed Value: old value=false, new value=true, type=bool 2018-10-11 15:36:14.640 Detail, Node004, Changes to this value are not verified 2018-10-11 15:36:14.641 Detail, Node004, Notification: ValueChanged I created a new xml file for the ecolink sensor based on the discovery made when the app runs and dumps it into the 'zwcfg_0xeff793d6.xml' file. As per the manufacturer the device sends the events 6 (water ) and 7 (freeze) on the SENSOR_BINARY_V2 Command class. (doc is attached) .

So, after the discovery, these are the conf created for the sensor_binary class: `

            <Value type="bool" genre="user" instance="1" index="0" label="SensorFlood" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="False" />
            <SensorMap index="0" type="6" />
    </CommandClass>

`

And this is how it looks with what I added: `

            <Value type="bool" genre="user" instance="1" index="0" label="SensorFlood" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="False" />
            <Value type="bool" genre="user" instance="1" index="1" label="SensorFreeze" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="False" />
            <SensorMap index="0" type="6" />
            <SensorMap index="0" type="7" />
    </CommandClass>

` I would like to capture the Freeze event (0x07) on the 'value changed' event as well as the water _present event (0x06) After I modified the xml file I remove the auto created 'zwcfg_0xeff793d6.xml' file for my changes to take effect but no luck so far. How can I do that ? thank you in advanced ecolink-water-sensor.pdf

blackshadev commented 5 years ago

Hi, I think you have more luck with this over on the openzwave github. This is probably a issue with in the device database of openZWave or an known issue of this device. But this wrapper is probably not the source of your issue. Just post this over at the other github and they will give you more details about it, I am not that well versed into editing the device database etc.