Closed Deses closed 2 years ago
I'm trying to use curl to start the printer when the PrintScheduler plugin sends a system command.
According to PrintScheduler's wiki, the command I should use should look like something like this:
curl -s -H "Content-Type: application/json" -H "X-Api-Key: XXXXXXXXXXXXXXXXXXXX" -X POST -d '{ "command":"turnOn", "ip":"192.168.1.110" }' http://localhost/api/plugin/tuyasmartplug
But the response I'm getting is: {"error":"Mandatory parameters missing"}.
{"error":"Mandatory parameters missing"}
Where can I take a look at the plugin's API to see what are the parameters?
Found it here!
curl -s -H "Content-Type: application/json" -H "X-Api-Key: XXXXXXXXXXXXXXXX" -X POST -d '{ "command":"turnOn", "label": "Ender 3" }' http://localhost/api/plugin/tuyasmartplug
I'm trying to use curl to start the printer when the PrintScheduler plugin sends a system command.
According to PrintScheduler's wiki, the command I should use should look like something like this:
curl -s -H "Content-Type: application/json" -H "X-Api-Key: XXXXXXXXXXXXXXXXXXXX" -X POST -d '{ "command":"turnOn", "ip":"192.168.1.110" }' http://localhost/api/plugin/tuyasmartplug
But the response I'm getting is:
{"error":"Mandatory parameters missing"}
.Where can I take a look at the plugin's API to see what are the parameters?