Octoprint reconnect on Prusa power on  

  RSS
viorels
(@viorels)
New Member

Hello, I'm using OctoPrint on a RaspberryPi 3 A+ with my Prusa connected (through the pins on the board with a custom cable) and it's working great.

The problem is that I want OctoPrint to reconnect to Prusa when Prusa is powered on and it doesn't work. RaspberryPi is always on (separate power supply) but I turn the printer off over night. So whenever I turn the printer back on, I have to connect to the web interface and click the connect button, which is kind of annoying, so I was looking for an auto reconnect feature.

I heard about PortLister plugin but that one is expecting for /dev/ttyAMA0 to disappear and then show up on Prusa power on. The strange thing is that ttyAMA0 always shows up, even if the printer is off. I tried with and without 5V line connected (strange, it doesn't work at all without 5V), tried using a USB cable on ttyACM0 and same results (ttyACM0 always shows up).

Has any of you solved this reconnection problem? Thanks!

Posted : 16/06/2020 11:37 am
Karl Herbert
(@karl-herbert)
Famed Member
Posted by: @viorels

Hello, I'm using OctoPrint on a RaspberryPi 3 A+ with my Prusa connected (through the pins on the board with a custom cable) and it's working great.

The problem is that I want OctoPrint to reconnect to Prusa when Prusa is powered on and it doesn't work. RaspberryPi is always on (separate power supply) but I turn the printer off over night. So whenever I turn the printer back on, I have to connect to the web interface and click the connect button, which is kind of annoying, so I was looking for an auto reconnect feature.

I heard about PortLister plugin but that one is expecting for /dev/ttyAMA0 to disappear and then show up on Prusa power on. The strange thing is that ttyAMA0 always shows up, even if the printer is off. I tried with and without 5V line connected (strange, it doesn't work at all without 5V), tried using a USB cable on ttyACM0 and same results (ttyACM0 always shows up).

Has any of you solved this reconnection problem? Thanks!

Maybe you will find a helpful tip here: https://github.com/OctoPrint/OctoPrint/issues/1388 or here: https://community.home-assistant.io/t/octoprint-reconnect-after-printer-3d-turn-on/47766

Statt zu klagen, dass wir nicht alles haben, was wir wollen, sollten wir lieber dankbar sein, dass wir nicht alles bekommen, was wir verdienen....
Posted : 16/06/2020 7:47 pm
viorels
(@viorels)
New Member

Thanks @karl-herbert

The 2nd idea might work for me as I am already using HomeAssistant.

On the other hand, I'm trying to get to the root of the problem. Why isn't the USB cable "disconnected" when the printer is off? What is different about Prusa from other printers in this regard?...

Posted : 16/06/2020 9:14 pm
Mark
(@mark1)
Eminent Member

This might be by design. If your printer is printing from SD and Octoprint loses connection... if it reconnects automatically your print will stop.

Posted : 18/06/2020 1:56 pm
viorels liked
Neophyl
(@neophyl)
Noble Member

I don't use Octoprint or a Pi but one possibility does occur to me based on some Embedded modules we have at work. 

We have a Genset module that normally is powered from a 8-32v plant battery and can be connected to a GSM gateway via USB to send that data to a server.  You are probably asking what the hell that has to do with anything 🙂 
Well the thing is if I remove the plant battery from the Genset module the USB link from the gateway supplies enough current to keep the main processor on the genset 'alive'.  The LCD module goes off, and the IO on the controller doesn't work properly but it in effect never turns off fully.

Its possible the Pi USB port is keeping the einsy active in the same way.  Those boards are basically just beefed up Arduino's and I know you can supply power to an Arduino through the USB enough to run it.

Posted : 18/06/2020 2:15 pm
viorels liked
Share:

Please Login or Register