PSU Control automatic Power on at boot?

Hi everybody !
I need some information about the PSU plugin.
There ist an option to atomatic switch it on at power on /boot .
If I boot the system it will not switch the switch on. If I click it manually everything is doing fine as expected.

I tried so many settings but I'm not able to get it working .
I expected, to switch on the power supply, the raspi will boot octoprint and then it will switch on the relay and start the printer.

Any suggestions ?

Regards
Mameniac

I'm having the same problem! It boots up with the relay turned off. very frustrating

after more experimenting, it seem that the 'invert' settings for the switching and sensing GPIO need to be carefully chosen however whenever I have one invert selected and the other not selected, the toggle switch doesn't actually work. Unfortunately this is the combination I need to make my set-up work correctly.

I tried these settings any many other combinations as well and this thing will always boot up with disabled relais. I can switch it still manually and then its doing what I expect, but thats not what I wanted. So I decided to remove the plugin and removed the relais. I power the thing up (printer AND the pi) and then I do the do, and after all I shut it down using the webinterface, or I use the GPIO-Shutdown plugin and use a small reset switch. So after the work, I hit the button, the pi shut down and after that I switch off the printer ..
Thats my "workaround" for the next time.
Regards
Mameniac

yeah after all day today messing with this I think I am about there as well!
I've tried additional transistors and, pull up and down on various pins with loads of setting combinations but no joy

I've found a work-around to this and it may help others so thought I would post it on here.

The problem:
No matter what combination of PSU control plugin settings I try (different pins, invert, BCM/board, internal, float, NO/NC etc) I couldn't get it to boot into OctoPrint and turn the printer on automatically and know that the PSU is on and therefore function correctly from that point on.
Yes I know that all I have to do it click the little lightning bolt!
The one setting that seemed like it would solve the problem (tick 1 invert and not the other) just locked up the plugin. The on/off toggle became unresponsive.

My solution:
Install the PSU control plugin and get it fully working to activate a relay in the correct sense - but simply not auto-activate on boot.
Install the Enclosure plugin.
Set-up the PSU relay as an output and tick the box to activate it during boot and hide the UI
Unfortunately the enclose plugin does not seem to have the facility to auto-connect to printer so...
Install PortLister plugin.

done!
It's a little long winded but it works

I came across the same issue and found a decent work around. The GPIO shutdown plug-in has a server ready indicator light, so I set that pin to the same on as my PSU relay.

This works in that the printer powers on just after octoprint, however, PSU control indicator doesn’t switch on, and it doesn’t auto connect. So you do have to click the lighting bolt to fix both those. So far no issues with PSU and GPIO Sharing the same pin.

On OctoPi:

sudo nano /etc/systemd/system/octoprint-psuon.service

[Unit]
Description=OctoPrint PSUControl turnPSUOn
After=octoprint.service

[Service]
Type=oneshot
ExecStart=/usr/bin/curl -s -H "Content-Type: application/json" -H "X-Api-Key: YOUR_API_KEY" -X POST -d '{ "command":"turnPSUOn" }' http://127.0.0.1:5000/api/plugin/psucontrol --retry-connrefused --retry 10 --retry-delay 10
RemainAfterExit=true
StandardOutput=journal

[Install]
WantedBy=multi-user.target

sudo systemctl daemon-reload

sudo systemctl enable octoprint-psuon

sudo reboot

Just be aware that the API key will be visible w/ systemctl status.

2 Likes

H,

that script helped not in my case, I plaeced it, but about 20 sec after rasperry is connecting, my shelly is switched off. When I dispale the Hook at Power Off Option it will persist, any help on that?

Thanks Michael

I'm assuming that it is not getting a connection "in time" so the connection is refused by any reason ?
so it wil turn it off again ?

Ist nur geraten.
Mfg
Mameniac

To further question this. Can the ender 3 v2 just boot on and off using gcode commands?

i could not get this to work with my ip and api key, unfortunately.