# MQTT message structure
## MSG Header
Every message. Total len 18 bytes.
```mermaid
block-beta
T["TIME
4 bytes
seconds"]:2
Tm["TIME
4 bytes
useconds"]:2
MAC["WIFI MAC
6 bytes"]:3
GRP["Group id
4 bytes"]:2
```
# Block messages
## Radar message
Arrives every 10 seconds. Total len 49 + 18 = 67 bytes
```mermaid
block-beta
MSG_HEADER
B["0x10"]
C["14 uint16
motion energy"]
D["10 uint16
stationary energy"]
```
## Sensors message
Arrives every 10 seconds, when gas sensor data has been collected. Total len: 18 + 16 + 5 * number_data_pairs
```mermaid
block-beta
MSG_HEADER:1
B["0x11"]:1
C["Pressure
float"]:1
D["Temperature
float"]:1
E["light
2 bytes"]:1
F["humidity
float"]:1
G["Number of data pairs
byte"]:1
block:aa:3
H["index 1
byte"]
I["gas resistance 1
float"]
J["..."]
end
```
# Notification messages
## Pressure
Total len: 18 + 5 = 23 bytes
```mermaid
block-beta
MSG_HEADER
B["0x01"]
C["value
float"]
```
## Temperature
Total len: 18 + 5 = 23 bytes
```mermaid
block-beta
MSG_HEADER
B["0x02"]
C["value
float"]
```
## Humidity
Total len: 18 + 5 = 23 bytes
```mermaid
block-beta
MSG_HEADER
B["0x03"]
C["value
float"]
```
## Light
Total len: 18 + 3 = 21 bytes
```mermaid
block-beta
MSG_HEADER
B["0x04"]
C["value
2 bytes"]
```