ATXraspi not working with Volumio [Solved but now have another issue]

Started by xyzzy, March 02, 2017, 01:44:37 PM

xyzzy

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.

Felix

Looks like you need to install RPi GPIO on Volumio if it doesn't include it.
Here's an article 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 which allows you to choose the POLLING option.
Instructions on the github page.

xyzzy

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.

Felix

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.

xyzzy

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?   

sparky

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?

Felix

What type of button are you using that is connected to the ATXRaspi?
Can we see a closeup photo of your setup?

xyzzy

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!!!

Felix

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!

lumor

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!








Felix

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.

lumor

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.

Felix

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.

lumor

Ok, thanks for your troubleshooting Felix. I will look at it tomorrow again with fresh eyes.

lumor

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.