Shut down Pi with Volumio

Hi all. I am a complete beginner with both Pi and Volumio.
To date I have installed Volumio 2 on my new Pi 3 B+. I have my music collection on a large USB hard drive attached to the Pi
I can do everything that I should be able to do by loading the Volumio via it’s web page on my P.C.
I am outputing the sound to an existing Onkyo amp. and speaker set-up. I will be shortly buying a combined amp/dac hat and will probably go for the
Pi digiAMP+ from IQaudio ltd. I will be using my smart phone to install and run Volumio from at that stage.
Once I get to that stage I would like to add a push button shut down and status led to the front panel of the box which I am building to house everything. I may have a problem achieving this as I think the pins I need are going to be already used by the audio hat
In the meantime can I safely shut down the Pi using the shutdown tab in Volumio and assume that I can then safely cut the power?
Any other advice would be most gratefully received.

Mike

Maybe remotepi with external led?

Thank you for your reply XLISEC. Unfortunately I do not understand your answer.
My questions were -

  1. Is it ok to shut down Volumio using the button in the menu and then pull the plug on my Pi safely. - ie put it to bed in the proper manner?

  2. How can I add a status led and shut down button to my cabinet if the audio hat that I am using has already taken the pins normally used for that purpose?

Sorry, I will try explain this better. You try resolve issue with safe shutdown your raspberry pi with HAT. When you click on shutdown button in volumio UI. System stops right and safe. After that you can unplug wall wart power supply, if you want. If not, you can keep it plugged. Wall wart power supply is very effecient (it works as switching mode power supply).

This issue solved many people before you. They created HAT for raspberry Pi called “remotepi” (youtube.com/watch?v=Av7Qcn9b0h4 . Volumio supports it, you need install a plugin for controll.

RemotePi board have LED, button and IR receiver. They offers more versions even with external LED, external IR and external button. msldigital.com/collections/all-products

I think, pin setting is OK. Look on documentations or you can ask for pins settings on suppor of your DAC manufaturer and RemotePi support.

P.S. I don’t own remotepi.

Take a look here:

howchoo.com/g/mwnlytk3zmm/how-t … spberry-pi

and here:

howchoo.com/g/ytzjyzy4m2e/build … -indicator

Tried it and it works.

Hi again.

OK I think I have got it.
It may take me some time to sort it all but I will be able to achieve my goal with the info. that you have given me.
It is very much work in progress at the moment. I will keep you posted.
Perhaps some more problems in the future.

Hi all,
Thank you for the suggestions.
I’m trying to do the same but I have 2 questions:

  • I have an external i2c display connected to the same pins, how could I do the wiring?

  • I would like to add a hifiberry digi+: will this be a problem with the gpio pins?

Thank you

Hi.

This is what I did.

Connect GPIO 3 and Ground with a momentary push button to wake up Pi ( this is the default pin setup)
Connect GPIO 26 ( or any other spare pin ) and 3.3v pin with a momentary push button to send Pi to sleep. If you look at the GPIO buttons plugin in Volumio you will see that you can select any pin instead of GPIO 26 to suit your setup.
If you do things as above you will need a double pole push button for the two actions, or you could use two separate single pole push buttons.

For the indicator lamp you need GPIO 14 (TXD) and ground with a current limiting resistor in series with your LED.
For the lamp to work you you need to do the following to enable the pin -

Edit your /boot/config.txt file and add the following line:
enable_uart=1
I can’t remember why but I also had to disable bluetooth by adding the following line:
dtoverlay=Pi3-disable-bt

The above should not affect youri2c and should not be a problem with your digi hat. ( check which pins it uses)
After I fitted a hat I soldered wires directly to the solder blobs on top of the board corresponding to the relevent pins.

Hope this all makes sense

Jukebox Builder

For the sleep button I should wire gpio 26 and pin 1 (3.3 v) and in volumio plug-ins I should select pin gpio 26?
How wire for exame button vol+
Thanks

In the plug-ins shutdown I can select gpio 26

You can select GPIO 3 in the pluging setup, so you can shutdown and wake up the PI with the same button.

1 Like

Thanks for your input,
You say that I can use gpio3 for shutdown and wake up… If I configure it in plugins? This will be great to have only one button :slight_smile:

Yes GPIO 3 for shutdown & startup works fine, but may conflict with some DACs if they use that PIN.
Startup always work with GPIO3, but if you have a conflicting DAC, then choose another pin for shutdown.

BTW, you may not even need to use any plugin for that; just add the following in config.txt (more info here):
dtoverlay=gpio-shutdown

I have rpi4, latest bootloader.
Until I had this working config with 2 buttons, wake up on gpio3 and shutdown using plugin on gpio23, I have also tried the dtoverlay gpiio shutdown, but did not shutdown from one button (the one conencted to gpio3…) if you could give me the syntax how to use it it will be great.
I do not use a hat dac…
Thanks

Hi.
Default syntax is just as per my previous message, and more advanced settings are described in great details at related link (search for gpio-shutdown in text).
Just do NOT use same GPIO pins in config.txt and in eventual plugin settings, if you happen to use it too.