Last active
April 20, 2016 16:10
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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