This doc describes how the frames sent by the Sensit v2 are formatted.
Bytes are read from left to right, the first byte being the most significant one
Bits are numbered the other way, from the LSB to the MSB. Bit 0 being the LSB & bit 7 the MSB of the said byte.
Example : received frame is A9670d19.
First byte is 0xA9
or 0b10101001
.
Or {bit 7}{bit 6}{bit 5}{bit 4}{bit 3}{bit 2}{bit 1}{bit 0}
Mode | Timeframe | Type | Battery MSB |
---|---|---|---|
b0-b2 | b3-b4 | b5-b6 | b7 |
3 bits | 2 bits | 2 bits | 1 bit |
T° MSB | Battery LSB |
---|---|
b0-b3 | b4-b7 |
4 bits | 4 bits |
Data bytes, between 2 and 10 bytes depending on the active mode
Value | Mode |
---|---|
0 | Button |
1 | T° + humidity |
2 | Light |
3 | Door |
4 | Move |
5 | Reed switch |
Value | Timeframe |
---|---|
0 | 10 mins |
1 | 1 hour |
2 | 6 hours |
3 | 24 hours |
Value | Type |
---|---|
0 | Regular, no alert |
1 | Button call |
2 | Alert |
3 | New mode |
Use the following formula to get the value in V (between 2.7 & 4.25V)
((({battery MSB} * 16) + {battery LSB}) + 54) / 20
Sent along each frame (not only in temp mode)
Value in °C : ({value} * 6.4) - 20
Value in °F : ((({value * 6.4) - 20) * 1.8) - 30)
T° LSB | Reed Switch state | Unused |
---|---|---|
b0 - b5 | b6 | b7 |
Temperature in °C = ({value}-200) / 8
Value | Multiplier |
---|---|
b0 - b5 | b6 - b7 |
Multiplier value | Final multiplier |
---|---|
0 | 1 |
1 | 8 |
2 | 64 |
3 | 2014 |
Light (lux) = {final multiplier} * {value} * 0.01
Byte 3 is unused there, as it's reserved for configuration values
Byte 4 contains the software version
Minor version | Major version |
---|---|
b0-b3 | b4-b7 |
Byte 4 contains the humidity value
Humidity (%) = value * 0.5
This byte contains the number of alerts, as in movemenet detection mode for ex.
Byte number | Hex value | Binary |
---|---|---|
0 | 0xE9 |
0b11101001 |
1 | 0x67 |
0b01100111 |
2 | 0x18 |
0b00011000 |
3 | 0x54 |
0b01010100 |
3 LSB from first byte : 11101001
1 means temperature & humidity mode
Bits 5 & 6 from first byte : 111
01001
4 means new mode
Humidity % is byte 4 * 0.5
4th byte is 0x54
or 84, meaning humidity is 42%
MSB
The most significant bits are the last (or most significant) 4 bits of the second byte.
Here, the second byte is 0x67
or 0b01100111
This means the temperature MSB are 0110
LSB
The least significant bits are the first 6 bits of the third byte.
Here, the third byte is 0x18
or 0b00011000
.
This means the temperature LSB are 011000
Temperature value
We need to combine MSB & LSB. So our temperature value is 0110
011000
, or 0b0110011000
or 408
.
The formula to get the value in Celsius degrees is ({value}-200) / 8
.
This means our temperature is (408-200)/8
or 26°C
Byte number | Hex value | Binary |
---|---|---|
0 | 0xC2 |
0b11000010 |
1 | 0x64 |
0b01100100 |
2 | 0x64 |
0b01100100 |
3 | 0x18 |
0b00011000 |
3 LSB from first byte : 11000010
2 means Light sensor mode
Bits 5 & 6 from first byte : 110
00010
2 means alert
Raw Value
Bits 0 to 5 from third byte : 01100100
Meaning the raw value is 0b100100
or 36
Multiplier
Bits 6 & 7 (2 most significant bits) from third byte : 01
100100
1
means we'll have to multiply by 8
Light level value
Formula is Light (lux) = {final multiplier} * {value} * 0.01
Here, Light (lux) = 8 * 36 * 0.01
or 288 * 0.01
or 2.88 lux