π¦ Release v2.0 β Major Refactor & Feature Expansion
Date: 2025-07-08
A major update of the Raspberry Pi Telegram Bot with a modular codebase, enhanced security, system monitoring, and robust remote command support.
β¨ Features
-
π Secure Command Execution
Whitelisted command execution with validation, pattern checks, and sandboxing. -
π‘οΈ Temperature Monitoring
Real-time CPU temperature display with alert capability. -
π System Monitoring
View CPU, memory, and disk usage via/system
and/status
. -
π» Remote Shell Execution
Run allowed commands on your Pi from Telegram using/cmd <command>
. -
π€ PTB v20+ Support
Upgraded topython-telegram-bot
v20 withApplicationBuilder
andJobQueue
. -
ποΈ Modular Structure
Code split intoconfig/
,modules/
, and cleanmain.py
entry point.
π§ Setup Instructions
π Key files and documentation:
README.md
β Full usage, commands, and structuredocs/installation_guide.md
β Step-by-step setupdocs/initial_setup.txt
β What you need before installationdocs/troubleshooting.md
β Common errors and fixes
π‘ Security Improvements
- β Only safe, whitelisted commands can run
- β Blocks dangerous patterns like
rm -rf /
,mkfs
,dd
, etc. - β± Built-in timeout handling and safe working directory
π Project Structure
raspberrypi-telegram-bot/
βββ config/
β βββ config.py
βββ docs/
β βββ installation_guide.md
β βββ initial_setup.txt
β βββ troubleshooting.md
βββ logs/
β βββ bot.log
βββ modules/
β βββ command_executor.py
β βββ system_monitor.py
β βββ temp_monitor.py
βββ .gitignore
βββ CHANGELOG.md
βββ main.py
βββ pi-telegram-bot.service
π¬ Commands
/temp
β Show temperature/system
β System resource summary/cmd <command>
β Run a safe command/help
β List available commands
β Known Notes
- Bot has a slight startup delay (~30β60 seconds) after reboot for network readiness
π₯ Feedback & Issues
Have questions, feature ideas, or bugs to report?
π Open an issue on GitHub