Here the events sent by the module is described.
Event | Description |
---|---|
CLASS1.MEASUREMENT (10) Type=6, Temperature | If enabled this event is sent periodically for each sensor. The temperature is reported as a normalized integer value by this event. The event frequency is set in register 20-25 (default is one event per 30 seconds) and must be set to a non zero value for it to be sent. Temperature can be reported in one of three units. Kelvin, Celsius (default) or Fahrenheit as set in register 2-7. Data Byte 0 - Data coding byte. See description below. Byte 1 - Always 130 (0x82). Decimal point should be shifted two steps to the left = divide with hundred. Byte 2 - MSB of normalized integer. Two complement number. Byte 3 - LSB of normalized integer. Two complement number. |
The data coding byte is the measurement data coding format described in the VSCP specification.
The normalized integer is stored as a two complement 16-bit integer. To convert
1. Calculate the 16-bit twos complement as MSB byte * 256 + LSB byte.
2. If the most significant bit is not set (Equal or less then 32767) this is a positive temperature. Divide by 100 and you have the temperature.
3. If the most significant bit is set (Greater than 32767) this is a negative temperature. Now invert the result (the bits are inverted; 0 becomes 1, and 1 becomes 0) and add one to the result. Dive by 100 and you have the temperature.
The data part of the event will be
Byte | Description |
---|---|
Byte 0 | 130 (0x82) |
Byte 1 | 2 (0x02) |
Byte 2 | 255 (0xF0) |
Byte 3 | 216 (0x60) |
The data part of the event will be
Byte | Description |
---|---|
Byte 0 | 130 (0x82) |
Byte 1 | 2 (0x02) |
Byte 2 | 46 (0x2E) |
Byte 3 | 224 (0xE0) |
The data part of the event will be
Byte | Description |
---|---|
Byte 0 | 249 (0xF9) |
Byte 1 | 2 (0x02) |
Byte 2 | 255 (0xFF) |
Byte 3 | 118 (0x76) |
Bits | Description |
---|---|
5,6,7 | Always set to 4 (0b100) - Normalized integer format. |
3,4 | Unit: 0 (0b00) - Kelvin. 1 (0b01) – Celsius. 2 (0b10) – Fahrenheit. |
0,1,2 | Sensor Index: 0 (0b000) - Sensor 0. 1 (0b001) - Sensor 1. 2 (0b010) - Sensor 2. 3 (0b011) - Sensor 3. 4 (0b100) - Sensor 4. 5 (0b101) - Sensor 5. |
To help to interpret data the three tables below list the datacoding bytes for Kelvin, Celsius and Fahrenheit temperature presentation.
Sensor | Value for data coding byte |
---|---|
Sensor 0 | 129 (0x81) |
Sensor 1 | 130(0x82) |
Sensor 2 | 131(0x83) |
Sensor 3 | 132(0x84) |
Sensor 4 | 133(0x85) |
Sensor 5 | 134(0x86) |
Sensor | Value for data coding byte |
---|---|
Sensor 0 | 136(0x88) |
Sensor 1 | 137(0x89) |
Sensor 2 | 138(0x8A) |
Sensor 3 | 139(0x8B) |
Sensor 4 | 140(0x8C) |
Sensor 5 | 141(0x8D) |
Sensor | Value for data coding byte |
---|---|
Sensor 0 | 244 (0xF4) |
Sensor 1 | 245 (0xF5) |
Sensor 2 | 246 (0xF6) |
Sensor 3 | 247 (0xF7) |
Sensor 4 | 248 (0xF8) |
Sensor 5 | 249 (0xF9) |
If enabled the event is sent when a temperature sensor goes below a low alarm set point (see Low-alarm-registers) or above a high alarm set point (see High-alarm-registers). The hysteresis registers is used so that after an alarm event has been sent a new alarm event is not sent until the temperature goes below/above the value set in the set point plus(low)/minus(high) signed content of hysteresis register.
A read of the alarm register will reset the alarm status and alarm events will not be sent out again until the the temperature changed with the hysteresis amount.
Event | Description |
---|---|
CLASS1.ALARM, Type=2, Alarm occurred | Data Byte 0 - Index. Index is 0 for Sensor 0. 1 for Sensor 1, 2 for Sensor 2. 3 for Sensor 3. 4 for Sensor 4. 5 for Sensor 5. Byte 1 - Zone. Byte 2 - Sub zone. |
Zone and sub-zone are the modules settings for the sensor generating the alarm. See register 74-85
If enabled, the event CLASS1.CONTROL, Type=5, TurnOn or CLASS1.CONTROL, Type=6, TurnOff (Bit 5 in control register must be set (see Control-registers])) is sent when the temperature goes below or above the low(see Low-alarm-registers/high(see High-alarm-registers alarm set points. Settings in the control register bit 6 (see [sub:Control-registers]) decides which of the TurnOn/TurnOff event that is sent. The hysteresis setting (see [sub:Sensor-hysteresis-registers]) tells how much a temperature must raise or fall below the alarm set point before a new event will be sent.
Event | Description |
---|---|
CLASS1.CONTROL, Type=5, TurnOn | Data: 0 Index, 1 Zone. 2 Sub zone. |
Event | Description |
---|---|
CLASS1.CONTROL, Type=6, TurnOff | Data: 0 Index, 1 Zone. 2 Sub zone. |
Index is 0 for Sensor 0, 1 for Sensor 1, 2 for Sensor 2. 3 for Sensor 3. 4 for Sensor 4. 5 for Sensor 5.
Zone information is fetched from sensor zone register (see sensor zone information registers).
Sub zone information is fetched from sensor sub-zone register (see sensor zone information registers).
If a SYNC event is received by the module it will check the zone/subzone parameters of the event and send out temperature measurement event(s) for all sensors that match. This can be a handy feature to use of one want synchronized data from several sources.
Event | Description |
---|---|
CLASS1.CONTROL, Type=26, Sync | Data: 0 Index, 1 Zone. 2 Sub zone. |