TTNMapper with V3 and the Adeunis Field Tester

Hi Guys,

My Goal is to add an Adeunis Field Tester to ttnmapper and export a coverage map.

I’ve added an Adeunis Field Tester to TheThingsIndustries (or do we refer to TheThingsNetwork or TheThingsStack still?) V3. The life data arrives nicely with GPS information:

          "time": "2022-06-14T09:05:00.030710935Z",
          "timestamp": 2394463123,
          "rssi": -93,
          "channel_rssi": -93,
          "snr": 8.25,
          "location": {
            "latitude": 48.26856197142314,
            "longitude": 11.665407121181488,
            "source": "SOURCE_REGISTRY"

I have followed this manuel from ttnmapper.org: The Things Stack integration | TTN Mapper Documentation

The webhook displays as alife:
grafik

But I cannot see data on ttnmapper.org using my device id: eui-18b20000021264
On this page

I have just waited around 20minutes between adding the webhook, uploading some data and trying to see it on ttnmapper.org.

I think I might just be missing a tiny step.

Alright, my fault was that I didn’t use a payload decoder. This one is working:

But this information was also provided in the documentation:

Make sure you have a Payload decoder function enabled on the TTN Console that decodes the raw payload into a json object. The JSON object should contain the keys “latitude”, “longitude” and “altitude” and one of “hdop”, “accuracy” or “sats”. When using the Cayenne LPP data format, the GPS coordinates will be decoded into a different JSON format, but this format is also supported. Cayenne LPP does not contain a GPS accuracy, and therefore this data will be considered as inferior and will carry less weight in calculation of coverage, and will be deleted first during data cleanup.

Hi is this working for you?

I am not able to push the data via WebHook to the TTN-Mapper.

The message is decoded and the attributes latitude, longitude and sats is provided. Should i see “WebHook” Messages in the Live-Data? Because currently i do not.

"uplink_message": {
      "f_port": 1,
      "f_cnt": 445,
      "frm_payload": "nxJHUwBwASUScDju3w+fffg=",
      "decoded_payload": {
        "altitude": 0,
        "battery": 3999,
        "downlink": 223,
        "latitude": 47.88345,
        "longitude": 12.8545,
        "rssi": -125,
        "sats": 8,
        "snr": -8,
        "temperature": 18,
        "uplink": 238
      }

Is the data arriving in TTNMapper? Look for your device specifically → Advanced Maps, enter your device details and a decent range of date when you know functional and with good GPS view…even if quality of data not good enough for main map presentation you should see your device info in specific advanced map…

Can not see anything. Also when trying advanced maps with euid of the GPS-Tracker.

Does TTN Mapper need the Join Informations? Because my device is ABP (Activation by Personalization) activated, so there is no join-message.

Should i see anywhere in the Console (Debug / Live Data), that the Integration sent data to the TTN Mapper?

I also have enabled MQTT and can see that messages are broadcasted. But there is no accuracy in the message. The decoder supplies sats (count of sattelites) but this is not provided via the “Integration”. Perhaps this is why TTN Mapper does not collect the data.

EDIT: Now i am getting “Fail to send Webhook”

{
  "name": "as.webhook.fail",
  "time": "2023-03-28T12:50:52.110901884Z",
  "identifiers": [
    {
      "device_ids": {
        "device_id": "eui-0018b20000021af7",
        "application_ids": {
          "application_id": "stw-frlg-water-meters"
        },
        "dev_eui": "0018B20000021AF7",
        "dev_addr": "01CE73FC"
      }
    }
  ],
  "data": {
    "@type": "type.googleapis.com/ttn.lorawan.v3.ErrorDetails",
    "namespace": "pkg/applicationserver/io/web",
    "name": "request",
    "message_format": "request",
    "correlation_id": "bc96796e42e04031bc328f2e6225d257",
    "code": 14,
    "details": [
      {
        "@type": "type.googleapis.com/google.protobuf.Struct",
        "value": {
          "body": "{\"message\":\"uplink_message not set\",\"success\":false}\n",
          "status_code": 400,
          "url": "https://integrations.ttnmapper.org/tts/v3/uplink-message",
          "webhook_id": "stadtwerke-adeunis-field-tester"
        }
      }
    ]
  },
  "correlation_ids": [
    "as:up:01GWM4AW1F2WGZ4RW2G6YJSJ9M",
    "gs:conn:01GWM08CPNQJ66YNB352DGMPD5",
    "gs:up:host:01GWM08CPRN43AFB40FHQH5T98",
    "gs:uplink:01GWM4AVTVH4V1B5MCK3RQ01D6",
    "ns:uplink:01GWM4AVTVJ9YN020P2MCP10XN",
    "rpc:/ttn.lorawan.v3.GsNs/HandleUplink:01GWM4AVTV82R51RAYA8CMJ5VR",
    "rpc:/ttn.lorawan.v3.NsAs/HandleUplink:01GWM4AW1E3ND5FAD5A7QJS3QT"
  ],
  "origin": "ip-10-100-13-148.eu-west-1.compute.internal",
  "context": {
    "tenant-id": "CgN0dG4="
  },
  "visibility": {
    "rights": [
      "RIGHT_APPLICATION_TRAFFIC_READ"
    ]
  },
  "unique_id": "01GWM4AW2E4XJNPX47SRZ31HRG"
}

Somewhere in the fog of time IIRC there was a mis-stated url for TTNMapper integration (from around the time of TTNMapper starting to initially support TTNV3 whilst TTNV2 was alive? IIRC - so likely 2020/21’ish) - double check you are using the correct one and havent picked up the wrong one through e.g. a (google?) search etc…

Not in a position to double check myself right now…

Please check on TTN Mapper

Your webhook needs to match.

Do not know if this was the solution:

Instead of adding “sats” to to the JSON Output i put “sattelites” in it and now i can see my device in advanced maps.

Perhaps there is a misspelling in the documentation.

Also it is not helpful, that the TTN Console will not show what WebHook is sending to the TTN Mapper.

Click on the line and you can see all of the output that is sent including the payload formatter results - which you can test on the Payload Formatter layout and again, see exactly what output YOU have coded.

like erm

:wink:

1 Like

‘In addition the JSON object should preferably contain one of the following keys “hdop”, “accuracy” or “sats”.’

You don’t necessarily need “sats”, you can have “hdop ” or “accuracy ” or you can omit it.

This is to help control accuracy of the data

This is all clear to me. And my Payload Formatter is correct. I get the data that is requested by TTN-Mapper (hdop, accuracy or sats). I was sending sats as { “sats”: 9 } but this was not the solution. After adding { “satellites”: 9 } the points showed on the map. - Perhaps that was not the trick, but after adding the attribute “satellites”, it worked for me.

Sorry but i can not see any Debug-Message that says “Send data via WebSocket to TTN-Mapper”. Only what i can see is “Forward location solved message” but there is only latitude and longitude in the message. So where are all other informations as altitude and sats / satellites?

And you never will, mostly because the console doesn’t say what integration(s) it has forwarded the data to and on a technical level, it doesn’t use web sockets - please don’t let your frustration with the learning curve spill over to the volunteers answering your questions.

If you click on the line that says “Forward uplink data message”, the one that shows your payload formatter results, you will see the JSON that is forwarded to the integration(s). Everything you see in the “data” object apart from the @type line is exactly what was sent.

As for the “Forward location solved message” all the details are in the docs, if you run your own web hook or an MQTT client you will see what information is in that payload - but it’s not in the TTN Mapper docs which uses the web hook.