tasmota-MQTT turn on from Cura?

Hi,

I am using the tasmota-MQTT plugin. I think it's a great plugin and works great. I just haven't found a way to automatically turn on my printer when I send a print from Cura.

Basically, if the power is off, Cura with the octoprint plugin sees the printer is disconnected. I can't send gcode until the printer is connected and I can't connect until the power supply is on.

Anyone knows of a way I could make Cura turn on the printer?

My pi is always on but I taped the 3.3v pin on the usb cable because the ender board is whiny otherwise.

thanks!

Do you want Cura to start the print job as well? Because I know for a fact you can send the GCode to OP without a printer connected or powered off.

This has been a challenge to all my power plug plugins. I haven't thought of a good approach to accomplish this yet outside of monitoring the file added event in OctoPrint. Cura will give you an option to queue the file if the printer is powered off and the file upload does complete. The problem is any form of start print job after power on would also have to be taken into account. Maybe Print file on startup - Autostart Autoprint plugin might handle that part, but would have to double-check.

My goal is to send the print, have the printer power on, octoprint connect, start the print, turn off the printer.

Hi @jneilliii thanks for the plugin!
I'll look into autostart...

I'll have a look at how Cura plugins work. Maybe MQTT for Cura?

Sure, we may be able to coerce @fieldOfView to update the cura plugin with power-on support or an optional api call to be a little more universal since there are so many different ones now. He integrated checks for recognizing the UltimakerFormatPlugin being installed and uploads in that format when it is detected.

I could be wrong, but:

  1. They have plugins that look for a GCode command to turn on a plug. You can put that command into your start GCode.

  2. Then do a wait command in your start GCode. I’m assuming that wait commands exist. Not sure though. The wait command is just for the printer to start up.

  3. Is there a setting in OP that allows you to start a print job even if it’s not connected to the printer? I thought I’ve seen that but I can’t get to my OP instance right now.

I've been coerced before... The plugin also supports the PSUControl plugin:

Yeah the difference between that one and my plugins is that it's possible to control more than one. That's why I was thinking of a generic api call that could be configured rather than hard coding it. It would be more open ended that way for other use cases as well I suppose.

I am currently working on supporting the "TP-Link Smartplug", "Orvibo S20", "Tuya Smartplug" and "Tasmota" plugins in the Cura-OctoPrintPlugin. Each of these supports multiple plugs/relays; the Cura plugin will let the user select which one to toggle.

Note that the "Tasmota" plugin is not the "TasmotaMQTT" plugin. The latter does not have a "turn on" api command, only a "toggle". Querying the plugin before toggling is not a hoop I am willing to jump through, so I have submitted a PR for the "TasmotaMQTT" plugin to add "turn on" and "turn off" commands so that plugin can be supported too.

Thanks @fieldOfView, I'm reviewing/testing your PR now.

Ah, good, then at least one of us has tested it :wink:

That's awesome, thanks!

Works like a champ, thanks for the PR @fieldOfView.

1 Like