Jump to content
C4 Forums | Control4
  • 0

Programming the "Control4" button


RussellB

Question

Hi all,

This is one of those "Da misses hates Control4 because it's too complicated issues".  My wife wants to hit ONE button to turn on the cable TV in the kitchen.  I setup the 'green' command button on the SR-250 to set the video source to the cable tv, but her comment was "Can't I just hit the big red '4' button?"  So I tried to do an if/else program on the button such that if the room is off when it's pressed it sets the cable tv, and if the room is on it brings up the navigator:

When command 'CONTROL4' is received

If the Kitchen TV Room Room is off
  Select the Optimum as the video source in Kitchen TV Room
Else
  Send command 'CONTROL4' to the Kitchen TV Room

The else case works but when the room is off and I hit the 4 button it always brings up the navigator.

If I just put "Select the Optimum as the video source in Kitchen TV Room" and hit '4' it brings up the cable tv, but then of course I lose the navigator when the tv is on.

It's almost like the room being off is not.

Any ideas?

RussellB

Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • 0
3 hours ago, msgreenf said:

You can't over ride the navigator on the c4 button. 

I'm an AmeriCAN, not an AmeriCAN'T:)

So I realized that the problem might be that after initially hitting the c4 button in an off room that the room was turned on so it never hit that if statement condition as the room was already on, so I did this:

1) Add a variable "IS_KITCHEN_TV_NAVIGATION" default to FALSE

2) Add this program to the 'When command 'CONTROL4' is received in Kitchen TV Room
  If Variables->IS_KITCHEN_TV_NAVIGATION is False
    Select the Cable TV as the video source in the Kitchen TV Room
    Variables->IS_KITCHEN_TV_NAVIGATION = True
  Else
    Send command 'CONTROL4' to Kitchen TV Room

3) Add this program to 'When the room turns off' in Kitchen TV Room
  Variables->IS_KITCHEN_TV_NAVIGATION = False

So now when the room is off and I hit the c4 button, it starts up as controlling the Cable TV box.  Subsequent presses bring up the on-screen navigator as expected.

EDIT: Had to add setting the navigator variable to true when 'Video Selection' changes to catch if the 'Watch' button is pressed to have the navigator work after that.


An early Valentine's gift for my wife!

And I'm going to copy this to the other rooms where I have remotes.  Thanks for the inspiration!


RussellB
 

Link to comment
Share on other sites

  • 0

Lots of ways to do this.  Both of the above work, or in your original programming, instead of using “if Room is Off”, use a new variable DelayedRoomState and program against I’d DelayedRoomState is off.

Then set the DelayedRoomState to change 5 seconds after the Room turns off / on (preferably using a timer but a delay should also work. 

Moral of the story is that there a ways to do most things in programming if you put time in thinking about them.

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.