Jump to content
C4 Forums | Control4

Audio on = Video off


Taylor

Recommended Posts

I'm looking for some kind of code that will allow the C4 to "know" to turn off my display if I select an audio source. For example, I would like to have the display turned off when XM Radio is the selected audio source.

Is there a way to do this?

Something like:

If current audio is XM Radio (or didgital music or DVD/CD player)

Then turn off display

If current selected source is video

Then turn on display

any ideas?

Link to comment
Share on other sites


Let's see.

First you have to find out the ID that the system has assigned to XM Radio (tech support did not tell me how the ID's are assigned but suffice to say it's not consistent across projects), it may even change if you delete and add items in the existing project you're programming. I'm thinking it has to do with the order in which you add the devices but I haven't tested that.

Once you have determined the ID-see below to do so, then you can use that ID as your trigger to send the TV->off IR code.

To determine the ID for a source:

Big picture:

Create a container to "contain" the current audio device for a room and create a variable to "map" that value from the container.

Create a new variable of type number. Let's call it XMSourceID.

Create a new container of type number. Let's call it XMSource.

Once you've created the container you can click on it under the left hand variables subsection of the agents window. Once it's highlighted you should see two columns in the main (variables) window of Composer. In the right hand column, find CURRENT_AUDIO_DEVICE from any room in the project (pick the room where you'll use to test the change) and click on it, then click the << button to add that item to the left hand column. Now also in the right hand column, find the variable you just created XMSourceID and also drag it to the left hand column.

Now if I remember correctly you should then go to that room with your remote and choose XM Radio. Once you do, you can come back to the variables section of composer and click on XMSourceID and it should have a value in it other than 0. That is your XMRadio SourceID for that project.

Link to comment
Share on other sites

Thanks Corbin thats good to know... I guess a good thing to put on the wishlist is a reference ID number for a source component...

I had this issue the other day where I wanted to use room variables but had no idea what the source id was...

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...