Jump to content
C4 Forums | Control4
  • 0

Using physical buttons on a keypad to trigger a custom button...


RandyR

Question

I have 2 custom buttons.  One activates a media scene consisting of a set of 4 speakers in different rooms and the other turns off the speakers in the scene (actually sets the volume to 0).

What I want to do is have a single button on a 5 button keypad dimmer turn the speakers on and off by toggling programatically between the 2 custom buttons from above.  When the speakers are on, I want the led on the physical keypad button to be blue, and when the speakers are off, the LED on the keypad dimmer is off.

I don't have access to "connections" as I'm running HE.  Can I do this with programming?  If so, what is the best approach and how do  I control the on/off and color of the LED on the physical button?  I can keep track of whether the speakers are on or off with a boolean variable if that is the correct approach, but I'm thinking there must be a more elegant way to accomplish what I'm trying to do?

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

Sure:

WHEN button is pressed
IF media scene is active
	Press custom button (deactivate scene)
	set button LED to colour xx
IF media scene is inactive
	Press custom button (activate scene)
	set button LED to colour yy

That said, if you have custom buttons you're triggering, I would place the the colour settings under the action of the media scene becoming active/inactive - that way the LED colour changes no matter HOW the scene gets activate or deactivated (physical button, custom button, 'manual')

 

Link to comment
Share on other sites


  • 0

Thanks Cyknight!  I couple of followups, if you don't mind:

1.  I think I need a STOP or ELSE between the conditionals otherwise I'll be turning the speakers on and then right back off, no?

2. Is this the command I use to set the LED: "Set Button 1 LED on the ROOM->SWITCH to BLUE when on?" Is the "when on" the proper condition for pressing the custom button for speakers on, and then I set it no color when off when pressing again pushes the speaker off custom button?

3. Do you know if I activate a media scene (which sets the speakers in the scene to preset levels), then I adjust the source volume (which changes the levels of the speakers), will the scene still read as active even though the levels don't match the initial presets?  If not, I think I may need to track whether the scene is active or not with a boolean.  Thoughts?

4. I would like the up and down arrows on the bottom of the keypad dimmer to adjust the source volume - how do I do that?

Link to comment
Share on other sites

  • 0

Oh...if a button is linked to a lighting scene using the connections tab and the scene is deleted, is the connection/link automatically eliminated and the button becomes an orphan and available for programming.  The button I want to use has been programmed by my dealer to do something else and I want to de-link it for this purpose.

Link to comment
Share on other sites

  • 0
14 hours ago, RandyR said:

Thanks Cyknight!  I couple of followups, if you don't mind:

1.  I think I need a STOP or ELSE between the conditionals otherwise I'll be turning the speakers on and then right back off, no?

2. Is this the command I use to set the LED: "Set Button 1 LED on the ROOM->SWITCH to BLUE when on?" Is the "when on" the proper condition for pressing the custom button for speakers on, and then I set it no color when off when pressing again pushes the speaker off custom button?

3. Do you know if I activate a media scene (which sets the speakers in the scene to preset levels), then I adjust the source volume (which changes the levels of the speakers), will the scene still read as active even though the levels don't match the initial presets?  If not, I think I may need to track whether the scene is active or not with a boolean.  Thoughts?

4. I would like the up and down arrows on the bottom of the keypad dimmer to adjust the source volume - how do I do that?

1 - sorry yes, either add stop at the end of the first IF or use ELSE.

2 - Assuming there is no binding you would use CURRENT LED colour

3 - not sure what you mean by source volume? To me source volume is like controlling the volume on your phone using airplay or bluetooth....

4 - Preferably a binding, though programming does work well:

WHEN button up is pressed
START Volume up command to room

WHEN button is released
STOP volume up command to room

I'm assuming your media scene has linked volume.

14 hours ago, RandyR said:

Oh...if a button is linked to a lighting scene using the connections tab and the scene is deleted, is the connection/link automatically eliminated and the button becomes an orphan and available for programming.  The button I want to use has been programmed by my dealer to do something else and I want to de-link it for this purpose.

Better way, assuming you have configurable keypads, BUT BE CAREFUL!!!! read the below in full!

under the main screen (monitoring i think it was in HE), select the light in HE and then the properties tab and you should see the option to reconfigure the button layout - press that and redo an identical layout - MAKE SURE to assign any buttons you want to keep!!!!, and don't 'connect' the old button you want to clear.

Link to comment
Share on other sites

  • 0

5. I'm sorry.  I'm not sure what "linked volume" is?  I have several media scenes, all of which have a common room (the IT room). The IT room has no speakers but the other rooms in the scenes do.  I start a source in the IT room (say TuneIn) and then activate the various media scenes (Pool Area, Kitchen Area, Lower Level, etc.) that I want to play that source "based on the IT room" in order to have those speakers play the IT room source music at preset relative volumes.  I then deactivate the scenes, so that the speakers can be adjusted independently or muted individually if necessary (which I don't really do).

In order to adjust the "master volume," I adjust the slider at the top of the attached screenshot for the IT room source.

I'm not sure exactly what you mean by "linked volume"?  I want to adjust the same volume control with the up down arrows on the keypad dimmer don't I?

6.   Also can you clarify for me please what I do to implement your "better way" suggestion above re reconfiguring the keypad dimmer?

7.  On a related note, what room variable in the IT room will tell me rather a source there is currently playing music?  In other words, rather  media session has been started?

Thank you!

 

Screenshot_20220423-074142_Control4.jpg

Link to comment
Share on other sites

  • 0

Note: I don't want to raise the speaker/room volume in the IT room - I want to raise the source slider as in the screenshot with the arrows on the keypad.  Similarly, I want to know if a source is currently playing in that room.

Link to comment
Share on other sites

  • 0

Ok. I figured out which system variable controls the source volume and I think I know how to raise (or lower) its value by a fixed increment each time the up (down) arrow is pressed by moving the volume and watching for changes in a value in the variables in the IT room in the variables agent.

My other questions are still open however.

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
Answer this question...

×   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.