Skip to content

eman225511/RustPlusRaidAlarms

Repository files navigation

๐Ÿšจ RustPlus Raid Alarms

Never miss a raid again! Get instant notifications on your phone, auto-launch Rust, flash your lights, and more when your base is under attack.

Python PySide6 License: MIT Telegram

Sleek desktop app that monitors Telegram for raid alerts from Rust+ (via IFTTT) and triggers customizable pluginsโ€”no coding required!

๐Ÿš€ Quick Start โ€ข ๐Ÿ“š Documentation โ€ข ๐Ÿ”Œ Plugins โ€ข ๐Ÿค Contributing


โœจ Features

๐Ÿ“ฑ Telegram Integration
  • โšก Real-time message polling with configurable rate (default: 2 seconds)
  • ๐Ÿ” Optional keyword filtering for selective alerts
  • ๐Ÿ‘ฅ Support for channels and group chats
  • โš™๏ธ Easy configuration via in-app Settings dialog
  • ๐Ÿ”„ Auto-retry on connection failures
๐ŸŽฎ IFTTT + Rust+ Integration
  • ๐Ÿ”— Connect your Rust server to automatically send raid alarms
  • ๐ŸŽฏ Trigger on events: raids, cargo ship, helicopter, player activity
  • ๐Ÿ“ Customize alert messages with smart-alarm data
  • ๐Ÿ“บ Video tutorials included! See IFTTT Setup Guide
๐Ÿ”Œ Plugin Architecture
  • ๐Ÿ›’ Built-in Plugin Store with search + one-click install/update/uninstall
  • ๐Ÿ” Auto-discovered from plugins/ folder every 5 seconds
  • ๐Ÿ”ฅ Hot-reload: add/remove plugins without restarting
  • ๐Ÿ“„ Supports both single-file (plugin.py) and package (plugin/__init__.py) formats
  • ๐Ÿ› ๏ธ Plugin base API for UI widgets, config persistence, Telegram hooks
  • ๐Ÿ“– Example plugins included as development templates
