NYG140 Posted February 28, 2017 Share Posted February 28, 2017 I'm trying to put an advanced function on my keypad leading to the deck. Deck is an audio zone hung off zone 2 of my living room receiver. Right now, I have a single keypad button as a toggle. Push it and the zone turns on to the cable input. Push it again and the zone turns off. Works great, programming is attached. What I'd like to do is when this button is pushed and they system turns on, the zone source will be set to what the living room source is. I tried nesting an if statement underneath the second half of the logic attached, looking at the variable CURRENT_SELECTED_DEVICE but that doesn't seem to do anything. How do you guys usually do this? How do you program a second zone follow a first zone for source selection? Alternatively, can anybody offer how to program pushing the button repeatedly to change sources? OFF -> FIOS -> SIRIUS -> Digital Media -> OFF Link to comment Share on other sites More sharing options...
knowitall Posted February 28, 2017 Share Posted February 28, 2017 Number variable. https://www.control4.com/documentation/Composer_HE_User_Guide/Using_a_Custom_Variable_Agent_Number.htm Link to comment Share on other sites More sharing options...
NYG140 Posted February 28, 2017 Author Share Posted February 28, 2017 Ok, I get that, use the number values for each action and increment them based on button presses. I think I may do it that way and link different colors to different sources. Is there any "smarter" way to do it, so I don't as a user have to memorize the corresponding number presses to a source? Can I program it to follow the source of a different zone? Like when I hit Deck button, it looks at what source is enabled in the LR and sets the Deck to that source? Link to comment Share on other sites More sharing options...
sonic30101 Posted February 28, 2017 Share Posted February 28, 2017 When the button is pressed you can use a conditional for each source the LR has and set the Deck to it. Link to comment Share on other sites More sharing options...
NYG140 Posted February 28, 2017 Author Share Posted February 28, 2017 Awesome! That's exactly what I was looking for! I like the simplicity of this being built in rather than having to use variables. Thanks! Follow up - Will I have any problem nesting conditionals? My programming flow would be: IF ON Turn Off IF OFF IF LR is CABLE Turn ON Deck Cable IF LR is RADIO Turn ON Deck Radio Just asking if it's ok to use nested conditionals. Link to comment Share on other sites More sharing options...
sonic30101 Posted February 28, 2017 Share Posted February 28, 2017 nesting the conditionals shouldnt give you any problems, they are designed to be used that way Link to comment Share on other sites More sharing options...
NYG140 Posted February 28, 2017 Author Share Posted February 28, 2017 Sounds good, thanks! Link to comment Share on other sites More sharing options...
NYG140 Posted March 1, 2017 Author Share Posted March 1, 2017 Quick Update: I implemented this programming and it works great. Thanks! Link to comment Share on other sites More sharing options...
knowitall Posted March 1, 2017 Share Posted March 1, 2017 Got an extra line of code in there for select Verizon other than that nice work! Link to comment Share on other sites More sharing options...
knowitall Posted March 1, 2017 Share Posted March 1, 2017 Nope never mind I see what you go going on. Link to comment Share on other sites More sharing options...
sonic30101 Posted March 1, 2017 Share Posted March 1, 2017 Dont think all the stops are needed Link to comment Share on other sites More sharing options...
NYG140 Posted March 1, 2017 Author Share Posted March 1, 2017 Yea I threw in FiOS at the end just in case it didn't find the source that was playing, just a fallback source. I thought the stops were necessary because if not it would just keep evaluating the conditional? Link to comment Share on other sites More sharing options...
knowitall Posted March 1, 2017 Share Posted March 1, 2017 Stops are always good imo. Also good to have that in there if a DVD is playing or something Link to comment Share on other sites More sharing options...
knowitall Posted March 1, 2017 Share Posted March 1, 2017 Derrr Apple TV if the the living room was on but not on one of those 3 sources. O thing would happen Link to comment Share on other sites More sharing options...
sonic30101 Posted March 1, 2017 Share Posted March 1, 2017 23 minutes ago, knowitall said: Derrr Apple TV if the the living room was on but not on one of those 3 sources. O thing would happen The way he did it, it would default to FiOS if the room was on but not on the conditional devices. Took me a sec, but the way he did it requires the stops, granted it does it in 20 lines and it can be done in 13 or so but as long as it works its all good Link to comment Share on other sites More sharing options...
VINCELdUB Posted March 2, 2017 Share Posted March 2, 2017 There is one other cleaner way to do this. With only 8 lines or so. This will also allow for additional or less available sources over time. Happy Automating! Link to comment Share on other sites More sharing options...
NYG140 Posted March 2, 2017 Author Share Posted March 2, 2017 That's interesting, I will give this a try when I have a minute. Thanks! Link to comment Share on other sites More sharing options...
VINCELdUB Posted March 2, 2017 Share Posted March 2, 2017 You are welcome. I use this daily for keeping zones and areas in sync. Happy Automating! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.