-
-
Notifications
You must be signed in to change notification settings - Fork 16
API
jneilliii edited this page May 5, 2020
·
2 revisions
OctoPrint-Tasmota uses the OctoPrint SimpleAPIPlugin mixin for API.
turnOn
Turn the tasmota device on. Requires additional parameters ip and idx.
turnOff
Turn the tasmota device off. Requires additional parameters ip and idx.
enableAutomaticShutdown
Enables automatic power off option.
disableAutomaticShutdown
Disables automatic power off option.
abortAutomaticShutdown
Aborts an automatic power off once automatic power off timer has started.
curl -s -H "Content-Type: application/json" -H "X-Api-Key: YOUR_API_KEY" -X POST -d '{ "command":"turnOn", "ip":"<ip of tasmota device in settings>", "idx":"<index of tasmota device in settings>" }' http://YOUR_OCTOPRINT_SERVER/api/plugin/tasmota
curl -s -H "Content-Type: application/json" -H "X-Api-Key: YOUR_API_KEY" -X POST -d '{ "command":"turnOff", "ip":"<ip of tasmota device in settings>", "idx":"<index of tasmota device in settings>" }' http://YOUR_OCTOPRINT_SERVER/api/plugin/tasmota
curl -s -H "Content-Type: application/json" -H "X-Api-Key: YOUR_API_KEY" -X POST -d '{ "command":"enableAutomaticShutdown" }' http://YOUR_OCTOPRINT_SERVER/api/plugin/tasmota
curl -s -H "Content-Type: application/json" -H "X-Api-Key: YOUR_API_KEY" -X POST -d '{ "command":"disableAutomaticShutdown" }' http://YOUR_OCTOPRINT_SERVER/api/plugin/tasmota
curl -s -H "Content-Type: application/json" -H "X-Api-Key: YOUR_API_KEY" -X POST -d '{ "command":"abortAutomaticShutdown" }' http://YOUR_OCTOPRINT_SERVER/api/plugin/tasmota