LHT65N- with SHT31 Sensor

Hi,

i have an LHT65N with SHT31 external Sensor. But I can’t get it in the right working mode, to get the results from the external Sensor. The User Manual says für SHT31 you have to set EXT=11. So I sent Downlink A2 11 but it doesn’t work. Receiving Downlink commands it self works, I can change TX Intervall and EXT value. If I Send A02 00 for example then no more values are transmitted. If I send A02 01 again, die LHT starts with sending values. So connectivity is ok, it’s only the Problem to get it in the right working mode for the SHT31 external sensor.

What is the firmware version on your device?

I don’t know how to get the Firmware Version. I only have OTA Access to the device. I bought it 2 weeks ago. I ordered the LHT65 with SHT31 Sensor as package. So I thought it will work out of the box.

That looks like Ext=17 (the uplink is using HEX values). Try A2 0B

With A20B the Output Changes but not in the Right way. Still no data Form the external Sensor.

Maybe it‘s the wrong Firmware. I think i have to buy a TTL dongle to Update the Firmware.

Today I made some more tests. Maybe I found the Problem. In the Decoder is no section for Ext=11 but I couldn’t find a proper decoder on Draginos Dropbox.
Does somebody know how I can get a proper decoder?

That’s the decoder I’m using right now
function str_pad(byte){
var zero = ‘00’;
var hex= byte.toString(16);
var tmp = 2-hex.length;
return zero.substr(0,tmp) + hex + " ";
}

function decodeUplink(input) {
var port = input.fPort;
var bytes = input.bytes;
var Ext= bytes[6]&0x0F;
var poll_message_status=(bytes[6]&0x40)>>6;
var Connect=(bytes[6]&0x80)>>7;
var data = {};
switch (input.fPort) {
case 2:
if(Ext==0x09)
{
data.TempC_DS=parseFloat(((bytes[0]<<24>>16 | bytes[1])/100).toFixed(2));
data.Bat_status=bytes[4]>>6;
}
else
{
data.BatV= ((bytes[0]<<8 | bytes[1]) & 0x3FFF)/1000;
data.Bat_status=bytes[0]>>6;
}

if(Ext!=0x0f)
{
data.TempC_SHT=parseFloat(((bytes[2]<<24>>16 | bytes[3])/100).toFixed(2));
data.Hum_SHT=parseFloat((((bytes[4]<<8 | bytes[5])&0xFFF)/10).toFixed(1));
}
if(Connect==‘1’)
{
data.No_connect=“Sensor no connection”;
}

if(Ext==‘0’)
{
data.Ext_sensor =“No external sensor”;
}
else if(Ext==‘1’)
{
data.Ext_sensor =“Temperature Sensor”;
data.TempC_DS=parseFloat(((bytes[7]<<24>>16 | bytes[8])/100).toFixed(2));
}
else if(Ext==‘4’)
{
data.Work_mode=“Interrupt Sensor send”;
data.Exti_pin_level=bytes[7] ? “High”:“Low”;
data.Exti_status=bytes[8] ? “True”:“False”;
}
else if(Ext==‘5’)
{
data.Work_mode=“Illumination Sensor”;
data.ILL_lx=bytes[7]<<8 | bytes[8];

}
else if(Ext==‘6’)
{
data.Work_mode=“ADC Sensor”;
data.ADC_V=(bytes[7]<<8 | bytes[8])/1000;
}
else if(Ext==‘7’)
{
data.Work_mode=“Interrupt Sensor count”;
data.Exit_count=bytes[7]<<8 | bytes[8];
}
else if(Ext==‘8’)
{
data.Work_mode=“Interrupt Sensor count”;
data.Exit_count=bytes[7]<<24 | bytes[8]<<16 | bytes[9]<<8 | bytes[10];
}
else if(Ext==‘9’)
{
data.Work_mode=“DS18B20 & timestamp”;
data.Systimestamp=(bytes[7]<<24 | bytes[8]<<16 | bytes[9]<<8 | bytes[10] );
}
else if(Ext==‘15’)
{
data.Work_mode=“DS18B20ID”;
data.ID=str_pad(bytes[2])+str_pad(bytes[3])+str_pad(bytes[4])+str_pad(bytes[5])+str_pad(bytes[7])+str_pad(bytes[8])+str_pad(bytes[9])+str_pad(bytes[10]);
}

if(poll_message_status===0)
{
if(bytes.length==11)
{
return {
data:data,
}
}
}
break;
default:
return {
errors: [“unknown FPort”]
}

}

}

Now I found the solution my self. I found an appropriate decoder on GitHub. https://github.com/dragino/dragino-end-node-decoder/blob/main/LHT65N/LHT65N-TTN-v1.4.1_decode.txt

It works out of the box. Thank’s for your Help !

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.