Jump to content
C4 Forums | Control4

Sending Different Commands Based on AV Device that is currently playing


eggzlot

Recommended Posts

I am 95% done with some code using the IFTTT Driver and my home Ooma phone.  I've tested 1-2 rooms on the basics and it works.  Basically when a call comes into the house:

1) if music is on, I want to mute it
2) if the TV is on, I want to pause it

May just be easier to pause vs mute for audio and pause for TV, but I do not have any keypad programming in rooms to unpause audio, where all of my audio keypad buttons I have an unmute button.  Though I guess if need be I could always change that?

For audio I just want to send a simple mute command but two things:

a) mute on doesnt seem to work but mute toggle is working - there is a 1 in 1,000 time that my audio will be muted for another reason, so I guess an incoming call may trigger the audio but I guess that is one small drawback.  Any input there?
b) So far I can only see how to do it by source, ie Pandora, Tidal, SiriusXM, etc.  Any way to do it globally just if any music is playing regardless of the source?  I do not want to tie into room on because some rooms have audio and video and for those rooms I want to have 2 nested conditions - if TV Power is On, send Pause.  If Music is on, send mute.  but so far I can only seem to figure out the audio by each source, and I have a lot in my house (streaming services, DLNA, etc).

Thoughts?  Move the keypad programming to pause/unpause vs mute/unmute and then just do if room is on send a pause command?  I want an easy way to resume the media session and we are big users of keypads so I want to be able to resume after a call easily with a keypad (I know a phone app or voice control is possible but that is not our usual usage)

Screen Shot 2020-06-27 at 5.36.10 PM.png

Link to comment
Share on other sites


Another way of doing mute could be to set current volume to 0.  This would deal with your 1 in a 1000 situation but if you want volume to return to the level it was afterwards (rather than ramp up from 0) then you would need to store current volume in a temporary variable before setting it to zero and do some programming to handle returning the volume to this temporary variable...

Link to comment
Share on other sites

38 minutes ago, South Africa C4 user said:

Could you not simply use an “else” on the if TV is on and under the else nest the mute command.

In other words, if room power is on and TV is off means that music is playing (I think).

Hmm this may work.  I’ll get in this tomorrow.  I haven’t used else before so I can see if that will work.  

Link to comment
Share on other sites

 

You might also want to take a look at Control4’s Room Control driver and its events (e.g. Entered Listen Mode, Entered Watch Mode etc.) and variables (to create conditionals to test whether you are in the Watch mode or Listen mode). It’s usually pretty useful for this kind of programming.

Link to comment
Share on other sites

9 hours ago, lukas.polivka said:

 

You might also want to take a look at Control4’s Room Control driver and its events (e.g. Entered Listen Mode, Entered Watch Mode etc.) and variables (to create conditionals to test whether you are in the Watch mode or Listen mode). It’s usually pretty useful for this kind of programming.

 

thanks that worked.  I have the RC driver but forgot about its conditionals

attached programming now works perfectly (at least in my office where I tested it with both music and TV)

Screen Shot 2020-06-28 at 10.58.11 AM.png

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.