Connecting Dragino LSE01 to ThingsSpeak or MyDevices

I am also using Dragino LG 308, to TTN v2, this works.
I added the gateway and the status is connected v.2.
However I am trying to integrate my sensor LSE 01 Humidity to THE things Speak, or My devices, and it doesn’t show any information in the platform integrated.
This is my decoder code for my sensor: Doesn’t send information to any platform

function Decoder(bytes, port) {
  // Decode an uplink message from a buffer
  // (array) of bytes to an object of fields.
  var value=(bytes[0]<<8 | bytes[1]) & 0x3FFF;
  var batV=value/1000;//Battery,units:V

  value=bytes[2]<<8 | bytes[3];
  if(bytes[2] & 0x80)
  {value |= 0xFFFF0000;}
   var temp_DS18B20=(value/10).toFixed(2);//DS18B20,temperature,units:℃
   value=bytes[4]<<8 | bytes[5];
   var water_SOIL=(value/100).toFixed(2);//water_SOIL,Humidity,units:%
   value=bytes[6]<<8 | bytes[7];
   var temp_SOIL;
   if((value & 0x8000)>>15 === 0)
   else if((value & 0x8000)>>15 === 1)
   value=bytes[8]<<8 | bytes[9];
   var conduct_SOIL=(value);//conduct_SOIL,conductivity,units:uS/cm

  return {
       Bat:batV +" V",
       TempC_DS18B20:temp_DS18B20+" °C",
       water_SOIL:water_SOIL+" %",
       temp_SOIL:temp_SOIL+" °C",
       conduct_SOIL:conduct_SOIL+" uS/cm"

Do you know which code do I need to use in the payload? or what else could I do?

Maybe someone knows how to connect.

Thanks in advance!!!

Moved to own topic as nothing to do with TTN v3 & LG308.

Please read THIS post on how to format posts.

The decoder will decode but it seems you are trying to find a way to get the data out of TTN and on to somewhere the data can be displayed.

In that instance, Integrations are where you need to look:

Please bear in mind that, a, v2 will close by year end and b, there is no myDevices in v3 and we don’t know when or if there will be.

Since the Cayenne integration no longer works with TTNv3, I wrote my own forwarding application in Java. Maybe you can do something similar, e.g. in Java or python. This is the part that uploads to LoraLuftdatenForwarder/LoraLuftdatenForwarder/src/main/java/nl/bertriksikken/mydevices at master · bertrik/LoraLuftdatenForwarder · GitHub

It uses the HTTP POST method, with basic authentication. You need three pieces of information to push data:

  • client name
  • client password
  • client id, this is basically an id of your device
    Their API also accepts data through an MQTT connection, basically using the same set of credentials.

The way I implemented it, is that I put the credentials into three device attributes, that can be set through the console. At regular intervals my program retrieves these device attributes from TTN through the TTN end device registry API. So this way, I can easily configure devices for their data to be forwarded (or allow a collaborator to configure it).