Sugar Posted November 21, 2015 Share Posted November 21, 2015 I've been trying to program a keypad LED so that it turns on when Digital Media is playing, and turns off, when Digital Media stops. I tried PLAYING_AUDIO_DEVICE, but no luck. Also, what is the difference between "room off" and "in session"? Link to comment Share on other sites More sharing options...
South Africa C4 user Posted November 21, 2015 Share Posted November 21, 2015 I do this in the "audio selection changed" event for the room in question. My code under this event is essentially, use the on colour for the LED, followed by, if the room's power is off, use the off colour for the LED.I also turn the LED off (use the off colour) when the room goes off (power off event for the room), although I suspect that is overkill.Both events can be found when selecting the room itself in programming. Link to comment Share on other sites More sharing options...
Sugar Posted November 21, 2015 Author Share Posted November 21, 2015 "AUDIO SELECTION CHANGED" is not triggered when I just stop/pause or play audio (TuneIn).I'm not changing an audio device, I just want to display the state of a currently-playing or paused device.Is there anything else I'm missing. Link to comment Share on other sites More sharing options...
South Africa C4 user Posted November 22, 2015 Share Posted November 22, 2015 You can try using the rooms 'stop', play' and 'pause' commands to trigger LED behaviour. However, as these are not always unique functions (e.g. Play and pause often both toggle between play and pause modes) you may want to include some conditionals...There may be a better way of doing this but this is the method I've always used. Link to comment Share on other sites More sharing options...
Matt Lowe Posted November 22, 2015 Share Posted November 22, 2015 LED programming based on music being paused or playing will be pretty interesting. If you are using sonos their are device variables for if the device is playing or paused. no good ideas on control4. Link to comment Share on other sites More sharing options...
Sugar Posted November 22, 2015 Author Share Posted November 22, 2015 I'm just using TuneIn from the main controller (HC800).IMO it's better to program based on the actual "state" changes rather than "buttons" being pressed.You can control your media in so many ways (by pressing a button on a remote, pressing a button on a touchscreen, or by programming), but the resulting state change is allays the same, so using it as a trigger is much more reliable. Link to comment Share on other sites More sharing options...
Matt Lowe Posted November 22, 2015 Share Posted November 22, 2015 if this is feeding a matrix you might be able to use the audio sensing feature. but with out additional hardware I can not find any related variables. Honestly i would probably program the LED to change colors on room on/off and then if the ROOM pause key is hit or the ROOM play button is hit. If you program all of your interfaces and use the ROOM pause/play commands you should be able to get a fairly accurate read. Link to comment Share on other sites More sharing options...
Sugar Posted November 22, 2015 Author Share Posted November 22, 2015 Yes, it feeds the matrix. An excellent idea! Thank you. Link to comment Share on other sites More sharing options...
Sugar Posted November 22, 2015 Author Share Posted November 22, 2015 no luck... pausing or playing TuneIn radio doesn't seem to affect "Stops Sensing Audio" on the C4 Matrix Amp. Link to comment Share on other sites More sharing options...
South Africa C4 user Posted November 23, 2015 Share Posted November 23, 2015 I have it working without having ever noticed a problem.My coding (on play, pause, stop, up button and down button) looks at which device is playing and got some (those where play and pause does the same - e.g. Apple TV) it essentially toggles the LED; for sources with a unique play button (etc.) I set the LED to 'on' not an effective toggle on play etc.If things go wrong, it will all sort itself out on room-off. While I have fairly messy code for all of this, I have never seen it fail!Good luck Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.