Skip to content

Version 2.0

Latest
Compare
Choose a tag to compare
@nexesninja nexesninja released this 09 Jul 14:35
059fd4a

πŸ“¦ 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 to python-telegram-bot v20 with ApplicationBuilder and JobQueue.

  • πŸ—‚οΈ Modular Structure
    Code split into config/, modules/, and clean main.py entry point.


🧭 Setup Instructions

πŸ“„ Key files and documentation:

  • README.md – Full usage, commands, and structure
  • docs/installation_guide.md – Step-by-step setup
  • docs/initial_setup.txt – What you need before installation
  • docs/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