jamathews / squeezelite

Automatically exported from code.google.com/p/squeezelite
Other
0 stars 0 forks source link

Feature Request - put handler in output.c for power on/off of amps #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm planning a diy whole house audio solution and would like to be able to 
power amps on and off when the squeezelite player is turned on/off. 

I see in output.c that you're receiving the power on/off press. It would be 
great if there was a command line option for a script that would be ran on each 
on/off press. I can build the script, it just needs to be called with the 
player name and on or off.

My script would hook this into a Denkovi USB -> 4 port relay card which would 
control power to the amps. The script would handle the mapping of which 
squeezelite name is mapped to which relay port. 

Essentially I can do some pretty good scripting but coding in C is not my forte.

Thanks,
Daniel

Original issue reported on code.google.com by leabe...@gmail.com on 31 Dec 2012 at 2:05

GoogleCodeExporter commented 9 years ago
Is the server also running on the same machine? I'd suggest doing this as part 
of that as the hooks are probably already there.. You could create a cli script 
to subscribe to power messages on the server cli port and do something with 
those?

Original comment by trio...@btinternet.com on 31 Dec 2012 at 4:54

GoogleCodeExporter commented 9 years ago
That's a great idea I had not considered. The server is running on the same 
machine so I will pursue that course of action. Thanks for the great work on 
squeezelite, it's fabulous!

Original comment by leabe...@gmail.com on 31 Dec 2012 at 6:24

GoogleCodeExporter commented 9 years ago
Closing as this is best supported via server plugins..

Original comment by trio...@btinternet.com on 31 Dec 2012 at 6:38