Device ID not Populating in HTTP Integration URL

Hi Community

I am busy integrating a LoRaWAN device with the Thinger.IO platform, through the use of The Things Network and the TTN plugin available on Thinger.IO.

So far I have the uplink working perfectly, but I am currently having problems with the downlink.

Thinger.IO supplies two separate URLs for the uplink and downlink HTTP integration. The downlink URL needs to end with the device ID, as follows:

Thinger.IO Recommend Downlink URL

If I “hardcode” the downlink URL when setting up the HTTP integration (see below), the downlink integration works fine, but my problem is that since there will be multiple devices in an application (I already have two devices registered), this downlink URL needs to be auto-populated with the relevant device IDs.

Hardcoded Downlink URL

I have tried the following method of setting up the dwonlink HTTP integration and after reading other posts on the forum, I’m sure that the name for the device ID (dev_id) is correct, but checking the HTTP post on request basket (https://rbaskets.in/), the device ID (dev_id) does not auto-populate with the relevant device ID (lorawan_dev_device).

Downlink URL for Auto-populating Device ID
URL from TTN

Downlink URL for Testing on Request Basket
Request Basket Test URL

Below is what Request Basket received:
image
image

Hope that someone can assist me.

P.S. I had to blank out part of the URLs for privacy purposes.

In the TTN Integration, changing the URL is not supported; see How add data field to URL in HTTP Integration?

But it seems the redacted URLs are not the URLs as configured in the integration? (The HTTP Integration only allows for one URL, as invoked after an uplink.) Then I don’t know. Seems to be a question for Thinger.IO then?

Hi Arjan

Thanks for the response.

So are you saying that TTN does not support adding custom data or variables into the URL as I’m trying to do or as one can do on the Sigfox backend for instance:

https://www.examplewebsiteurl.com/callback?ts={time}&deviceType=MY_DEVICE_TYPE&latitude={lat}&longitude={lng}&ack={ack}

I can ask support on Thinger.IO, but if that is the format that they require the URL to be in, I can see how they will be able to assist.

I read somewhere in the support documentation that multiple HTTP integrations are allowed and both Thinger.IO and Request Bucket received the uplink.

Well, yes:

Following the links in the responses to the above topic will give you at least 4 examples to get it done (for uplinks), but all need intermediate servers. That’s all there is to say.

That might very well be possible, but within TTN Console the HTTP Integration has no configuration for “a downlink URL”. Instead, to schedule a new downlink the integration supplies a downlink URL in the payload of whatever URL is triggered for an uplink. (Also visible in your screenshot. Aside: note that invoking that URL might only yield a downlink after the next uplink; see My application’s downlink is always queued for next uplink.) Adding the HTTP integration to a single application multiple times, will make all of them be triggered for each uplink, and using the very same details.

Within TTN, the HTTP Integration is not triggered for a downlink.

If you need something triggered at Thinger.IO when a downlink happens (so: when a downlink is scheduled, and/or when it’s transmitted), then you’ll need an intermediate server that subscribes to events of the MQTT API. However, those MQTT events are only notifications; they do not schedule a downlink if that’s what you’re after.