Skip to content

Instantly share code, notes, and snippets.

@Benny-Git
Benny-Git / bambu-notify.py
Created January 24, 2025 08:48
Advertise a Bambu printer to Orca Slicer / Bambu Studio
# Derived from this: https://gist.github.com/Alex-Schaefer/72a9e2491a42da2ef99fb87601955cc3
# This script mimics my Bambu printer's behavior and keeps advertising itself via SSDP every 5s.
# You could keep this running in the background, so you don't have to remember starting it whenever you start Orca Slicer or Bambu Studio.
import sys
import socket
import time
from datetime import datetime
TARGET_IP = "127.0.0.1" # Change this to the IP of the computer with the printer software. If you're running this on the same computer, leave it as is.
#!/usr/bin/python3
import requests
import json
import re
import paho.mqtt.client as mqtt
import paho.mqtt.publish as publish
# Regex to match the hidden input on the initial log in page