# The Things Network and Losant

**URL:** <https://forums.losant.com/t/the-things-network-and-losant/1589>\
**Category:** Help\
**Tags:** things-network, lora\
**Created:** [March 5, 2019, 4:12pm UTC](https://forums.losant.com/t/the-things-network-and-losant/1589 "2019-03-05T16:12:50Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![WoobaGooba](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/woobagooba/32/507_2.png) [@WoobaGooba](https://forums.losant.com/u/WoobaGooba)\
**Post date:** [March 5, 2019, 4:12pm UTC](https://forums.losant.com/t/the-things-network-and-losant/1589/1 "2019-03-05T16:12:50Z")

</div>

Has anyone done an integration with Losant the The Things Network? Much appreciated if you could share your details. Thanks

---

<div class="post-metadata">

**Author:** ![Brandon\_Cannaday](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/brandon_cannaday/32/14_2.png) [@Brandon\_Cannaday](https://forums.losant.com/u/Brandon_Cannaday)\
**Post date:** [March 5, 2019, 5:00pm UTC](https://forums.losant.com/t/the-things-network-and-losant/1589/2 "2019-03-05T17:00:58Z")

</div>

I’ve done a small project using The Things Network and Losant. The sensors were custom, but the same concepts apply to pretty much any LoRa device.

I used this Laird LoRa Gateway: [https://connectivity.lairdtech.com/wireless-modules/lorawan-solutions/sentrius-rg1xx-lora-enabled-gateway-wi-fi-bluetooth-ethernet](https://connectivity.lairdtech.com/wireless-modules/lorawan-solutions/sentrius-rg1xx-lora-enabled-gateway-wi-fi-bluetooth-ethernet)

The gateway has built-in support for The Things Network. I followed all the basic instructions for getting the sensor data to The Things Network backend. I then used their [HTTP Integration](https://www.thethingsnetwork.org/docs/applications/http/) to send the data to a [Losant Webhook](https://docs.losant.com/applications/webhooks/).

The Workflow that backs the Webhook then parses the data and saves it using the [Device State Node](https://docs.losant.com/workflows/outputs/device-state/).

---

<div class="post-metadata">

**Author:** ![WoobaGooba](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/woobagooba/32/507_2.png) [@WoobaGooba](https://forums.losant.com/u/WoobaGooba)\
**Post date:** [March 5, 2019, 5:35pm UTC](https://forums.losant.com/t/the-things-network-and-losant/1589/3 "2019-03-05T17:35:08Z")

</div>

Exactly what I was looking for thanks.

Did you do any Losant to LoRaWAN end-device communication, or just handle the uplink traffic?

---

<div class="post-metadata">

**Author:** ![Brandon\_Cannaday](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/brandon_cannaday/32/14_2.png) [@Brandon\_Cannaday](https://forums.losant.com/u/Brandon_Cannaday)\
**Post date:** [March 5, 2019, 5:45pm UTC](https://forums.losant.com/t/the-things-network-and-losant/1589/4 "2019-03-05T17:45:51Z")

</div>

I did not use any downlink functionality, however the HTTP Integration does also support queuing downlink messages. I would likely use the [HTTP Node](https://docs.losant.com/workflows/data/http/) to invoke that API call whenever downlink data needed to be sent.

---

<div class="post-metadata">

**Author:** ![Steve\_Barker](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@Steve\_Barker](https://forums.losant.com/u/Steve_Barker)\
**Post date:** [March 6, 2019, 9:36pm UTC](https://forums.losant.com/t/the-things-network-and-losant/1589/5 "2019-03-06T21:36:43Z")

</div>

I have completed an application with TTN and Losant using MQTT as the means of integration. It works very well. Essentially, every time a LoraWAN (TTN) device reports its state to the device server (TTN) an MQTT message is published. Losant can pick up this MQTT message, via a Losant integration, run a workflow and grab the data from the payload. I have found it to be very reliable, have had a number of nodes running and reporting regularly using this method. There is a fair bit of information in the TTN docs on MQTT and the workflow in Losant uses the standard functions, let me know if you need some further pointers. BTW you will need to set up a payload function in TTN as well to set up the state variables in the payload. Cheers.

---

<div class="post-metadata">

**Author:** ![WoobaGooba](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/woobagooba/32/507_2.png) [@WoobaGooba](https://forums.losant.com/u/WoobaGooba)\
**Post date:** [March 7, 2019, 4:22pm UTC](https://forums.losant.com/t/the-things-network-and-losant/1589/6 "2019-03-07T16:22:15Z")

</div>

OK I see both the Webhook and MQTT workflow triggers. I will give them a try in the next few days. Thank you

---

<div class="post-metadata">

**Author:** ![WoobaGooba](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/woobagooba/32/507_2.png) [@WoobaGooba](https://forums.losant.com/u/WoobaGooba)\
**Post date:** [March 14, 2019, 11:44am UTC](https://forums.losant.com/t/the-things-network-and-losant/1589/7 "2019-03-14T11:44:55Z")

</div>

Webhook seems to be working fine with both TTN and LoRaServer.

---

<div class="post-metadata">

**Author:** ![Jose\_Cruz](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/jose_cruz/32/1580_2.png) [@Jose\_Cruz](https://forums.losant.com/u/Jose_Cruz)\
**Post date:** [June 11, 2019, 6:03pm UTC](https://forums.losant.com/t/the-things-network-and-losant/1589/8 "2019-06-11T18:03:04Z")

</div>

Good thread; new to Losant looking to do the same integration with TTN. So @Steve_Barker and @WoobaGooba, did you created an HTTP integration on the TTN side and ’ paired ’ it to a 1) Losant integration 2) Losant Webhook 3) both?

Thanks! j

---

<div class="post-metadata">

**Author:** ![Steve\_Barker](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@Steve\_Barker](https://forums.losant.com/u/Steve_Barker)\
**Post date:** [June 12, 2019, 3:59am UTC](https://forums.losant.com/t/the-things-network-and-losant/1589/9 "2019-06-12T03:59:36Z")

</div>

Hi Jose. We completed the integration using MQTT - TTN automatically generates the data via MQTT each time a message is received from a device and it is a matter of configuring Losant to see the MQTT topic and data. No other integration is required, all works via MQTT.

---

<div class="post-metadata">

**Author:** ![Jose\_Cruz](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/jose_cruz/32/1580_2.png) [@Jose\_Cruz](https://forums.losant.com/u/Jose_Cruz)\
**Post date:** [June 12, 2019, 9:57pm UTC](https://forums.losant.com/t/the-things-network-and-losant/1589/10 "2019-06-12T21:57:12Z")

</div>

Awesome! Thank you for the info!

---

<div class="post-metadata">

**Author:** ![Bradley\_Douglas](https://avatars.discourse-cdn.com/v4/letter/b/a3d4f5/32.png) [@Bradley\_Douglas](https://forums.losant.com/u/Bradley_Douglas)\
**Post date:** [June 27, 2019, 7:41am UTC](https://forums.losant.com/t/the-things-network-and-losant/1589/11 "2019-06-27T07:41:07Z")

</div>

HI,  
Im new and trying to get Losant connected to TTN , which is the easiest way? any guidence will help or application note? i could not fins anything that i underatand ☹

---

<div class="post-metadata">

**Author:** ![JuliaKempf](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/juliakempf/32/2446_2.png) [@JuliaKempf](https://forums.losant.com/u/JuliaKempf)\
**Post date:** [June 27, 2019, 2:42pm UTC](https://forums.losant.com/t/the-things-network-and-losant/1589/12 "2019-06-27T14:42:15Z")

</div>

Hi @Bradley_Douglas,

This is going to depend on the protocol supported by your device, I would recommend looking for some documentation on your specific device. Above, the integration is done with MQTT, here is some [TTN documentation](https://www.thethingsnetwork.org/docs/applications/mqtt/).

Thanks!  
Julia

---

<div class="post-metadata">

**Author:** ![WoobaGooba](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/woobagooba/32/507_2.png) [@WoobaGooba](https://forums.losant.com/u/WoobaGooba)\
**Post date:** [June 27, 2019, 3:29pm UTC](https://forums.losant.com/t/the-things-network-and-losant/1589/13 "2019-06-27T15:29:41Z")

</div>

As discussed above, TTN can integrate with Losant either by using a Webhook or by using MQTT. I’ve been successful with Webhook. With TTN and Losant conencted, the next challenge will be decoding the LoRaWAN payload such that you can process that payload with Losant. Currently this is almost always end-device specific.
