initial
This commit is contained in:
29
docs/decoding.txt
Normal file
29
docs/decoding.txt
Normal file
@ -0,0 +1,29 @@
|
||||
Soil - LSE01
|
||||
|
||||
http://wiki.dragino.com/xwiki/bin/view/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LSE01-LoRaWAN%20Soil%20Moisture%20%26%20EC%20Sensor%20User%20Manual/
|
||||
|
||||
|
||||
Value, Size (bytes)
|
||||
Battery (mV), 2
|
||||
Moisture (%), 2
|
||||
Temperature, 2
|
||||
Conductivity(uS/cm), 2
|
||||
Status, 1
|
||||
|
||||
|
||||
import base64
|
||||
import struct
|
||||
|
||||
payload = 'DQYCjAAAAAE='
|
||||
frame = base64.b64decode(payload)
|
||||
|
||||
battery = struct.unpack('>H', frame[0:2])[0]
|
||||
moisture = struct.unpack('>H', frame[2:4])[0]
|
||||
temperature = struct.unpack('>H', frame[4:6])[0]
|
||||
conductivity = struct.unpack('>H', frame[6:8])[0]
|
||||
status = struct.unpack('?', frame[8:9])[0]
|
||||
|
||||
print(f"{battery=}, {moisture=}, {temperature=}, {conductivity=}, {status=}")
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user