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
set -l data_status (curl -s https://iceportal.de/api1/rs/status) | |
set -l data_trip (curl -s https://iceportal.de/api1/rs/tripInfo/trip) | |
# next stop | |
echo (echo $data_trip | jq -r '([ .trip.stops[] | select(.info.passed==false) ] | |
| first).station.name') | |
# train number | |
echo (echo $data_trip | jq -r '"\(.trip.trainType)-\(.trip.vzn)"') | |
# speed | |
echo speed (echo $data_status | jq -r '"\(.speed) km/h"') |
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
//from | |
//https://bikeshedeffect.weebly.com/arduino-piezo-sounds.html | |
/* insert sound code into setup to play once, main loop to repeat, or into sound() function to call when wanted (button push, etc...)// Speaker must be on pin 8, see setup here: http://www.arduino.cc/en/Tutorial/PlayMelody | |
*/ | |
#include "pitches.h" // must include open source pitches.h found online in libraries folder or make a new tab => https://docs.arduino.cc/built-in-examples/digital/toneMelody | |
void setup() { | |
// do nothing |
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
{ | |
"bridge": { | |
"name": "Homebridge", | |
"username": "{MAC}", | |
"port": 51826, | |
"pin": "{PIN}" | |
}, | |
"description": "This is an example configuration file. You can use this as a template for creating your own configuration file containing devices you actually own.", |