Skip to content

Instantly share code, notes, and snippets.

@IT-Berater
Last active April 20, 2016 16:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IT-Berater/2f0d21ea508061629a8ba0c75efaa9f6 to your computer and use it in GitHub Desktop.
Save IT-Berater/2f0d21ea508061629a8ba0c75efaa9f6 to your computer and use it in GitHub Desktop.
Raspberry Pi senden von Flugdaten von DUMP1090 an ThingSpeak.com per jq
#!/bin/bash
# crontab make-crontab-send-anzahl.txt
# */10 * * * * /home/pi/send-anzahl-flugzeuge.sh > /dev/null
# ThingSpeak Write Key
KEY=Schreib-Key
ANZAHL=$(cat "/run/dump1090-mutability/aircraft.json" | jq '[.aircraft[] | select(.seen_pos)] | length');
wget -q -O- "http://api.thingspeak.com/update?key=$KEY&field1=$ANZAHL&status='Update $ANZAHL Flugzeuge erfasst'" > /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment