New API for gateway mapping, status and info

A Node-red tool around the TTN Gateway Radius and Gateway API

image

4 Likes

Added an new table calculating and displaying the distance and azimuth from the new node to gateways.

image

Also add a window calling on @avbentem airtime-calculator for TTN and a window calling on The Things Network Status Page

Hiya, this works nicely for the community edition, but I can’t get it working for our private instance. I assumed I just needed to change tenantID from ttn to our instance name, but that just returns an empty array. Is there some kind of authentication step I am missing?
Many thanks

You will have to change the url’s as well.

Thanks Nick - any idea what the url ought to be? I have made many guesses…

Doh, replied too fast, it’s not on the instances so it’s not a TTS API call.

Do you have packet broker turned on for your instance?

Yes I believe we do - our gateways forward stuff to community apps and our apps receive messages from community gateways via packetbroker

I’ll have a look at mine, if you get my drift.

1 Like

Which TTS version are you running?

Are the gateway locations and statuses public? See gateway settings in the Console.

You should be using your NetID and tenant ID with which you connect to Packet Broker.

Otherwise reach out privately and we’ll get this fixed.

Hi @johan - sure, I’ll log a support call.
It is TTS Cloud edition and yes the gateway locations and statuses are public.

Hi Johan. I have the same problem with my gateway. Also not on community edition, but the free tier cloud.
Have packetbroker allowing to route traffic. Set gateway to public. Etc, etc.

I thought it has something to do with the fact that I registered my gateway before on the V2 network. Then switched to V3 (community edition) and then switched to V3 (cloud) that it kinda messes up with id’s or something. Maybe didnt deregister the gateway in V2 the right way.
When I use the url’s from first post and try to query the individual gateway info I can query the gateway on the V2 network, stating it’s offline.
But V3, changing net id, etc… nothing.

https://mapper.packetbroker.net/api/v2/gateways/netID=0013,tenantID=ttnv2,id=solidminds-gw-001

{"netID":"000013","tenantID":"ttnv2","id":"solidminds-gw-001","updatedAt":"2020-07-01T12:55:05Z","location":{"latitude":51.28542709350586,"longitude":5.739286422729492,"altitude":32},"online":false,"frequencyPlan":{"region":"EU_863_870"}}

When I change the tenantID to ‘solidminds’, which is the name of my network, it shows:

{"message":"store: not found: get gateway"}

Should I also change the netID?

Configured gateway visibility for solidminds. Please check. We’re adding a switch for this in TTS, please subscribe to Configure gateway visibility in Packet Broker (Console) · Issue #4409 · TheThingsNetwork/lorawan-stack · GitHub

1 Like

Thank you Johan. It works now.
Was I able to do this using the CLI yet?

And should this also show my gateway on the map at https://www.thethingsnetwork.org/map ?

Edit: Nvm, it took a couple of minutes. It’s on the map now.

I have tried to follow this procedure to hide my develop gateway location. However, in the api response the “location” is still present. How can I remove it?

Good point. I’ll file an ~internal~ issue to see if we can remove the location. You can subscribe to the issue to follow updates.

1 Like

Maybe relevant for this thread; i’ve been trying out the Helium console, and one feature i found useful is the Coverage tab: it allows to list and map all gateways/hotspots that are seeing packets of my devices (no packets in below case because no mapping activity in the last 24hrs)
helium-console-coverage
I think it could be useful to integrate similar functionality in the TTN applications console, to have easy access to a list of gateways serving the end devices and understand on which gateways the application depends. I see that the rxmetadata has the gateway info, so it would seem easy to extract it and keep a log of the gateways, packet counts, and show a map.

1 Like

Very easy, you can build your own.

Store all you uplink information, including gateway information in a DB, then you can just recall all the data for the time period you require an display your nodes and relative gateways on a map.

Demo TTN Node Map

1 Like

Hey Johan, nice one…we don’t get many users posting ‘Labs’ stories or “how too’s” these days…do you fancy writing this up for others to follow as many TTN users are not ‘software’ eng’s (:hand: ) and whilst may understand concepts and methods may not be comfortable starting such a
Very easy, you can build your own.”
project :wink:
https://www.thethingsnetwork.org/labs/

I actually need to re write it to use oraclecloud - But here is the AWS version.

4 Likes

How nice! I made a similar tool for Django, if someone is interested just DM me.
Capture
Capture

1 Like