PSU Control: How to send M80 without connection to the board?

That's not a terrible approach.

You might also be able to write a plugin that hooks into the serial connection. Maybe this works even when OctoPrint thinks the printer is disconnected and then you could trap that M80 there.

I started the whole thread in the hope that the PSU Control plugin would just do that already. On the github site of the plugin there is no possibility to ask this questions and I am too lazy to dig through the code to find it out myself.
My approach with the service would have the advantage to be independent of OctoPrint :wink:

The author's repository has an Issues feature. You could open up a fact-finding issue in an attempt to speak with the author.

Or you could find their username on here and then call out to them with an @ symbol followed by their username. If they frequent the forum here, then they'd be notified.

I am familiar with github, because I use it myself, but this author has his issue page not enabled, see yourself

Wow. Did not know that. I guess then we have this approach...

@kantlivelong

UPDATE: Ah, he's using a gitea (github-compatible) server on his domain name. So he's doing what I'm doing, running my own server so that I can have unlimited private repositories without paying github.

Thanks, maybe that helps.

My stuff is not so important to keep it secret. The linux kernel driver I wrote is now spread widely.

I use the scripts for system commands and I added the on/off to the header bar. GCODE commands are processed by the printer controller only, not the Pi, so unless the printer is already on, you can't use gcode to switch it on.

1 Like

This is just not true. Here you can see that the gcode command is processed by the plugin on the Pi.

@OutsourcedGuru I use GitHub for publishing public projects :slight_smile:. So that's the right place for anything related to PSUControl. I ended up disabling Issues due to people treating it like product support and not a real issue tracker.

To answer the question in this thread. You simply can't use G-Code commands (M80) when the serial port is not connected. If you want that functionality you'll have to re-work your setup to run the controller & pi on standby power and then add support in your firmware to switch on primary power.

1 Like

Thanks dude. And I know what you mean about odd issues entered by people. :+1:

As I told in my first post, that wouldn't work with some of the TMC drivers. So I have to think about the solution that I mentioned some posts above. A service that acts like a virtual printer that lets octoprint believe that there is an active connection.And this service would switch the relais.

I know this is a bit old but I thought it worth mentioning, if you are using cura as your slicer, the octoprint plugin in cura can detect when psu control is installed and theres a check box you can set to automatically trigger psu control on when you upload gcode to the pi.

If I can't send the M80 gcode if the connection is closed, then neither the plugin in cura can do it.

Why do you have to trigger it with M80? Its easily triggered with a single button in the web interface and it has its own API that lets you trigger it from the back end. I use it in combo with a custom fork of PortLister and my printer is booted and connected to octoprint in about 5 seconds after triggering the relay. The M80 is intended for if you have marlin configured to control an ATX power supply using a pin on your print board and doesn't involve octoprint at all.

I have the same issue, as gdahs, I want to lounch my prints from astroprint outside my network so I have no acces to the octopiGUI... I saw some movies using the TPlink (internet switches) It seems the plug-in they use (the TPlink plugin ) allows to automatically connect... but let's be honest this this is a toy for DIYers wtf should every thing be connected throug my router and 20euro swithches... sory I'am getting to old for this stuff perhaps I should wait an other 15years for my 5months old kid to teach me :stuck_out_tongue: ... seriously getting old ....

(...) I use it in combo with a custom fork of PortLister and my printer is booted and connected to octoprint in about 5 seconds after triggering the relay(...)

Hi, this is getting old but could you please detail how you managed to boot the printer through PortLister? I'm a total newbie with python...
And btw did you notice any risks associated with this method in your printing workflow?
Thanks

A lot of responses but none seem to answer how you're able to turn the TPLink switch on and power the printer via the plugin. I keep getting an error as well.

In short - You cant send GCODE when not connected. I've replied to your message on the other thread.

I understand that and agree. What is the trigger to turn on/toggle the plugin device?