Question 1:
What I’ve noted is Alarm Level 2 = 0 when it is closed, and 255 when it is open. Also, the alarm type changes if I take the cover off (tamper) the sensor.
So, my question is, how do I get this to show up in the web interface as open and closed instead of 0 and 255?
Closed:
Open:
Question 2:
Also, what are “Linear Unknown type=2001, id-0102 SourceNo…” and “linear unknown type2001 id0102 sensor 2”? I
think maybe the first one might be the z-wave stick itself? And maybe the second one is the door sensor before I gave it a friendly name?
Answer 1:
Are you sure there is no value between 0 and 255? I have a Smoke Sensor that works almost in the same way. On that device 0 means Off and 255 means “same as previous”. When my alarm is triggered the value changes to 3, then to 255.
I’m starting to read about templates now. I’m not 100% sure how to get what I want, but I’m still trying to figure it all out.
The full names from devState are:
Entity ID: binary_sensor.linear_unknown_type2001_id0102_sensor_2
This entity has no other attributes. I think this must be the z-wave stick itself maybe…
and
Entity ID: sensor.linear_unknown_type2001_id0102_sourcenodeid_2
State attributes (JSON, optional)
Ok, I just remembered my door/window sensor (GoControl brand which seems to be made by “Linear Retail”) came with instructions which told me the basic operation information:
Alarm Level
– Internal Switch: Close = 0x00; Open = 0xFF
– Tamper Switch: 0xFF
– External Switch: Close = 0x00; Open = 0xFF
So I think, basically if I can detect an Alarm Type of 0x02 with an Alarm Level of 0xFF (255) the window/door is open. If the Alarm Type is 0x02 and the Alarm Level is 0x00 (0) then the window/door is closed.
Now I just need to get my template skills up to par.
Basically if the alarm_level is 255 then if the “burglar” then the devices has been opened/tampered with. If alarm_level is 255 and “burgler” is not 3 (In my car it would be 2), the door is “open”. Otherwise it’s closed. My template does not use any value from the external sensor port as I’m not using that right now.