PS-LB - payload decoder

27 views
Skip to first unread message

Andrew

unread,
Apr 6, 2025, 7:59:08 PMApr 6
to Dragino-user
Hi All,

For some reason my immersion level sensor payload decoder isnt working.   You can see from below it is measuring 8.563ma but 0cm (in bold below).   I'm using the current decoder from github.

{
  "f_port": 1,
  "frm_payload": "DgoAACFzAAAA",
  "decoded_payload": {
    "Bat_V": 3.594,
    "Exti_pin_level": "Low",
    "Exti_status": "False",
    "IDC_Roc_flagH": "FALSE",
    "IDC_Roc_flagL": "FALSE",
    "IDC_intput_mA": 8.563,
    "IN1_pin_level": "Low",
    "IN2_pin_level": "Low",
    "Probe_mod": "0000",
    "VDC_Roc_flagH": "FALSE",
    "VDC_Roc_flagL": "FALSE",
    "VDC_intput_V": 0,
    "Water_deep_cm": 0

b jg

unread,
Apr 6, 2025, 11:15:14 PMApr 6
to Dragino-user
Hi, Andrew
You need to set the sensor type for your immersion sensor.
Please refer to the image below:
7441d196c56d3cbe94dcdc9ee2ee6a4.png
Thanks

Anna Black

unread,
May 10, 2025, 4:59:23 AMMay 10
to Dragino-user
I had the same thing and I did eventually work it out as B JG says.
But as a temporary measure I just hard-coded the value of the sensor model in the formatter code. I haven't got the details to hand but I remember it was something to do with the third byte in the payload and I hard-coded it to '3' because I have a 3m cable version. And then that made the depth value correct.

Later on, after I send the commands to the device to set the probe model I removed the hard-coding.
If this is helpful to anybody I can probably find the code that I changed; but setting the probe_model is the right answer of course.

AB
Reply all
Reply to author
Forward
0 new messages