Posts mit dem Label python werden angezeigt. Alle Posts anzeigen
Posts mit dem Label python werden angezeigt. Alle Posts anzeigen

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.

Migrate TTN-Gateway to The Things Stack Community Edition (aka V3)

 I just migrate my TTN-gateway to the new The Things Stack Community Edition (aka V3). 

I followed the instructions I found in the thread on GitHub.

  1. Create a new gateway on the things network (link)
  2. Change the server url in your local_conf.json to eu1.cloud.thethings.network
  3. Restart the gateway
Unfortunately the new stack does not provide a NOC api - so my script to output the gateway status to a OLED stop working. I will invest into this next.

2020-01-03

TTN-Gateway in a box

During the last days I worked on the installation of my TTN-Gateway into a case. This is the result:






Beside the LoraWAN hardware I have installed an OLED display and 3 sensors (1x Si7021, 2x DS18B20). The OLED display is connected via I2C, the sensors via 1-wire and I2C.

The sensor data is read by Python3 Script and published with MQTT. The OLED is also controlled by a Python3 script. Both scripts run as systemd-service.

The software is available on github.