Simple API inside Docker 🐳 to remotely power on/off your Raspberry USBs (tested on Raspberry Pi 4b 8GB)
Engine which turns usb off/on is the uhubctl project
docker build --rm --pull -f Dockerfile -t usb-api:latest .
docker run --privileged -p443:443 --restart=always --name usbpiapi -v /etc/letsencrypt:/etc/letsencrypt -d usb-api
-
make a post call to your_url/lights
-
send these parameters in body:
-
psw (your password to obtain access to API)
-
powerOn (false -> lights off / true -> lights on)
-