Integration from The Things Network with Ubidots: var in ubidots are not updated


#1

Hello everyone.
To create the examples for a IOT course, I created in The Things Network an application that receives data from a device via lorawan.
I inserted a decoding function that converts the payload into json format.
For example, the payload: 69637470202020200019200202850014181C0F00
is converted to this json data:
{
“DELAY”: 0,
“PS”: 0,
“P_BME280”: 1018.3,
“RH_BME280”: 14.4,
“TXT”: "ictp ",
“T_BME280”: 24.5,
“V_A3”: 2,
“V_IN”: 3.2,
“V_MCU”: 2.5
}
Following your tutorial:


I added to my TTN application “the Ubidots Integration”.
I set these parameters: selected “default key” in the Access Key dropdown menu and entered my Ubidots TOKEN.
This is my Ubidots page corresponding to the device that generates the TTN data:
https://app.ubidots.com/ubi/datasources/#/detail/5c94b773591636533f571791
In this page, I see 9 variables with the same name of the json variables of my TTN application, but the values are never updated.
For all variables on Ubidots the message “No last activity” continues to be displayed, while on TTN every minute the page continues to be updated with new values.
I canceled my ubidots for education account and repeated the TTN integration steps several times.
The result is always the same: on ubidots my variables are never updated.
What should I do to solve the problem?
Does my educational account on Ubidots have to be somehow enabled?


#2

Greetings, the official TTN-Ubidots integration was created for industrial applications and uses this endpoint:

https://industrial.api.ubidots.com

As actually you are using an educational account, it is expected that your integration does not work. My advise is to create a custom request using AJAX at your function decoder and to make the request directly from your decoder.

Said this, the variable below:

“TXT”: "ictp ",

does not have a numerical value, Ubidots always expects a number as value, not a string, so that particular value should be:

“TXT”: {"value": 1, "context". {"txt": "ictp"}},

All the best