So i am trying to make a physical button that auto homes my printer. I want to use the physical button plugin. The hardware and wiring is correct. My guess is that it is a permission problem since my user is caled admin not pi.
sudo usermod -aG gpio admin
might help
Already done
Any other ideas?
Also GPIO Status does not work.
I use OctoPrint 1.11.3 Python 3.11.2 OctoPi* 1.1.0 (build 2025.09.09.113029)
on Raspberry Pi 3B
also udo usermod -aG gpio admin did not help.
Doesn't physical button plugin work? I dont quite understand😅
The two plugins: Physical Button and GPIO Status, don't work on Pi3.
I'm currently testing with a Pi4. GPIO Status seems to be working. I'll let you know later today if the Physical Button works.
Oh i see. Im running raspberry pi 4. Let me knowif you get it to work. Thanks
This might be a bookworm specific thing. I know OctoPi was updated with this in the service file, but not sure if was done prior to the 1.1.0 release. You can try by manually updating the service file. SSH to pi and run this.
sudo nano /etc/systemd/system/octoprint.service
use arrow keys to scroll down to the Environment variables and add a new one Environment="LG_WD=/tmp"
, the service block should look like this when done.
[Service]
Environment="HOST=127.0.0.1"
Environment="PORT=5000"
Environment="REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt"
Environment="LG_WD=/tmp"
Type=simple
User=1000
ExecStart=/opt/octopi/oprint/bin/octoprint serve --host=${HOST} --port=${PORT}
ctrl+s to save, ctrl+x to exit. then run these commands.
sudo sysmctl daemon-reload
sudo service octoprint restart
You really should not be editing around directly in the service files if you can avoid it, instead use overrides (built-in systemd feature). That's also what systemctl edit
does.
Commands that should in practice achieve the same (I cannot test this myself, so someone else needs to):
sudo mkdir -p /etc/systemd/system/octoprint.service.d/
echo -e '[Service]\nEnvironment="LG_WD=/tmp"' | sudo tee /etc/systemd/system/octoprint.service.d/gpio-env.conf
sudo systemctl daemon-reload
You can confirm the active service information is with systemctl cat octoprint
.
Then restart OctoPrint.
If that's the case, should the already merged change to the service file in OctoPi be updated for this same approach?
Shipping it from the get-go like this should be fine, but I'd avoid changing shipped files if there's another option in general. So, the already merged PR should stay like it is, but end users who want to change things should use the official approach to adjusting systemd unit files IMHO.
So i need to update? Is that what you are saying?
That won't even help as the service file change was not made prior to the release of the latest OctoPi version 1.1.0.
Run the commands I listed above.
First of all, sorry for the late response i was very busy.
I ran the commands, but still not working. I also tryed gpio status plugin and that also didn't work
You could try the SIO Control plugin along with a cheap micro controller and get what you want. These complications are a part of the reason I made it. Imagine your sd card fails in 3 months(the reason I don't use an Rpi), will you remember what it was that you did to get things working? It may not be part of that backup you likely did not make.
This seems to be very similar to psu control. I want a physical button connected to my raspberry pi that can perform a specific gcode. As far as i know psu control only performs outputs.
Well that helps me understand that I must not have made the point on what it does in the description.
Outside the idea that you are focused on connecting something to the Pi... The SIO Control Plugin and controller does handle both inputs and outputs. One of the items in the screenshot(FRS) is configured as an input. What you see on the interface is the status of that input, its actually a filament runout limit in that case but buttons work exactly the same.
Not trying to sell you, it for sure is not for everyone. Just pointing out options to solve your challenge.