I just assembled and attached the ATXraspi to my Raspberry Pi running Volumio. It does not reboot or shutdown. I double-checked all wiring and the location of the shutdownirq.py script and the placement of the call to it in the rc.local. It is above the line containing "exit 0" as I saw it earlier posts. I get the following error when I try to run the shutdownirq.py script manually.
volumio@volumio-internal:/etc$ python /etc/shutdownirq.py
Traceback (most recent call last):
File "/etc/shutdownirq.py", line 4, in <module>
import RPi.GPIO as GPIO
ImportError: No module named RPi.GPIO
I don't know what to do about this.
Looks like you need to install RPi GPIO on Volumio if it doesn't include it.
Here's an article (https://zasieczny.wordpress.com/2015/02/12/volumio-installing-gpio-python-module-to-control-amplifier/) that may guide you. Other google searches reveal several other tutorials for this.
Another option is to use the polling .sh script.
Remove the old one and rerun the setup script (https://github.com/LowPowerLab/ATX-Raspi/blob/master/shutdownchecksetup.sh) which allows you to choose the POLLING option.
Instructions on the github page (https://github.com/LowPowerLab/ATX-Raspi/).
Installing the polling script fixed this issue, now the button can be used to "Reboot" or "Shutdown", but after a shutdown I thought pressing the button again would start it up. If that it true, the "Power On' function is not working. No status lights on ATXRaspi turn on when I press the button after a shutdown, and the Pi does not boot.
I saw you posted this separately so I hope you don't mind I removed that thread and the answer is below.
Yes the power button is supposed to tell the ATXRaspi to power your Pi again. That's just like powering it up the first time.
It's all explained and demo-ed in the videos in the official guide.
I don't mind that the other topic was removed but I still have the issue.
I looked at the guide again and confirmed my connections. The only difference between the connections in the video and mine are that I am using the GPIO pins 1 and 3 to power the Pi from the ATXRaspi. I am not using the USB connector.
When I connect it up and apply power to the ATXRaspi the Pi boots immediately without pushing the button, which does not agree with the video. The Reboot and Shutdown work fine, however, the button does not start the Pi after a shutdown (or initially). I cannot get the button to power-up the Pi. I have to remove power from the ATXRaspi and apply it again to get the Pi to boot after a Shutdown.
Is using the GPIO header to power the Pi from the ATXRaspi the same as using the USB with the small USB adapter cable?
What version Raspberry pi are you using? Are you connected to the correct pins (GPIO 7,8)?
Edit: Re-reading your last post you mentioned using pins 1 and 3 for power; did you mean pins 2 and 6?
What type of button are you using that is connected to the ATXRaspi?
Can we see a closeup photo of your setup?
Well, thanks all for your feedback, especially asking what kind of button I am using. I feel like an idiot.
I just went into my parts bin and grabbed a momentary pushbutton and wired it up. I took it off the ATXRaspi and rang it up with a continuity tester and found that I was using a NC button, when the instructions clearly call for a NO button.
My mistake was masked pretty well, since the NC button worked for the shutdown and re-boot, but not for the power-on. Thanks again for all your help, and sorry to waste your time due to my stupid mistake.
Problem solved!!!
Thanks for the update.
Yeah it's usually some small detail like this, sometimes too unobvious. The board does allow operating both types of buttons but for latching it requires a 10K resistor so the board knows to interpret it differently.
Fortunately I do test all these boards after assembly so I can sleep at night. I hope that and the support I provide adds to the value of the product. Enjoy!
Hi everyone,
I'm new here. Sorry if I'm hijacking this thread, but I'm in a similar situation. :)
I have a Raspberry Pi 2 Model B and a HifiBerry DAC+ Pro. I'm running Volumio 1.55 on this setup.
I'm trying to use a toggle switch and I have added the 10K resistor and soldered everything as in the "Slide / latching switch operation" guide.
I have tried to install both the shutdownchecksetup.sh and shutdownirq.py script, but they doesn't seem to run at startup. Could this also be a issue with Volumio and RPi.GPIO module missing?
Thanks for any help!
(https://image.ibb.co/hRX8Jv/Fil_2017_03_03_16_28_19.jpg)
(https://image.ibb.co/h3cxBF/Fil_2017_03_03_16_28_36.jpg)
(https://image.ibb.co/kQnayv/Fil_2017_03_03_16_29_04.jpg)
(https://image.ibb.co/mSHayv/Fil_2017_03_03_16_29_30.jpg)
Quote from: lumor on March 03, 2017, 11:00:07 AM
Could this also be a issue with Volumio and RPi.GPIO module missing
Sure, that was the issue first reported here. The other person installed the polling script which does not require the python Rpi.GPIO module. See if that solves your problem.
BTW you don't need an additional resistor on the LED connection (one already included onboard, your LED might become too dim).
Thanks for the detailed photos.
Ok, I just reformated the SD-card and installed a clean Volumio version.
Then I did these steps:
sudo wget https://raw.githubusercontent.com/LowPowerLab/ATX-Raspi/master/shutdownchecksetup.sh
sudo bash shutdownchecksetup.sh
sudo rm shutdownchecksetup.sh
sudo reboot
Couldn't see the:
*ATXRaspi shutdowncheck script started: asserted pins (7=input,LOW; 8=output,HIGH). Waiting for GPIO7 to become HIGH*
... at startup. If I check the /etc/rc.local these lines are added:
exit 0
/etc/shutdowncheck.sh &
If I use the switch the Raspberry turn the power off after a few seconds and the screen just goes black. Not sure if it's running the safe shutdown command or not.
P.S. I added the resistor to the LED because it was way too bright.
The BOOT OK green LED should be ON if the script is running and your wiring is correct (looks like it is). But it doesnt look like the script is running on your Pi.
I don't know Volumio but you will have to either install the python Rpi.GPIO package to support that or find another way to bootstrap the .sh script at startup, maybe rc.local is not being executed by Volumio although the other user above indicated that the .sh polling script solved his problem.
You are using a toggle switch which means that if you put it back in OFF position, if the Pi does not respond, the power will be cutoff forcefully after a period of time. So the solution is to ensure the script is running otherwise it will just cut power off. The LED should start pulsing if the script is running, then finally pulse fast in the final shutdown sequence.
Ok, thanks for your troubleshooting Felix. I will look at it tomorrow again with fresh eyes.
Good morning,
I tried to start the script manually yesterday and it worked like a charm.
Today I found out that I missed to execute /etc/shutdowncheck.sh before exit 0 in /etc/rc.local. Doh!
Thanks for your help Felix, hopefully this can be helpful for others.
Great, thanks for the update, problems solved, sweet!
Enjoy the ATXRaspi!
I've been testing the system for a while now and I have one problem... sometimes the toggle switch shutdowns the system and sometimes it reboots the system. Any idea why?
I'm not really interested in the reboot function, so if I can disable that and just use shutdown for the toggle switch it would be great.
To shutdown you have to flip the switch and keep it flipped. The reboot function is available on the latching switch as well - ex if you flip it to OFF for 1 second and revert to ON then ATXRaspi will issue a reboot instead of a shutdown. This is similar to momentary switches where if you want a reboot you keep it pressed for 1 second then release, if you want a shutdown you press it for at least 3 seconds. This is also reflected on the SHUTDOWN RED LED. If you watched the videos and looked at the guide you cant miss this, its a trivial concept.
I am flipping the switch and keep it flipped. It's still rebooting instead of shutdown (randomly).
I've read the guide and watched the video many times.
What's the behavior of the RED led?
It's always some wiring problem or script not running or something like that.
Your wiring looked OK, double check everything again, not sure what else to suggest. The boards work as long as everything is setup right and the switch is solid. The resistor should be 10K.
The red LED (on the Pi) is just showing that the Pi has power(?)
I think there's a difference of how fast I'm switching the toggle. If it's running a shutdown or reboot.
I'll try to remove the reboot section from the script tonight.
The RED led should NOT normally be on, except briefly when you execute a reboot or shutdown.
The GREEN LED should always be ON, after boot is complete, if the script is running correctly.
So ... you telling me the RED is on indicating power is a red flag.
The Red LED on my Pi is always on when powered up. According to the link below, this appears to be normal for my particular Pi.
https://blog.adafruit.com/2013/02/15/raspberry-pi-status-leds-explained-piday-raspberrypi-raspberry_pi/
Yes, I think so. See sparky's answer.
Guys I am talking about the RED led on ATXRaspi .......... :)