Payload formatter dragino la66

Good morning everyone, I need help capturing information from my draginos la66 lorawan devices, I need to capture the information within the event details that are in the forward uplink data message, get the settings information (frequency, timestamp, time, coding_rate, bandwith, spreading_factor ), I tried to capture the payload formatter but I was unsuccessful, can you help me?

Event DETAILS
image

There is no access to those fields in the payload formatter.

But all of that JSON is sent along with the decoded payload to the core integrations - HTTP & MQTT for sure - so you can pick the data out at that end. Examples here: GitHub - descartes/TheThingsStack-Integration-Starters: Starter / Template code for various The Things Stack (v3) integrations

Good morning friend, firstly thanks for the support, when I consulted your link I did some tests and had this error, the mqtt link seems to be offline and does not respond to ping, I currently use nam1.cloud.thethings.network


Error Assign callbacks
Connect
Traceback (most recent call last):
  File "c:\Users\0100367\Documents\dev-python\app.py", line 122, in <module>
    mqttc.connect(theRegion.lower() + ".cloud.thethings.network", 8883, 60)
  File "C:\Users\0100367\Documents\dev-python\app\Lib\site-packages\paho\mqtt\client.py", line 1435, in 
connect
    return self.reconnect()
           ^^^^^^^^^^^^^^^^
  File "C:\Users\0100367\Documents\dev-python\app\Lib\site-packages\paho\mqtt\client.py", line 1598, in 
reconnect
    self._sock = self._create_socket()
                 ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\0100367\Documents\dev-python\app\Lib\site-packages\paho\mqtt\client.py", line 4609, in 
_create_socket
    sock = self._create_socket_connection()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\0100367\Documents\dev-python\app\Lib\site-packages\paho\mqtt\client.py", line 4640, in 
_create_socket_connection
    return socket.create_connection(addr, timeout=self._connect_timeout, source_address=source)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\0100367\AppData\Local\Programs\Python\Python312-32\Lib\socket.py", line 828, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\0100367\AppData\Local\Programs\Python\Python312-32\Lib\socket.py", line 963, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
socket.gaierror: [Errno 11001] getaddrinfo failed

image

OK, so general bits to clean up here to help us volunteers help you:

  1. Please format logs/text/code/errors using the </> tool - I’ve done this for you so I can see the details, but from now it’s up to you.
  2. Please don’t use screen shots when it can be copied and pasted.
  3. The forum, by agreement, is English first - you can post in your own language(s) of choice underneath the English - Google Translate is fine.

Combining those two points above, I can’t copy & paste your screen shot in to Translate myself because it’s text …

However I’ve used ping for about 35 years now so can deduce what it’s saying & it’s clear from the Python error that your internet connection is unable to resolve the server address - look at the last line. You will NOT be able to ping the server, it’s behind a load balancer on Amazon Web Services so that won’t give you a response. But nslookup will work:

nslookup nam1.cloud.thethings.network
Server: 194.168.4.100
Address: 194.168.4.100#53
Non-authoritative answer:
Name: nam1.cloud.thethings.network
Address: 54.219.100.33
Name: nam1.cloud.thethings.network
Address: 13.56.119.10

and a DNS lookup issue is the problem here. Please try it like I’ve done in bold above. If it can’t be found, you’ll need to look at why your internet is not connecting.

If you are venturing in to the land of LoRaWAN and MQTT then the details will bite back - so please consider reading error messages and Googling for some of the items you’re not sure about as this will save you a lot of time - this is an internet connection basics issue so plenty of articles to read.

1 Like