Author Topic: Volume down before power off on IR stereo  (Read 2732 times)

krys

  • Addicted
  • *
  • Posts: 583
    • View Profile
Volume down before power off on IR stereo
« on: February 20, 2009, 05:30:52 pm »
Here is what I have
My core is in a closet and its audio output goes to a IR stereo (also in the same closet controlled via usb-uirt ) the stereos output goes to a distribution block that powers ceiling speakers throughout my house. When I listen to music, I crank it up loud. Now the problem is I just use the off button on my orbiter and it just turns the stereo off at whatever the volume level is, this is fine except for the fact that I have a sleep scenario that plays a sleep sounds CD in our bedroom at night. When you use the sleep scenario it kicks the radio on and its still at Vol 52 and scares the shit out of my wife and I.
So long story short, how can I send the stereo a volume down command as part of the power off command.
Say the max vol of the stereo is 30, Can I have LMCE send

Vol down x 30 (<-- just repeating vol down command 30 times)
Power off

This would ensure that when I power on the volume is always zero, then as part of the "on" command I could have

Power on
vol up x10

and it would start out at a reasonable level,

Dale_K

  • Veteran
  • ***
  • Posts: 149
    • View Profile
Re: Volume down before power off on IR stereo
« Reply #1 on: February 20, 2009, 05:42:40 pm »
Your sleep scenario is based on a timed event.  While working with some playlist timed events I noticed that there is a volume level argument that can be set.  I'd say investigate that.

I'll play around with it on my box and see what I see.

jondecker76

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 763
    • View Profile
Re: Volume down before power off on IR stereo
« Reply #2 on: February 21, 2009, 01:27:23 am »
There are a couple of ways you could do this:

1) Create a GSD device which does the commands you want in the Power commands

2) Use a command group to do what you want, and then call that command group. I'm at work right now so I can't go into specifics, but command groups (scenarios) do have the ability to not be of a specific type (lighting, climate, etc) and therefore be invisible from the UI.
« Last Edit: February 21, 2009, 02:39:18 am by jondecker76 »

jondecker76

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 763
    • View Profile
Re: Volume down before power off on IR stereo
« Reply #3 on: February 21, 2009, 02:23:34 am »
I took a peek at phpmyadmin on my core from work to refresh my memory..  If you want to research using an "invisible" scenario (command group) to do what you need, look at pluto_main:CommandGroup, then look at the FK_Array field. Now look in pluto_main:Array. You will notice that there is an entry with a primary key #25... Misc Scenarios (non visible). Any command group defined with FK_Array=25 will not be shown on the orbiters and can be treated as a command group in a pure sense. Doing it this way, you can execute a single command group which will in turn fire all of the commands defined within it. The command group can be fired with command #370 (Execute_CommandGroup).

Also, while poking around, if you look more at the Array table and the Template table in conjunction with the CommandGroup table, you will see that there are a lot of neat tricks already built into the "Scenario" system

Now -- With that background out of the way...  You can define your own Misc Scenarios in the web admin by going to Advanced->Configuration->Scenarios....  I don't know how many peple have used this feature, but it should work just fine for you
« Last Edit: February 21, 2009, 02:38:02 am by jondecker76 »