Hi there
I recently played around with some LoRa-sensors for my garden. I bought a Dragino LSPH01 to measure the temp and pH-value of my lawn.
I connected the sensor to my local Chirpstack and I can also see the values via MQTT.
The payload I see in MQTT-Explorer is:
{
"deduplicationId": "XX",
"time": "2026-03-28T09:50:42.701+00:00",
"deviceInfo": {
"tenantId": "XX",
"tenantName": "XX",
"applicationId": "XX",
"applicationName": "Dragino LSPH01",
"deviceProfileId": "XX",
"deviceProfileName": "Dragino LSPH01",
"deviceName": "Dragino LSPH01",
"devEui": "XX",
"deviceClassEnabled": "CLASS_A",
"tags": {}
},
"devAddr": "XX",
"adr": true,
"dr": 0,
"fCnt": 0,
"fPort": 2,
"confirmed": false,
"data": "XX",
"object": {
"Interrupt_flag": 0,
"TempC_DS18B20": "0.00 °C",
"Message_type": 1,
"PH1_SOIL": "7.01",
"Bat": "3.399 V",
"TEMP_SOIL": "24.60",
"Node_type": "LSPH01"
},
"rxInfo": [
{
"gatewayId": "XX",
"uplinkId": 36283,
"gwTime": "2026-03-28T09:50:42.701409+00:00",
"nsTime": "2026-03-28T09:50:42.726080832+00:00",
"timeSinceGpsEpoch": "1458726660.701s",
"rssi": -25,
"snr": 7.2,
"channel": 6,
"rfChain": 1,
"location": {
"latitude": XX,
"longitude": XX,
"altitude":XX
},
"context": "XX",
"crcStatus": "CRC_OK"
}
],
"txInfo": {
"frequency": 868300000,
"modulation": {
"lora": {
"bandwidth": 125000,
"spreadingFactor": 12,
"codeRate": "CR_4_5"
}
}
},
"regionConfigId": "eu868"
}
I would like to read out the temp for a test:
"TEMP_SOIL": "24.60",
This is my latest YAML, I tried dozens of variations though.
mqtt:
sensor:
- name: "LSPH01 Temp"
unique_id: lsph01_boden_temp
state_topic: "application/XX/device/XX/event/up"
value_template: "{{ (value | from_json).object.TEMP_SOIL | float(0) }}"
unit_of_measurement: "°C"
state_class: measurement
I spent hours with Chat GPT, Gemini however they could not help and I cannot identify why it doesn’t work. Would appreciate any help from you guys, probably its just a small thing that I am missing.
Best,
Andrew