GS-IWDS07 Contact
Brand | Protocol |
---|---|
The Light in the Box GS-DWIS07 | GS-dwis07 |
Not supported
"devices": { "Window_Contact": { "protocol": [ "GS-iwds07" ], "id": [{ "unit": 52781 }], "battery": 0, "state": "closed" } },
None
This protocol sends 50 pulses like this
1233 411 411 1233 1644 411 1233 411 411 1233 1233 411 822 1233 411 1233 411 1233 1233 411 1233 411 1233 411 411 1233 411 1233 1233 411 1233 411 411 1233 411 1233 411 1233 411 1233 1233 411 411 1233 1233 411 822 1233 411 13974
It has no header
and the last 2 pulses are the footer
. These are meant to identify the pulses as genuine
The next step is to transform this output into 24 groups of 2 pulses (and thereby dropping the footer
pulses).
1233 411 411 1233 1644 411 1233 411 411 1233 1233 411 822 1233 411 1233 411 1233 1233 411 1233 411 1233 411 411 1233 411 1233 1233 411 1233 411 411 1233 411 1233 411 1233 411 1233 1233 411 411 1233 1233 411 822 1233
If we now look at these groups you can distinguish four types:
1233 411
411 1233
822 1233
1644 411
If the first pulse is less than 830 we decode this pulse group as binary 0, otherwise as binary 1. We then get the following output:
1011 0100 0111 0011 0000 1 0 1 0 uuuu uuuu uuuu uuuu uuuu b s ? i
Each (group) of numbers has a specific meaning:
The meaning of Bit 22 is unknown.
Unit
is defined as a binary number (order in above example: lsb…msb)Battery
defines whether the battery is still fine (1) or not (0)State
defines whether a sensor state is opened (0) or closed (1)Intrusion
defines whether the sensor is mounted to its base (0) or not (1)So this code represents:
When the intrusion contact is triggered, i.e. the device is taken from its platform mount, it sends a message where bits 20-23 are always 0111, regardless of contact state. So if you retrieve the information by simple bitmasking, you will get battery and state values which might be misleading. Furthermore if then the contact is opened or closed, it sends again the normal messages meaning the “intrusion” condition is sent only once and probably needs to be saved.