Hi!
I’m a long time user of Volumio. Love it.
In a new system I have an old receiver with sleep function. I would like Volumio to stop playing when the amp goes to sleep. I can think of 1 way:
I power the RPI 4 via the usb on the receiver. When it shutsdown the power wil be cut. Not very sophisticated, I know. Here I will use an usb dac wich will be externally powered.
I know there will be a small chance of corrupting the SD card. Any other problems with this scenario?
Cheers!
Peter
not really, (besides the SD card corruption) but I doubt that the amp can power the rpi adequate.
the rPi4 requires 3A, pretty sure the amp can’t deliver that
you can use the 5V of the receiver USB port as a signal to trigger the shutdown of the Raspberry Pi (when 5V is removed) or to boot the Raspberry Pi (when the 5V is applied again).
Please be aware it requires some additional components to make it working, connecting directly the 5V to a GPIO of the Raspberry Pi will damage it.
the RPi will be always powered, but the circuit should “translate” the presence or absence of the 5V from the USB of the receiver into a signal that mimics the press of a button, connected to two GPIOs of the RPi.
But then next time you want to play music you’d have to turn on the receiver and wait for a few min for the RPi to boot? That seems inconvenient.
I don’t know what your ultimate goal is, but consider what happens if you turn off the receiver, and then do nothing - don’t touch volumio at all. It will continue playing until it reaches the end of playlist or album. That way next time you turn the receiver on - just pick a song and press play.
There may be another way: power the usb dac from your amplifier, not the PI. Write a script which polls the existence of the usb dac device every few minutes by parsing the output from “aplay -l”.
Then, when the device goes “missing”, shutdown the PI with a normall “poweroff”.
You may need to cut the 5v line from the usb cable between the dac and PI.