Be real neat if some very clever chap could describe with a RaspberryPi, how to toggle a GPIO pin from high to low (or visa versa) when the Rpi running piCoreplayer has a data stream on the I2S pins.
IE playing music output pin high, not playing music pin low.
Yes its another auto power shutdown thingy for the following DAC.
Regards
Tony
hi Tony,
You shouldn't be reading all those recent piCorePlayer posts.
It should be fairly easy to do, but from a piCorePlayer perspective, there are too many variables to make a standard solution for everyone. Also, it moves piCorePlayer from a pure software solution to adding a hardware component that would be difficult to support (and potentially dangerous for the RPi).
Also, I believe the solution should not bloat piCorePlayer, that means no bash, no perl, no python just shell. It might not be as elegant, but it keeps with to the piCorePlayer philosophy of minimal and compact.
I believe I have all the bits to give you a solution that works.... its just not wrapped into a nice package.
Here's the relay board I am using.
http://rover.ebay.com/rover/1/705-5...0001&campid=5338728743&icep_item=351208515628
You need to use nc for 2-way communication with LMS. Telnet can be used if you are just sending LMS a command.
Read up on LMS CLI, its under help on your LMS server.
My plan is to have a hard and soft push button to initiate a controlled system shutdown. Power amp off, then preamp off, then DAC off, then a normal RPi shutdown. On reboot, reverse the order and have a delay to allow my valve preamp to warm up before turning on the amp.
Example nc code from piCorePlayer:
Code:
pcp_lms_get() {
RESULT=`( echo "$(pcp_controls_mac_address) $1 ?"; echo exit ) | nc $(pcp_lmsip) 9090 | awk '{ print $3 }'`
echo `sudo /usr/local/sbin/httpd -d $RESULT`
}
ARTIST=$(pcp_lms_get "artist")
regards
Greg