-
Notifications
You must be signed in to change notification settings - Fork 113
API
PSUControl uses the OctoPrint SimpleAPIPlugin mixin for API.
turnPSUOn
Turn the power supply on.
turnPSUOff
Turn the power supply off.
togglePSU
Toggle the power supply on/off.
getPSUState
Get the current on/off state of the PSU. Returns isPSUOn(boolean).
turnPSUOn
curl -s -H "Content-Type: application/json" -H "X-Api-Key: YOUR_API_KEY" -X POST -d '{ "command":"turnPSUOn" }' http://YOUR_OCTOPRINT_SERVER/api/plugin/psucontrol
turnPSUOff
curl -s -H "Content-Type: application/json" -H "X-Api-Key: YOUR_API_KEY" -X POST -d '{ "command":"turnPSUOff" }' http://YOUR_OCTOPRINT_SERVER/api/plugin/psucontrol
togglePSU
curl -s -H "Content-Type: application/json" -H "X-Api-Key: YOUR_API_KEY" -X POST -d '{ "command":"togglePSU" }' http://YOUR_OCTOPRINT_SERVER/api/plugin/psucontrol
getPSUState
curl -s -H "Content-Type: application/json" -H "X-Api-Key: YOUR_API_KEY" -X POST -d '{ "command":"getPSUState" }' http://YOUR_OCTOPRINT_SERVER/api/plugin/psucontrol
curl -s -H "X-Api-Key: YOUR_API_KEY" -X GET http://YOUR_OCTOPRINT_SERVER/api/plugin/psucontrol