LoRaWAN Smart Building MOTION - Guide utilisateur / User guide version V1.0.0
4.1.8 Periodic data frame
This frame (0x4E) is sent according to the period chosen by the user (period = S321xS320xS301) and contains the periodic presence count and
brightness rate readings.
Each log contains the number of detections made and the brightness rate corresponding to a size of 3 bytes:
- the first 2 bytes for presence detection: unsigned 16 bits. For example, the value 1251 represents 1,251 detections.
- the last byte for the brightness rate: 8 bits unsigned in%. For example, the value 50 represents a brightness rate of 50%.
FR
0
1
Code
PAYLOAD
0x4E
Status
EN
0x4E
0xA3
NOTE: if S301> 15, the warning bit will appear in the byte status. In this case the frame will send the most recent readings at the expense of
the oldest ones that will be potentially lost.
For example, the following frame 4EA30210005380 (in hexadecimal) means:
- Frame code = 0x4E, periodic data frame
- Status = 0xA3, meaning a frame counter at 5, a low battery alarm and configuration validation.
- Global presence counter = 0x00D2 i.e. 210 presence detections since device start
- Presence at t0 = 0x0053 i.e. 83 detections made
- Brightness at t0 = 0x50 is the brightness rate is at 80%
4.1.9 Presence detection alarm frame
This frame (0x4F) is sent when a threshold defined by configuring register 330 for presence detection is exceeded.
0
1
Code
Status
0x4F
Status
0x4F
0xA3
Its size is 6 bytes. Description of the frame:
•
Bytes 2 and 3: global presence detection counter
•
Bytes 4 and 5: counter since last frame sent
In the example in grey, this results in:
•
Bytes 2 and 3 = 0x0140, the global counter has counted 320 detections since the device was started
•
Bytes 4 and 5 = 0x0023, the counter has counted 35 detections since the last frame was sent
4.1.10
Brightness alarm frame
This frame (0x50) is sent when a threshold is exceeded (determined by registers S340 to S344).
0
Code
0x50
0x50
Description of the frame:
Byte 2: state of the alarm brightness (0 if inactive or 1 if active = thresholds exceeded)
Byte 3: brightness rate after the threshold was exceeded
2 and 3
4 and 5
Global
Presence
Brightness
presence
counter
rate at t0
counter
at t0
0x00D2
0x0053
0x50
2 and 3
PAYLOAD
Global count of detections
since start up
0x0140
1
2
Status
Status
Brightness alarm frame
0xA3
0x01
6
7 and 8
9
PAYLOAD
Presence
Brightness
counter at
rate at t-1
t-1
00
00
4 and 5
Counter since the last frame
sent
0x0023
3
PAYLOAD
Brightness
0x18
....
46 and 47
48
...
Presence
Brightness
counter at
rate at t-15
t-15
00
00
Page
74
of 86