My aim is to have the Tasmota switch turn on my printer when I schedule a print using the Print Schedule Plugin. This way, I can schedule a print to start and the printer will be turned on and ready to print.
In the Tasmota device settings under the plugin configuration, I have set up the device so that it can be powered on and off using the GCODE command "M80 192.168.1.42 1". You can find more information about this in the documentation here: GitHub - jneilliii/OctoPrint-TasmotaMQTT.
You can also see a screenshot of my settings below:
This won't work unless your printer is back powered and keeps a connection open to the printer. In most cases that's bad anyway, so instead you have to use a system command to trigger the power on of the plug. You can find the turn on command here, which will require an API key you can generate from Application Keys settings in OctoPrint.
EDIT: you may need to include the full path to curl, in which case prepend the commands on the wiki with /usr/bin/ so it would be /usr/bin/curl ...
Great, the delay is probably coming from the connection delay settings in the Tasmota plugin. You have to give the printer time to power on and get ready before trying to connect.
I know this is an older thread but did you still use the Gcode in the plug settings as well? I've been trying to get a KASA smart plug to work for 2 days off and on. I do have the curl code for my plug but where do you put it? I have it modified with my API, etc. Print scheduler works if I leave the power on and keep OP connected but that kind of defeats the purpose of "scheduling" if I have to physically be there to connect or leave it on all the time.