embedded_raumsenor_lorawan/LoRaWAN_Payload_Description.md
2025-10-15 11:11:49 +02:00

1.8 KiB

LoRaWAN Payload Description - Raumsensor Device

Port: 2 Length: 7 bytes Format: Binary

Byte Field Type Unit Description
0-1 Room Temperature int16_t 0.01°C SHT4x sensor reading (big-endian)
2-3 Floor Temperature int16_t 0.01°C MLX90614 IR sensor reading (big-endian) *
4-5 Humidity int16_t 0.01% SHT4x sensor reading (big-endian)
6 Relay State uint8_t - Current relay status (0=OFF, 1=ON)

Example Uplink:

  • 08 34 0A 28 15 E0 01 = 21.00°C room, 26.00°C floor, 56.00% humidity, relay ON

Port: Any Format: ASCII commands

Relay Control Commands

Command Length Format Description
r1 0 4 bytes ASCII Force relay OFF + disable auto control
r1 1 4 bytes ASCII Re-enable automatic temperature control

Temperature Threshold Commands

Command Length Format Description
t1[temp] 3 bytes ASCII + uint8 Set room temperature threshold (°C)
t2[temp] 3 bytes ASCII + uint8 Set floor temperature threshold (°C)

Examples:

  • 72 31 20 30 (r1 0) = Force relay OFF
  • 72 31 20 31 (r1 1) = Enable auto control
  • 74 31 16 (t1 + 22) = Set room threshold to 22°C
  • 74 32 1A (t2 + 26) = Set floor threshold to 26°C

Data Conversion

  • Temperature: value = (int16_t)(temperature * 100)
  • Humidity: value = (int16_t)(humidity * 100)
  • Decoding: actual_value = received_value / 100.0

Special Cases

* Floor Temperature Sensor: If the MLX90614 sensor is not available or not responding, the floor temperature will be transmitted as -273.15°C (hex: 95 5D).