dragino / lht65n
Dragino LHT65N
The LHT65N is widely used for environmental monitoring. Payload layout varies by firmware; treat the bundled decoder as a starting point and verify against live uplinks.
Tips
- Compare raw hex with the Dragino decoding sheet for your firmware revision.
- If values look wrong, check endianness and whether the probe is wired for external mode.
Decoder
Copy into ChirpStack or paste in the playground.
// Dragino LHT65N — temp / humidity sensor (example decoder; confirm with your FW)
function decodeUplink(input) {
try {
const bytes = input.bytes;
const decoded = {};
if (bytes.length >= 7) {
decoded.battery_v = (((bytes[0] << 8) | bytes[1]) & 0x3fff) / 1000;
const humRaw = ((bytes[2] << 8) | bytes[3]) / 10;
decoded.relative_humidity = Math.round(humRaw * 10) / 10;
const tempRaw = ((bytes[4] << 8) | bytes[5]) / 100;
decoded.temperature = Math.round(tempRaw * 100) / 100;
decoded.sn = `${bytes[4].toString(16)}`; // simplistic; FW-dependent
decoded.sensor_type = bytes[6];
} else if (bytes.length >= 5) {
decoded.external_di = bytes[0];
decoded.battery_mv = (((bytes[1] << 8) | bytes[2]) & 0x3fff) * 10;
const t = ((bytes[3] << 8) | bytes[4]) / 100;
decoded.temperature = t;
}
return { data: decoded };
} catch (err) {
return { errors: [`Decoder error: ${err.message}`] };
}
}