# Connecting Dragino LSE01 to ThingsSpeak or MyDevices

**URL:** <https://www.thethingsnetwork.org/forum/t/connecting-dragino-lse01-to-thingsspeak-or-mydevices/46914>\
**Category:** End Devices (Nodes)\
**Created:** [April 20, 2021, 12:01pm UTC](https://www.thethingsnetwork.org/forum/t/connecting-dragino-lse01-to-thingsspeak-or-mydevices/46914 "2021-04-20T12:01:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mbruj](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/mbruj/32/37519_2.png) [@mbruj](https://www.thethingsnetwork.org/forum/u/mbruj)\
**Post date:** [April 20, 2021, 12:01pm UTC](https://www.thethingsnetwork.org/forum/t/connecting-dragino-lse01-to-thingsspeak-or-mydevices/46914/1 "2021-04-20T12:01:14Z")

</div>

Hi,  
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.  
 ![image](https://www.thethingsnetwork.org/forum/uploads/default/original/3X/b/a/ba8ecb9fefc6b72e7592b735f2a4a1d4ef1732a2.png)  
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)
    temp_SOIL=(value/100).toFixed(2);//temp_SOIL,temperature,units:Â°C
   else if((value & 0x8000)>>15 === 1)
    temp_SOIL=((value-0xFFFF)/100).toFixed(2);//temp_SOIL,temperature,units:Â°C
   
   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!!!

---

<div class="post-metadata">

**Author:** ![descartes](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/descartes/32/47220_2.png) [@descartes](https://www.thethingsnetwork.org/forum/u/descartes)\
**Post date:** [April 20, 2021, 3:46pm UTC](https://www.thethingsnetwork.org/forum/t/connecting-dragino-lse01-to-thingsspeak-or-mydevices/46914/2 "2021-04-20T15:46:05Z")

</div>

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

Please read **[THIS](https://www.thethingsnetwork.org/forum/t/how-do-i-format-my-forum-post-howto/8735)** 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:

[https://www.thethingsnetwork.org/docs/applications/index.html](https://www.thethingsnetwork.org/docs/applications/index.html)

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.

---

<div class="post-metadata">

**Author:** ![bertrik](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/bertrik/32/35697_2.png) [@bertrik](https://www.thethingsnetwork.org/forum/u/bertrik)\
**Post date:** [April 20, 2021, 8:40pm UTC](https://www.thethingsnetwork.org/forum/t/connecting-dragino-lse01-to-thingsspeak-or-mydevices/46914/3 "2021-04-20T20:40:17Z")

</div>

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 [cayenne.mydevices.com](http://cayenne.mydevices.com): [LoraLuftdatenForwarder/LoraLuftdatenForwarder/src/main/java/nl/bertriksikken/mydevices at master · bertrik/LoraLuftdatenForwarder · GitHub](https://github.com/bertrik/LoraLuftdatenForwarder/tree/master/LoraLuftdatenForwarder/src/main/java/nl/bertriksikken/mydevices)

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).
