Skip to content

Raspberry Pi 5 Telegram Bot for remote monitoring and control. Provides real-time CPU temperature updates, easy setup via SSH, and future features like system monitoring and custom command execution. Ideal for project makers looking for simple Pi management through Telegram.

License

Notifications You must be signed in to change notification settings

nexesninja/raspberrypi-telegram-bot

Repository files navigation

Raspberry Pi Telegram Bot

A fully functional Telegram bot for Raspberry Pi (rpi) with features like:

  • 🌡️ Temperature Monitoring
  • 📊 System Monitoring
  • 💻 Remote Command Execution
  • 🔧 More features coming soon!

I’m using SSH to connect to my rpi from a computer (no display required).

🚀 Getting Started

Before continuing, please complete the the prerequisites:

👉 The complete file can be found from here.

🔒 Security Highlights

  • User Authorization: Only whitelisted Telegram user IDs can access the bot.
  • Command Whitelist: Only predefined safe commands can be executed.
  • Input Validation: Commands are parsed and validated before execution.
  • Command Injection Protection: Blocks dangerous patterns and injection attempts.
  • Timeout Protection: Commands timeout after 30 seconds.
  • Restricted Environment: Commands run with limited PATH and safe working directory.

📁 Project Modules

🌡️ Temperature Monitoring

This module allows you to check the RPi's temperature using the Telegram bot.

📊 System Monitoring

/system and /status provide CPU, RAM, Disk usage info.

💻 Remote Command Execution

Run whitelisted shell commands safely via /cmd <command>.

🗂️ Commands

Command Description
/start Welcome message
/temp Check Raspberry Pi temperature
/system Full system status
/status Quick overview
/cmd <cmd> Execute whitelisted shell command
/help List available commands

More features coming soon!

📌 Roadmap

  • Temperature Monitoring
  • CPU & Memory Usage Display
  • Run Custom Shell Commands

GitHub release (latest by date) Platform License

About

Raspberry Pi 5 Telegram Bot for remote monitoring and control. Provides real-time CPU temperature updates, easy setup via SSH, and future features like system monitoring and custom command execution. Ideal for project makers looking for simple Pi management through Telegram.

Topics

Resources

License

Stars

Watchers

Forks

Languages