Thanks for the response. In terms of power and volume control it seems your Spa MD setup is indeed similar to my Bedroom MD setup.
However.... Using an audio pipe means that volume commands are directed to the pipe (whether it handles them or not) so in my scenario (and yours I suspect) there is now no way to control the volume as these commands need to be processed by the App Server (which controls the sound card volume controls).
Your suspicion was exactly right. I ran into this problem also.
I discussed this on IRC with Thom I think it was and he is convinced that i am using the system in an inappropriate way and that is expected behaviour. I disagree and believe that volume commands should be able to be directed to whatever device can handle them perhaps with a heirarchy based order - but until I can change this code then that it teh way it works.
I can't comment on whether this behavior is expected or not or good or bad. However, I think it is worth stating the following explicity: There doesn't seem to be a way to properly control the power-only of a device that is somewhere in the audio signal path between the MD and speakers that does not control the volume. This type of device includes stereo amplifiers and equalizers (think audiophile), studio monitors (like I am using), any kind of rack mount processing gear (I'm thinking compressors, noise gates, etc.), and multimedia computer speakers.
My temporary solution which might help you was to listen for the Media Playing and Media Stopped events and use these to turn the Amp on/off. This meant removing the audio pipe so that the volume commands would still be handled by app server and go to the sound card. It works but is a bit of a hack really and ideally I would like to have the pipe connected but that is just added to teh list of things that I would liek to do.....
The downside, of course, of using the Media Playing/Stopped events is that power to the amplifier is toggled more frequently.
I've got some good news. I did get both the power and volume behavior working correctly late last night. The solution isn't that elegant though:
1. I created an an "Amp/Preamps/Recevers/Tuners" GSD device template
2a. I patched the commands for volume and mute to the TV device (I am using it to control volume, I suspect they could be patched to control the sound card volume somehow).
2b. I patched the command for power to the X10 switch device that controls the power to the speaker amplifiers.
So the "power on" ruby rectangles looks like this:
dest = <X10 switch device ID>;
cmd = Command.new(0,dest ,1,1,192);
cmd.params_ = "98";
Hope that helps in some way
It sure does. I was hoping someone could comment on whether I am approaching the problem in a productive way.