moonraker
moonraker copied to clipboard
Add support for USB hub power control via uhubctl
This adds support for toggling power to certain USB hubs/ports on or off via the command line tool uhubctl (available via apt on Raspbian). This is useful to completely shut down MCUs, LCDs, and other peripherals that are powered over USB.
On my RPi 3 + RAMPS 1.4 printer setup, the following config lets me turn off the entire printer plus its webcam (port 2 controls power to all 4 ports on the RPi):
[power USB]
type: uhubctl
port: 1-1.2
bound_service: klipper
Disclaimer: I am not a Python developer, and the entire Klipper ecosystem is new to me as of a few days ago, but I've done my best 😅 Feedback welcome 🙂
Signed-off-by: Jim C K Flaten [email protected]
Thanks. I took an initial look and found a few things that should be addressed.