Dragino LHT52 Sensor codec issue (str_pad is not defined)

Viewed 7

Newbie here, I'm using a dragino LPS8-V2 and was hoping to get started with a "simple" climate gauge.

I set the LHT52 sensor up with the codec here: https://github.com/dragino/dragino-end-node-decoder/blob/main/LHT52/LHT52%20Decoder%20Chirpstack%20V4%20.txt

After I got the sub-channels worked out, I got an error
"JS error: Error: str_pad is not defined at Decode (eval_script:95:3) at decodeUplink (eval_script:4:26) at (eval_script:104:22) "

The vendor has not been responsive. Maybe this was the wrong thing to do, but, I took out the str_pad key words and now the error is gone. Pretty sure the code is subtly wrong, because there's no other data. Is there a way to debug the codec?

This is all very new to me, so I am not sure what my options are.
I can hope the vendor comes back with a patch?
Is there a way for me to get the message out of a mosquitto topic? And then I assume I need to decode the message body. Am I missing something?

Finally, if someone can recommend another indoor temperature sensor available in the U.S., that would be great.

"JS error: Error: str_pad is not defined at Decode (eval_script:95:3) at decodeUplink (eval_script:4:26) at <eval> (eval_script:104:22) "
2 Answers

@orne Brocaar, thank you for your attention.

I now get an "up" event in the logs with the metrics buried in the message. (See below)

TempC_SHT looks/feels right for the inside temperature.

My end goal is to have a grafana dashboard with the data graphed. I can write the script to do the message transformation. Do I now subscribe to the topic in Mosquitto to get the data?

Systimestamp:1773159028
Hum_SHT:37.9
Ext:1
Node_type:"LHT52"
TempC_DS:327.67
TempC_SHT:23.32