How marlico77/bot-telegram works
MarlicoBot pairs an Android app/TV Box with a Windows agent to monitor and manage a home PC locally, while an optional Telegram bot relays commands when the Android device is away. The main flow is Android UI or Telegram command → Android client/service → paired Windows HTTP agent → metrics, inventory, screenshots, or confirmed power action. Update checks are a separate shared capability. Several Windows and Android details are documented but their implementation is in unsampled source, so those links cite the README rather than implying source inspection.
Main entry points: Agent.java Agent service · BotService.java Bot service · UpdateFeed.java Update protocol · MainActivity.java WebView shell
Components 20
Android client
- Monitor panel
android/assets/app.js - WebView shell
android/src/br/com/marlico/bot/MainActivity.java - Pairing settings
android/src/br/com/marlico/bot/Config.java - Agent API client
android/src/br/com/marlico/bot/AgentApi.java - Wake-on-LAN
android/src/br/com/marlico/bot/Core.java
Telegram relay
- Bot service
android/src/br/com/marlico/bot/BotService.java - Command routing
android/src/br/com/marlico/bot/Conversation.java - Telegram API
android/src/br/com/marlico/bot/TelegramApi.java
Windows agent
- Agent service
windows/src/br/com/marlico/agent/Agent.java - Metrics and processes
windows/src/br/com/marlico/agent/Agent.java - Hardware inventory
windows/src/br/com/marlico/agent/Agent.java - Screen access
windows/src/br/com/marlico/agent/Agent.java - Power controls
windows/src/br/com/marlico/agent/Agent.java - Agent panel
windows/src/br/com/marlico/agent/Agent.java
Update system
- Android updater
android/src/br/com/marlico/bot/AppUpdates.java - Windows updater
windows/src/br/com/marlico/agent/AppUpdates.java - Update protocol
shared/src/br/com/marlico/update/UpdateFeed.java
Other components
- Android user
- Telegram user
- Update catalog
Connections 20
- Android user → Monitor panel: uses
README.md - WebView shell → Monitor panel: loads
android/src/br/com/marlico/bot/MainActivity.java - WebView shell → Pairing settings: reads and saves
android/src/br/com/marlico/bot/MainActivity.java - WebView shell → Agent API client: requests PC
android/src/br/com/marlico/bot/MainActivity.java - Agent API client → Agent service: HTTP requests
android/src/br/com/marlico/bot/AgentApi.java - Telegram user → Telegram API: sends commands
README.md - Bot service → Telegram API: calls
android/src/br/com/marlico/bot/BotService.java - Bot service → Command routing: routes commands
android/src/br/com/marlico/bot/BotService.java - Bot service → Agent API client: queries agent
android/src/br/com/marlico/bot/BotService.java - Bot service → Wake-on-LAN: sends wake packet
android/src/br/com/marlico/bot/BotService.java - Agent service → Metrics and processes: serves
README.md - Agent service → Hardware inventory: serves
windows/src/br/com/marlico/agent/Agent.java - Agent service → Screen access: serves
windows/src/br/com/marlico/agent/Agent.java - Agent service → Power controls: executes confirmed action
windows/src/br/com/marlico/agent/Agent.java - Agent panel → Agent service: displays and controls
README.md - Monitor panel → Android updater: checks updates
- Android updater → Update protocol: checks and downloads
android/src/br/com/marlico/bot/AppUpdates.java - Windows updater → Update protocol: checks and downloads
windows/src/br/com/marlico/agent/AppUpdates.java - Update protocol → Update catalog: fetches manifest
shared/src/br/com/marlico/update/UpdateFeed.java - Update catalog → Update protocol: returns release metadata
README.md