A Home Assistant add-on for running the RustPlusPlus Discord bot, which connects to Rust game servers via the Rust+ Companion App — with native Home Assistant MQTT device integration.
RustPlusPlus is a powerful Discord bot that provides Quality-of-Life features for Rust players by integrating with the Rust+ Companion App. This add-on packages the bot for easy deployment on Home Assistant, with built-in MQTT discovery so your Rust smart devices appear as native Home Assistant entities.
- 🏠 Home Assistant Integration: Smart devices auto-discovered via MQTT — control switches, monitor alarms, and view storage directly from your HA dashboard
- 🚁 Event Notifications: Get notified about Patrol Helicopter, Cargo Ship, Chinook 47, and Oil Rig events
- 🔌 Smart Device Control: Control Smart Switches and Smart Switch Groups via Discord, in-game chat, or Home Assistant
- 🚨 Smart Alarms: Set up alarms that notify you when triggered — also exposed as binary sensors in HA
- 📦 Storage Monitoring: Monitor Tool Cupboard upkeep and container contents — also exposed as sensors in HA
- 💬 Team Communication: Bridge Discord and in-game team chat
- 👥 Player Tracking: Track other teams using Battlemetrics integration
- 🎮 Discord Bot Presence: Bot status shows the connected server name and online teammate count
- 🛠️ QoL Commands: Extensive list of helpful commands for Discord and in-game use
- Navigate to Settings → Add-ons → Add-on Store in your Home Assistant
- Click the ⋮ menu in the top right corner
- Select Repositories
- Add this repository URL:
https://github.com/KarlisKocins/homeassistant-addon-rustplusplus - Click Add
- Find "RustPlusPlus Discord Bot" in the add-on store
- Click on it and press Install
- Wait for the installation to complete
- Go to the Configuration tab
- Fill in the required fields:
- Discord Client ID: Your Discord application's client ID
- Discord Token: Your Discord bot token
- Log Level: Choose your preferred logging level (info recommended)
- Optionally configure MQTT for Home Assistant integration (see below)
- Go to the Info tab
- Click Start
- Check the Log tab to ensure everything is running correctly
Before using this add-on, you need to create a Discord bot:
- Go to the Discord Developer Portal
- Click New Application and give it a name
- Go to the Bot section and click Add Bot
- Copy the Token (this is your Discord Token)
- Enable Message Content Intent under Privileged Gateway Intents
- Go to OAuth2 → General and copy the Client ID
- In OAuth2 → URL Generator:
- Select bot scope
- Select required permissions (Administrator recommended for full functionality)
- Use the generated URL to invite the bot to your Discord server
You'll need to get your Rust+ credentials using the official credential application:
- Download the RustPlusPlus Credential Application
- Run the application and follow the instructions
| Option | Type | Default | Description |
|---|---|---|---|
discord_client_id |
string | Required | Your Discord application's client ID |
discord_token |
password | Required | Your Discord bot token |
log_level |
list | info |
Logging level (debug, info, warning, error) |
mqtt_host |
string | core-mosquitto |
MQTT broker hostname |
mqtt_port |
integer | 1883 |
MQTT broker port |
mqtt_username |
string | (empty) | MQTT broker username |
mqtt_password |
password | (empty) | MQTT broker password |
mqtt_discovery |
boolean | true |
Enable/disable MQTT auto-discovery of Rust devices in Home Assistant |
webui_enabled |
boolean | false |
Enable/disable the built-in RustPlusPlus WebUI |
webui_port |
integer | 3001 |
Port used by the WebUI when enabled |
database_path |
string | /data/statistics.db |
Path for the statistics database used by WebUI/statistics features |
This add-on can automatically publish your Rust smart devices to Home Assistant via MQTT Discovery. When enabled, your devices appear natively in Home Assistant without any manual configuration.
- Install the Mosquitto broker add-on from the Home Assistant Add-on Store
- Create an MQTT user in Settings → People → Users (or use an existing one)
- Configure the MQTT options in this add-on's configuration
| Rust Device | HA Entity Type | Capabilities |
|---|---|---|
| Smart Switch | switch |
On/Off control from HA dashboard, automations, scripts |
| Smart Alarm | binary_sensor (safety) |
Alarm state visible in HA, usable in automations |
| Storage Monitor | sensor |
Item contents and TC upkeep as sensor attributes |
- The add-on connects to your MQTT broker on startup
- When you pair smart devices in Rust, they are automatically published to HA via MQTT Discovery
- State changes (e.g., a switch toggled in-game) are reflected in HA in real time
- Commands from HA (e.g., toggling a switch) are sent back to the Rust server
mqtt_host: core-mosquitto
mqtt_port: 1883
mqtt_username: mqtt_user
mqtt_password: your_mqtt_password
mqtt_discovery: trueThe add-on can run an optional RustPlusPlus WebUI. When enabled, it listens on the configured webui_port.
Statistics and related feature data are stored in the SQLite database at database_path (default: /data/statistics.db).
Example optional settings:
webui_enabled: true
webui_port: 3001
database_path: /data/statistics.db- After starting the add-on, join your Discord server where the bot was invited
- Use the
/credentialscommand to set up your Rust+ credentials - Use the
/paircommand to connect to your Rust server - Configure your desired features using the bot's commands
/help- Show all available commands/credentials- Set up Rust+ credentials/pair- Connect to a Rust server/map- View the server map/players- See online players/upkeep- Check tool cupboard upkeep
Smart Switch automation includes AUTO-NIGHT-ANY-ONLINE.
This mode turns switches on only at night when at least one teammate is online, and turns them off during daytime or when all teammates are offline.
When connected to a Rust server, the bot's Discord status automatically displays:
- The server name
- The number of online teammates (e.g.,
My Rust Server | 3/5 Online)
The add-on stores data in the following locations:
- Credentials:
/data/credentials/ - Server Instances:
/data/instances/ - Logs:
/data/logs/ - Maps:
/data/maps/ - Statistics Database:
/data/statistics.db(default, configurable viadatabase_path)
All data persists between add-on restarts and updates.
If you encounter issues during the first installation, try restarting the add-on:
- Go to the Info tab
- Click Stop to stop the add-on
- Wait a few seconds, then click Start
- Check the Log tab to verify the add-on is running correctly
Sometimes a restart can resolve initialization problems or temporary configuration issues that may occur during the initial setup.
- Check the add-on logs for errors
- Verify your Discord token and client ID are correct
- Ensure the bot has proper permissions in your Discord server
- Check if the bot is online in your Discord server
- Verify your Rust+ credentials are valid
- Check if the Rust server supports Rust+ (most official servers do)
- Ensure you're paired with the correct server
- Try restarting the add-on
- Verify the Mosquitto broker add-on is running
- Check MQTT credentials are correct (
mqtt_username/mqtt_password) - Look for
[HA] Connected to MQTT broker.in the add-on logs - If devices don't appear in HA, check Settings → Devices & Services → MQTT
- Ensure
mqtt_discoveryis set totrue
Check the add-on logs in the Log tab for detailed error messages. Common issues include:
- Invalid Discord credentials
- Missing Rust+ credentials
- Network connectivity problems
- Server pairing issues
[HA] MQTT error:messages indicating broker connection issues
For local development/release checks, run the startup smoke test:
chmod +x scripts/ha_addon_smoke_test.sh
./scripts/ha_addon_smoke_test.shThis emulates add-on startup with a generated /data/options.json plus a mock Supervisor API endpoint, and fails if bootstrap does not reach run.sh -> npm start.
For support and documentation:
This add-on is based on RustPlusPlus by alexemanuelol, licensed under GPL-3.0.