jneilliii / OctoPrint-PrintScheduler

MIT License
10 stars 2 forks source link

Can't control Tasmota from Print Scheduler #18

Closed WorlockM closed 2 years ago

WorlockM commented 2 years ago

I am trying to have the Print Scheduler plugin turn my printer on using a Sonoff flashed with Tasmota. In my browsher this can be achieved http:///cm?cmnd=Power%20On. But using this command in the "System Command Before Each Print" section" doesn't work.

In the Wiki I found this command example: curl -s -H "Content-Type: application/json" -H "X-Api-Key: " -X POST -d '{ "command":"turnOn", "ip":"", "idx":"" }' http://localhost/api/plugin/tasmota

But I do not know what IDX is... Where can I find this?

jneilliii commented 2 years ago

This example command is assuming you have my Tasmota plugin installed. In most cases that idx will be 1 for single relay devices. If you don't want to install my Tasmota plugin (it has some nice features like auto off on idle) you could use the curl command below I think.

curl -s http://<TASMOTA_IP>/cm?cmnd=Power%20On