German telegram bot as notification in case of train delays. It's use marudor.de as hafas api.
- Beobachte Züge
- Individuelle Schwellwerte
/helpBefehlsübersicht/myalarmsAlle gesetzten Verspätungsalarme/newalarmNeuer Verspätungsalarm/cancelAbbrechen des aktuellen Vorgangs
All parameters can be overwritten by ENV variable.
// config.json
{
"api": {
"endpoint": "https://marudor.de/api"
},
"telegram": {
"key": ""
},
"database": {
"dialect": "postgres",
"path": "host=myhost port=myport user=gorm dbname=gorm password=mypassword"
},
"loglevel": "trace",
"metrics": false
}API_ENDPOINTmarudor endpointTELEGRAM_KEYtelegram bot key from Telegram BotFahterDB_DIALECTcurrently onlymysqlorpostgresDB_PATHdatabase config path.- mysql
user:password@/dbname?charset=utf8&parseTime=True&loc=Local
- postgres
sslmode=disable host=myhost port=myport user=gorm dbname=gorm password=mypassword
- mysql
LOG_LEVELloglevelinfo,trace,warnorerror
version: '3'
services:
bot:
image: "pkuebler/bahn-bot:latest"
environment:
- API_ENDPOINT=https://marudor.de/api
- TELEGRAM_KEY=
- DB_DIALECT=mysql
- "DB_PATH=user:password@/dbname?charset=utf8&parseTime=True&loc=Local"
- LOG_LEVEL=infoThe Prometheus endpoint is located under :8080/metrics when enable_metrics is enabled in the Config.
ONLY for local tests a docker-compose overwrite file is included.
docker-compose -f docker-compose.yml -f docker-compose.prometheus.yml upYou can reach Prometheus on port 9090.
- Speichert:
- ChatID + Zug für den Verspätungsalarm. Wird 2 Tage nach Ankunft des Zuges gelöscht (um Verspätungen abzufangen).
- ChatID + Aktuelle Operation mit Bot (z.B. newalarm, savealarm, ...). Wird 4 Tage nach letzter Interaktion gelöscht.
- Metrics erfassen verwendung von Zugnummern ohne Verknüpfungen zu Personen.
- Add interface > telegram tests
- SQL Database Repository tests
MIT