2021-10-17

Update: Display TTN-Gateway status

After migrating my TTN gateway to the new The Things Stack Community Edition (see previous blog post) my script to display the gateway status stopped working. The reason behind was, that the new stack does not provide the noc api which was used in the script.

After searching in the TTN forum I found the thread New API for gateway mapping, status and info. Using this API I just need to change one line in my script and now it works again.

-  cmd = "curl -s http://noc.thethingsnetwork.org:8085/api/v2/gateways/eui-b827ebfffe06902a | jq -r '.timestamp'"
+  cmd = "curl -s https://mapper.packetbroker.net/api/v2/gateways/netID=000013,tenantID=ttn,id=eui-b827ebfffe06902a | jq -r '.updatedAt'"
The updated script is available in the github repo.

Keine Kommentare

Kommentar veröffentlichen