ATX-Raspi / ATXRaspi & Volumio

Started by Old, June 08, 2015, 10:06:04 AM

Old

Hi All

I am not an electronics whizz and I know nothing about Linux but I have ALMOST successfully built a miniature battery powered music streamer based on RPi model B2 running Volumio. The battery is a stack of 3no 3.7v Li-ion battery cells connected to a battery management and voltage step down pcb and switched with Raspi ATX!

The problem:

The unit switches on fine with the momentary button but neither the shutdown nor reboot procedures are invoked by Volumio. I have used the same GPIO pins as per the instructions. I am confident that the wiring is correct but attach photo anyway. Incidentally holding down the button for 8-10 seconds does invoke a hard shutdown.

I did wonder if the battery was providing sufficient current, 2 amps fully charged, so I have also powered the ATX-Raspi direct from a 2amp 5v walwart bypassing the battery, but to no avail!

I am a complete novice in regards to Linux etc. but having checked and checked again, I can confirm that shutdowncheck.sh has installed and that the 'shutdowncheck' line does appear at the end script in 'rc.local' and I can open 'shutdowncheck' folder and the text appears identical to that in the video.

However when rebooting (from GUI or SSH) the text line 'waiting for GPIO7 to become high' does not appear. It just jumps from the end of the boot process to login!

Does this suggest that Volumio does not like the code contained within shutdowncheck.sh?

Any assistance would be gratefully received as I have no idea where to go from here.
Many thanks in anticipation
Old

Felix

Not an Linux expert either. But it might mean shutdowncheck.sh is not started or that volumio is not invoking rc.local.
You might need to figure out why that is, or if there's another way to run the script at startup. Not really sure where to point you for that other than good old google. If you do make progress please share :)

You mentioned "shutdown check folder". That is a sh text file, not a folder. Please make sure you follow the steps exactly as in the video. You may confirm if rc.local runs at all if you add a line like echo "TEST" to it and watch for that during boot, if you see it it should mean the rc.local is invoked and should be able to run the shutdowncheck.sh script. The paths shown in the video don't have to be identical, but in general keeping the shutdowncheck.sh script in /etc/ folder should be OK.
https://www.youtube.com/watch?v=w4vSTq2WhN8

Old

Hi Felix
Thanks for your prompt heads up. Now I understand a little more I will see what the Volumio forums have to say.
Re your second paragraph, I'm afraid I really am feeling stupid!
Where would I add the line echo "TEST"? Do I open the rc.local file as I did to check that the shutdown check line was there during install? If so do I write it exactly as you have with the inverted commas?
Thanks again
Old

Felix

Just put echo "TEST" before the end of the file. That should print TEST at the end of boot.

Old

Hi Felix

I think I have established what the problem is, but have not the faintest idea how to resolve it!

I have found a couple of references to people having problems initiating programmes with rc.local in Volumio, whereby the required script inserts itself below the script 'exit 0'. The resolution is to place the script above 'exit 0' to ensure /etc/shutdowncheck.sh runs in the background rather than closing after boot. See attached image.

Does this make sense? If so can you give me some guidance on how to edit the file?

Any assistance would be gratefully appreciated

Kind regards
Old

Felix

You can edit the file with this command that starts a text editor:

sudo nano /etc/rc.local

When finished, hold Ctrl+X, this asks if you want to save changes, type Y and Enter, this will exit with changes saved.

Old

You're a star Felix
Thank you so much for your assistance; all working as recipe!
Now onto the next stage, the onboard DAC which I will power from the spare rail on the ATX-Raspi.
If interested I will post some pics of the finished unit.
Many thanks again
Old

Felix

Yes please do post photos, we love photos :D

rimthompson

Just found this post and I have exactly the same objectives; Pi, ATX-Raspi & Volumio. I experienced the same problem. I applied the suggested fix by editing rc.local and it all works fine. Many thanks for posting this as I would have never sorted the problem as I have zero knowledge of Linux.

rimthompson :)