You can show the location of a Thing on the TTN Coverage Map. And also a line to the LoRaWan gateway(s) it uses to communicate to TTN. Things that have a GPS on board, can send that info themselves. But an Arduino MKR WAN 1310 doesn't have that option. In this post I'll show how you can make it work anyway.
image: Thing and the LoRaWan gateway it's using to talk to TTN
Prerequisites:
- In a previous post I showed how to set up an Arduino MKR WAN 1310 on The Things Network (TTN) . You should have that working.
- know the location of the Arduino: latitude, longitude and altitude
- have the Arduino in a fixed location.
Configure the coordinates on TTN console
When you tell TTN where your thing is located, it will add those coordinates to your payload. TTN adds a number of other attributes (gateway, time, ...), and the does the same with location:
Open the console, and navigate to the device that represents your Arduino.
Once that's done and saved, the info is added to the payload. But you will not appear on the map yet.
Integrate with the coverage map
TTN Mapper integrates with a Webhook. Create a new one for your application. Select TTN Mapper.
Enter a name for the webhook, and your email: Create the webhook.
You 'll get a configuration comparable with this:
All done.
Test
Let your Arduino send an uplink. That will bring it on the coverage map. The easiest way to check is by using an advanced map. There, you can enter the Device ID of your Arduino, and it 'll pop up. Together with a line that links it with the gateway that picked up your signal.
Result in my case:
There's also a CSV view, where you can see the database entries of the Arduino (click to enlarge):
You 've now joined the coverage community. Your device is part of the heatmap. Unlike gateways, that are published with info (if you allow that), the Things attributes are not available to others. But you know that that pixel is your pixel. Enjoy!