Monitors a CyberPass van tracker and sends a Telegram notification when the van enters a target city.
- Message @BotFather on Telegram
- Send
/newbotand follow the prompts - Copy the bot token
- Message your new bot (send anything), then visit
https://api.telegram.org/bot<YOUR_TOKEN>/getUpdatesto find your chat ID in the response JSON underresult[0].message.chat.id
cp .env.example .envEdit .env with your values:
| Variable | Description | Default |
|---|---|---|
CYBERPASS_USERNAME | CyberPass login username | (required) |
CYBERPASS_PASSWORD | CyberPass login password | (required) |
TELEGRAM_BOT_TOKEN | Telegram bot token from BotFather | (required) |
TELEGRAM_CHAT_ID | Telegram chat ID(s) to notify — comma-separated for multiple recipients | (required) |
TRACKER_ID | Tracker ID of the van to monitor | 45540 |
TARGET_CITY | City name to trigger notification (diacritics-insensitive) | Ghaxaq |
POLL_INTERVAL_SECONDS | How often to check in seconds | 15 |
NOTIFY_WINDOW_START | Start of notification window (24h) | 13:30 |
NOTIFY_WINDOW_END | End of notification window (24h) | 14:30 |
NOTIFY_DAYS | Days to monitor (0=Mon … 4=Fri) | 0,1,2,3,4 |
TZ | Timezone | Europe/Malta |
LOG_LEVEL | Log verbosity level | INFO |
docker compose up -dCheck logs:
docker compose logs -fpip install -r requirements.txt
# either export env vars or source .env manually
python cybernotify.py- Authenticates with the CyberPass tracking API
- During the configured time window (Mon–Fri 13:30–14:30 by default), polls the LiveData endpoint every 15 seconds
- When the van's
Position_CityNamecontains the target city, sends a one-time Telegram notification - Sleeps outside the window and resets daily
- Re-authenticates automatically if the session expires
The city matching strips Unicode diacritics, so Ghaxaq in the config will match Ħal Għaxaq from the API.