How garvshr/unetwork-monitor works
Unetwork Device Monitor polls device-license status, tracks changes and offline duration, and sends alerts and reminders through a Telegram bot. Admins can ignore or resume alerts; approved friends can select devices and manage their own alert copies. The main polling and state logic is concentrated in main.py, with separate authentication, Unetwork API, and Telegram modules. The README documents persistence and user-facing features; unsampled internals are represented at the main.py subsystem level rather than inferred as separate implementations.
Main entry points: main.py Polling and alert logic · telegram.py Bot messaging and updates · unetwork.py License API client · auth.py Token refresh
Components 9
Monitoring and state
- Polling and alert logic
main.py - Device alert state
main.py - Approvals and subscriptions
main.py
Unetwork integration
- Token refresh
auth.py - License API client
unetwork.py
Telegram interaction
- Bot messaging and updates
telegram.py
External services
- Unetwork API
- Telegram Bot API
Other components
- Admin or friend
Connections 10
- Admin or friend → Bot messaging and updates: sends commands
README.md - Polling and alert logic → License API client: fetches licenses
README.md - License API client → Token refresh: gets access token
unetwork.py - Token refresh → Unetwork API: refreshes token
auth.py - License API client → Unetwork API: requests licenses
unetwork.py - Polling and alert logic → Device alert state: tracks status
README.md - Polling and alert logic → Approvals and subscriptions: checks subscriptions
README.md - Bot messaging and updates → Polling and alert logic: dispatches commands
README.md - Polling and alert logic → Bot messaging and updates: sends alerts
main.py - Bot messaging and updates → Telegram Bot API: sends and polls
telegram.py