๐ŸŽจ Modern Dark UI
  • ๐Ÿƒ Card-based layout with hero sections
  • ๐Ÿ“‘ Left-side navigation with plugin tabs
  • ๐ŸŒ‘ Unified dark theme (#1e1e1e background, #131418 cards, #0e639c accents)
  • ๐Ÿ–ฑ๏ธ Drag-and-drop plugin tab reordering
  • โœ… Per-plugin enable/disable toggles
  • ๐Ÿงน Clear log button in Activity Log
  • ๐Ÿ“ Responsive design with proper spacing and padding

๐Ÿš€ Quick Start

Click to expand setup instructions

๐ŸชŸ Windows Users (Easiest Method)

Just double-click run.bat!

The script will automatically:

  • โœ… Check for Python (downloads portable version if needed)
  • โœ… Create virtual environment
  • โœ… Install all dependencies
  • โœ… Launch the application

No manual setup required! ๐ŸŽ‰


๐Ÿง Manual Setup (All Platforms)

1๏ธโƒฃ Clone the Repository

git clone https://github.com/eman225511/RustPlusRaidAlarms.git
cd RustPlusRaidAlarms

2๏ธโƒฃ Install Dependencies

pip install -r requirements.txt

3๏ธโƒฃ Set Up Telegram

4๏ธโƒฃ Connect IFTTT + Rust+ (optional)

5๏ธโƒฃ Run the App

Windows:

run.bat

macOS/Linux:

python main.py

6๏ธโƒฃ Customize Plugins (optional)

  • Navigate to plugin tabs in the left sidebar
  • Configure LED devices, phone numbers, audio files, Discord webhooks, etc.
  • Use the โ“ help buttons for setup guides
  • Click test buttons to verify everything works
  • Enable the plugins you want with the checkboxes!

๐Ÿ”Œ Plugins

Plugins are automatically loaded from the plugins/ directory and appear in the left sidebar. No core code changes neededโ€”just drop in your plugin and it's ready!

๐Ÿ›’ Plugin Store (recommended)

  • Open Plugins โ†’ Store in the app
  • Use the search bar to filter by name/author/tag
  • Click Install or Update; uninstall from the Installed tab
  • Plugins live in your local plugins/ folder (not committed to git)

๐Ÿ’ก Built-in Plugins

Plugin Description Guide
๐Ÿ’ก LED Controller Flash WLED, Govee, or Philips Hue lights when raided ๐Ÿ“– Guide
๐ŸŽฎ Rust Auto-Connect Automatically launch Rust and join your server ๐Ÿ“– Guide
๐Ÿ“ž Twilio Caller Call multiple phone numbers to wake you up ๐Ÿ“– Guide
๐Ÿ”Š Audio Alert Play custom sounds on multiple audio devices ๐Ÿ“– Guide
๐Ÿ’ฌ Discord Webhook Post raid alerts to Discord with @mentions ๐Ÿ“– Guide
๐Ÿ› ๏ธ Creating Your Own Plugins

Plugin Types

  • ๐Ÿ“„ Single-file: plugins/my_plugin.py (simple plugins)
  • ๐Ÿ“ฆ Package: plugins/my_plugin/__init__.py (complex plugins with multiple files)

Learn More

See the Plugin Development Guide for:

  • โœ… Plugin base class and required methods
  • ๐ŸŽจ UI creation with PySide6/Qt
  • ๐Ÿ’พ Config persistence patterns
  • ๐Ÿ“จ Telegram message hooks
  • ๐ŸŽจ Styling guidelines
  • ๐Ÿ’ป Complete skeleton code

Submit your plugin to the store

  1. Build your plugin (single-file or package) and include metadata methods (get_version, get_author, get_homepage).
  2. Zip the plugin folder/file and host it (GitHub release or raw link).
  3. Add an entry to index.json in the RustPlusRaidAlarmPlugins repo with your metadata and download URL, then open a PR.
  4. Keep version numbers updated for smooth Update prompts.

Example Plugins

  • plugins/example_plugin/ โ€” Package-based plugin with advanced features
  • plugins/simple_example.py โ€” Minimal single-file implementation

๐Ÿ“š Documentation

๐Ÿš€ Getting Started

๐Ÿ”Œ Plugin Guides

๐Ÿ› ๏ธ Advanced


๐Ÿ’ก LED Controller Plugin

Control smart LED devices with trigger-on-message support โ†’ Full Guide

Supported Devices

  • WLED โ€” WiFi-enabled LED controllers
  • Govee โ€” Cloud-based smart lighting (requires API key)
  • Philips Hue โ€” Zigbee bridge-based smart bulbs

Actions

  • On/Off โ€” Simple power control
  • Color โ€” RGB color picker with hex preview
  • Effect โ€” WLED animated effects (0โ€“255)
  • Preset โ€” WLED saved presets (0โ€“255)
  • Scene โ€” Govee predefined scenes (0โ€“50)
  • Brightness โ€” Intensity control (WLED: 0โ€“255, Govee: 0โ€“100%)

Configuration

Each device type requires specific credentials:

  • WLED: Device IP address
  • Govee: API key, device ID, device model
  • Philips Hue: Bridge IP, bridge username

See the LED Plugin Guide for detailed setup instructions and troubleshooting.


โš™๏ธ Configuration

All settings are stored in config.json (auto-created on first launch)

๐Ÿ“ฑ Telegram Settings

  • Bot token and chat ID (configured via Settings dialog)
  • Polling rate (seconds between checks)
  • Keyword filter toggle and keyword

๐Ÿ’ก LED Settings

  • Device type (WLED/Govee/Hue)
  • Device credentials (IP/API keys/bridge info)
  • Default action and parameters (color, effect, preset, scene, brightness)

โœ๏ธ Editing Config

Method Description
โœ… Recommended Use the in-app Settings dialog and plugin UIs
๐Ÿ“ Manual Edit config.json directly (close app first to avoid overwrites)
๐Ÿ”„ Reset Delete config.json to restore defaults
๐Ÿ“„ Template config.example.json is provided; copy to config.json if needed

๐Ÿ”ง Feature Toggles

  • show_example_plugins โ€” show/hide example plugins in sidebar
  • plugin_enabled_<PluginName> โ€” per-plugin enable/disable state

๐Ÿ’ก See the Configuration Guide for the complete config.json schema and field descriptions.


๐Ÿ“ Project Structure

Click to view folder layout
RustPlusRaidAlarms/
โ”œโ”€โ”€ main.py                    # App shell, plugin loader, dark theme
โ”œโ”€โ”€ telegram_service.py        # Telegram polling with auto-retry
โ”œโ”€โ”€ plugin_base.py             # Abstract plugin base class
โ”œโ”€โ”€ config.json                # Auto-generated config [gitignored]
โ”œโ”€โ”€ config.example.json        # Template config file
โ”œโ”€โ”€ requirements.txt           # Python dependencies
โ”‚
โ”œโ”€โ”€ plugins/
โ”‚   โ”œโ”€โ”€ led_plugin/            # ๐Ÿ’ก LED controller (WLED/Govee/Hue)
โ”‚   โ”œโ”€โ”€ rust_connect.py        # ๐ŸŽฎ Rust auto-connect
โ”‚   โ”œโ”€โ”€ twilio_plugin/         # ๐Ÿ“ž Twilio phone calls
โ”‚   โ”œโ”€โ”€ audio_alert.py         # ๐Ÿ”Š Custom sound alerts
โ”‚   โ”œโ”€โ”€ discord_webhook.py     # ๐Ÿ’ฌ Discord notifications
โ”‚   โ”œโ”€โ”€ example_plugin/        # Development template (package)
โ”‚   โ””โ”€โ”€ simple_example.py      # Development template (single-file)
โ”‚
โ””โ”€โ”€ docs/
    โ”œโ”€โ”€ TELEGRAM_SETUP.md      # Bot creation with video guides
    โ”œโ”€โ”€ IFTTT_RUST_SETUP.md    # IFTTT + Rust+ integration
    โ”œโ”€โ”€ PLUGIN_DEVELOPMENT.md  # Plugin API and creation guide
    โ”œโ”€โ”€ CONFIGURATION.md       # config.json schema
    โ”œโ”€โ”€ TROUBLESHOOTING.md     # Common issues
    โ””โ”€โ”€ plugins/               # Individual plugin guides
        โ”œโ”€โ”€ LED_CONTROLLER.md
        โ”œโ”€โ”€ RUST_CONNECT.md
        โ”œโ”€โ”€ TWILIO_CALLER.md
        โ”œโ”€โ”€ AUDIO_ALERT.md
        โ””โ”€โ”€ DISCORD_WEBHOOK.md

๐Ÿค Contributing

Contributions are welcome! Here's how you can help

๐Ÿ”Œ Adding Plugins

  1. Create your plugin in plugins/your_plugin/ or plugins/your_plugin.py
  2. Inherit from PluginBase and implement required methods
  3. Test using the app's plugin auto-reload (no restart needed)
  4. See Plugin Development Guide for API details

๐Ÿ“ Code Guidelines

  • โœ… Keep plugin code within plugin widgetsโ€”avoid modifying core files
  • ๐ŸŽจ Follow the existing dark theme styling patterns (see main.py CSS)
  • ๐Ÿ’พ Use config dict for persistence (auto-saved/merged)
  • ๐Ÿ“ฆ Add dependencies to requirements.txt if needed

๐Ÿš€ Submitting Changes

  • โœ”๏ธ Test your changes thoroughly (LED devices, Telegram, plugin loading)
  • ๐Ÿ“– Include documentation updates if adding features
  • ๐Ÿ’ฌ Create descriptive commit messages
  • ๐Ÿ”€ Open a pull request with a clear description
  • ๐Ÿ› Use the GitHub issue templates for bugs/feature requests

๐Ÿ› Bug Reports & Support

Need help? Here's how to get support

Before Reporting

  1. โœ… Check the Troubleshooting Guide first
  2. โœ… Search existing GitHub issues

Bug Report Checklist

  • ๐Ÿ–ฅ๏ธ OS and Python version
  • โŒ Error messages (full traceback)
  • ๐Ÿ”„ Steps to reproduce
  • โš™๏ธ Relevant config.json snippets (redact tokens/IDs!)

Feature Requests

Use the GitHub issue templates to ensure all required details are included!


๐Ÿ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐Ÿ™ Acknowledgments

Built with โค๏ธ using:


โญ If this project helped you defend your base, give it a star!

Report Bug โ€ข Request Feature โ€ข Documentation

Bug Reports

  • Check Troubleshooting Guide first
  • Include: OS, Python version, error messages, steps to reproduce
  • Share relevant config.json snippets (redact tokens/IDs)
  • File issues via the GitHub bug/feature templates to ensure required details are included

About

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors