Skip to content

Instantly share code, notes, and snippets.

View sumpfeule's full-sized avatar

Jochen Euler sumpfeule

  • 12:14 (UTC +01:00)
View GitHub Profile
@sumpfeule
sumpfeule / gist:d15eb28e893b92f1bb1440dbced4bfb5
Created November 3, 2025 14:03
Octoprint: Autoconnect printer on poweron
Create /etc/udev/rules.d/99-usb-serial.rules:
SUBSYSTEM=="usb", ACTION=="add" ATTR{idVendor}=="01a86", ATTR{idProduct}=="7523", RUN+="/home/pi/connect.py", TAG+="systemd"
ATTR{idVendor}=="01a86", ATTR{idProduct}=="7523" are printer specific and for an Sovol SV06. You can find yours with lsusb on your pi while the printer is connected.
The script mentioned in the rule (/home/pi/connect.py) looks as follows:
```
#!/usr/bin/python3