Problem with TTN stack V3

Hi all
Since a few months, i am afraid to change for TTN stack V3 …
And i just change because we don’t have choice …
My gateway is ok with V3
But my end Device are not !
i can see on my gateway that it receive datas from end devices but application not receive (sorry for my bad english)
of course i create new application on V3 but not work
if i put V2 Appkey on my device, it work !!!
Can you hezlp me please because i can’t create new device on V2

What is the device? If it’s a home-build, what code are you using (name, version)?

Did you add a device on v3?
Is it using ABP or OTAA?
Did you use the settings on v3 on the device?
Or did you put in the settings from the device on v3?

my device are Heltec Esp32 Lora V2
i added device on V3
it use ABP
for settings : i use V3 setting on device (it not work) and i tryed put device setting in V3 and not work too

Hi again
Now, application on V3 receive datas device (i don’t know why …) but my webhook seem not work . the same files (http integration on V2 work.
Payload are same on V2 and V3 ? or not ?

If you look inside the files, what do you find?

If you read the docs for v3, what do you find?

i readed the docs and i don’t find ! (

Where did you read?

https://www.thethingsnetwork.org/docs/the-things-stack/index.html

That’s v2 docs, try the v3 docs:

https://www.thethingsindustries.com/docs/reference/api/application_webhooks/

These examples may help, there is a PHP Webhook starter in it:

thanks
So if i understand,I have to redo all my php file because it is not same than V2, right ?

Why are you asking me this?

to be sure …
I find that the documentation is poorly done

Not sure what to say to that, if you have suggestions for improvements then file a GitHub issue. As you can see from my starter files I’ve done OK.

Did you look at the section with the examples of uplinks and downlinks?

i don’t know where are the examples !

A few sections down:

https://www.thethingsindustries.com/docs/reference/data-formats/

Maybe you need to spend some time looking around the docs so you know what information is available.

The moderators on this forum are all volunteers, and from what I’ve seen, very hard working volunteers. This is a free community support forum. If the documentation is not to your liking then take some time and suggest how to improve it.

2 Likes

For example, with V2, all is ok and here is my php file
// Decode payload_raw in Base64, gives you binary so turn in to a hex string
$asHex = strtoupper(bin2hex(base64_decode($payload_raw)));

// Example!
// This grabs the first two characters as hex and turns it in to a decimal number
$temp_int1 = hexdec(substr($asHex, 0, 4));
$temp_ext2 = hexdec(substr($asHex, 24, 4));
$humidity2 = hexdec(substr($asHex, 4, 4));
$poids1 = hexdec(substr($asHex, 8, 4));
$ruche1 = hexdec(substr($asHex, 12, 4));
$poids2 = hexdec(substr($asHex, 16, 4));
$ruche2 = hexdec(substr($asHex, 20, 4));
$temp_int2 = hexdec(substr($asHex, 28, 4));

But with V3, it not work …

Yes, you’ve established that, I know that, which is why I created the samples, you’ve got the docs, I’ve linked to the sample data formats, the next step is for you to look at the materials and get on with it.

No amount of posts are going to change the v3 format back in to v2.

This is the ONLY bit you really need to change, the reference to this.

1 Like

I don’t know exactly how you are receiving the data from TTN, assuming you use MQTT.

There are several things that have changed from TTN v2 to TTN v3:

  • the MQTT host has changed, for example: tcp://eu1.cloud.thethings.network
  • the MQTT topic now starts with “v3/”, so I suggest you subscribe to “v3/+/devices/+/up”
  • the MQTT payload is a bit different, described here Data Formats | The Things Stack for LoRaWAN
    → the raw payload is now in element “uplink_message”/“frm_payload”

!!!