Skip to content

Instantly share code, notes, and snippets.

@halomakes
Created December 12, 2024 01:31
Show Gist options
  • Save halomakes/06b5bfcb014ba981e09834aae345cd16 to your computer and use it in GitHub Desktop.
Save halomakes/06b5bfcb014ba981e09834aae345cd16 to your computer and use it in GitHub Desktop.
OctoPrint PSU Control with Tasmota Plug

I got PSU control working with a cheap tasmota smart plug and thought I'd share my settings for anyone interested. Of course, replace 3dprinterrelay.iot.gravy.network with the hostname of your relay. I recommend not giving it any internet access. You can password protect these calls if you are so inclined.

Switching

Switching Method: System Command On System Command:

curl http://3dprinterrelay.iot.gravy.network/cm?cmnd=Power%20On

Off System Command:

curl http://3dprinterrelay.iot.gravy.network/cm?cmnd=Power%20Off

Sensing

Sensing Method: System Command Sensing System Command:

test $(curl -v --silent http://3dprinterrelay.iot.gravy.network/cm?cmnd=status%2011 2>&1 | grep '"POWER":"ON"')

Polling Interval: 5 sec

Set everything else to your liking.

Cheers! 🍻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment