2026-02-21 17:46:17 -05:00
2020-04-15 14:56:58 -04:00
2026-02-20 18:19:34 -05:00
2026-02-21 17:18:27 -05:00
2018-03-16 09:27:38 -04:00
2026-02-21 17:46:17 -05:00
2019-11-02 20:32:14 -04:00
2019-11-14 13:46:43 -05:00
2026-02-20 18:01:13 -05:00

*** This project lives @ https://gitlab.rickelobe.com/Bots/R0b3BOT ***

pipeline status

Description

This is R0b3's Discord Bot. It's creation was basically a challenge posed a coworker who said "Hey, you can write Discord Bots in Python... Make one to display your 3D printer status!".

Features

  • Query & Monitor OctoPrint 3D Printer Status using the $printstat command (Requires that your printer is connected to Octoprint)
  • Query & Monitor Bambu Lab Printer Status using the $bambustat command (Requires a Bambu Lab printer accessible on the local network via MQTT)
    • Displays print state, progress percentage, time remaining, current layer, bed temp, nozzle temp, and chamber temp
    • Optionally captures and attaches a camera snapshot from the printer's RTSPS stream (requires ffmpeg on the host)
    • Updates the bot's Discord status to show live Bambu print progress while a print is running
  • Play a selection of sound clips to voice channel members using the various commands ($torololo, $oops, $promoted, etc)

Commands

Screenshot of $help

Requirements

Install all Python dependencies using the provided requirements.txt:

pip install -r requirements.txt

Dependencies:

  • discord.py[voice] >= 2.6.4 — Discord bot framework (voice support included)
  • requests >= 2.32.3 — HTTP client for HomeAssistant REST API calls
  • bambu-connect >= 0.3.1 — Bambu Lab printer integration via local MQTT
  • paho-mqtt >= 2.0 — MQTT client library (required by bambu-connect)

Optional: Camera snapshot support

To enable camera snapshots with $bambustat, ffmpeg must be installed on the host running the bot. Set bambu_camera_enable = true in bot_config.conf once ffmpeg is available.

Configuration

  1. Create a Discord Bot via the Discord Developer Portal
  2. Copy bot_config.conf.example to bot_config.conf and fill in your values (see below)
  3. Rename octoapi.conf.example to octoapi.conf and configure OctoPrint settings (if using OctoPrint)

bot_config.conf Keys

Key Description
discord_auth_token Bot token from the Discord Developer Console
bot_command_prefix Command prefix (e.g. $, !, /)
hass_url URL to your Home Assistant instance
hass_token Long-lived access token for Home Assistant REST API
hass_light Entity ID of the light at your printer
octoprint_ip_address IP address of your OctoPrint/OctoPi host
bambu_ip_address IP address of your Bambu Lab printer on the local network
bambu_access_code Access code shown on the printer screen (Settings > WLAN)
bambu_serial_number Serial number of your Bambu Lab printer
bambu_camera_enable Set to true to capture camera snapshots with $bambustat (requires ffmpeg)
statping_enable Set to true to enable StatPing service status integration
statping_url URL of your StatPing instance
statping_api_key API key for StatPing
mmr_checker_enable Set to true to enable MMR checker
mmr_checker_interval Seconds between MMR checks
mmr_api_url MMR API URL
S
Description
A Discord Bot that can be used to monitor & query the status of your 3D printer via Octoprint, among other things.
Readme MIT
51 MiB
0 Stars 1 Watchers 0 Forks
2022-12-10 00:37:04 +00:00
Languages
Python 100%