sevendustweb Posted April 22, 2013 Share Posted April 22, 2013 Hello:I am learning programming on HE as we speak and have a random question. Unfortunately, I have a feeling I will have several questions along the way, all of which I will post here rather than junk up the forum. Any help would be greatly appreciated. Today, I created a custom lighting scene that would cut on my bathroom lights and bathroom fan. I have the EV Sonos driver installed, and it is linked in with my Sirius XM account. Next, I created a custom button in my Master bedroom called "Shower" and set it to launch my lighting scene when it is selected. First, I am trying to determine how to program the system to play a certain Sonos /Sirius station when I select this custom button. Next, when I select the custom button, the scene launches and then immediately cuts off again. What am I missing that is causing the scene/programming to act this way?Thanks! Link to comment Share on other sites More sharing options...
Godzilla Posted April 22, 2013 Share Posted April 22, 2013 can u post what u have for programming so far Link to comment Share on other sites More sharing options...
sevendustweb Posted April 22, 2013 Author Share Posted April 22, 2013 can u post what u have for programming so farWill do tomorrow Link to comment Share on other sites More sharing options...
sevendustweb Posted April 22, 2013 Author Share Posted April 22, 2013 The code is as follows:When Custom Button HR Shower on Screen Lighting in Master is Pressed, Execute Scene HRShower - ONWhen Custom Button HR Shower on Screen Lighting in Master is Released, Execute Scene HRShower - OFFI figured out the obvious.... when I press the custom button, the scene executed. Immediately when i release the button, the scene stops executing. Correct me if I am wrong, but it seems like I need an If/Then conditional....If Scene HRShowe is ON and Custom Button HR Shower on Screen Lighting in Master is Pressed, Executed Scene HRShower - OFFLet me know what you think. Link to comment Share on other sites More sharing options...
Cyknight Posted April 22, 2013 Share Posted April 22, 2013 Yup you need IFIF [scene is on] execute stopIF [scene is of] execute.Don't forget to bury the commands under each IF properly and add the stop command (or it will still turn off and back on or vise versa) Link to comment Share on other sites More sharing options...
sevendustweb Posted April 22, 2013 Author Share Posted April 22, 2013 When I select the conditionals tab, it says "There are no conditionals for the selected item."My script currently reads: "When Custom Button HRShower on Screen Lighting in Master is pressed" Link to comment Share on other sites More sharing options...
CFUG Posted April 22, 2013 Share Posted April 22, 2013 ^You would not use the "conditional" function. Just do what #5 says and place it in the script for the custom button in question. Link to comment Share on other sites More sharing options...
sevendustweb Posted April 22, 2013 Author Share Posted April 22, 2013 ^You would not use the "conditional" function. Just do what #5 says and place it in the script for the custom button in question.I am not sure what you mean. I will admit, I am very new to this. Trust me, one time around the block, and I assure you, I will get it down pat. How do I place an if/then in the script if I am not using a conditional? Link to comment Share on other sites More sharing options...
sevendustweb Posted April 22, 2013 Author Share Posted April 22, 2013 Do I need to create variables in the Agent tab? Link to comment Share on other sites More sharing options...
CFUG Posted April 22, 2013 Share Posted April 22, 2013 Follow Post#5 exactly. Indent execute and stop commands. It will work. Link to comment Share on other sites More sharing options...
CFUG Posted April 22, 2013 Share Posted April 22, 2013 You could toggle a VAR (with the Custom Button) and program under the VAR for both ON and OFF situations. I personally do it this way to keep housekeeping manageable. Link to comment Share on other sites More sharing options...
sevendustweb Posted April 22, 2013 Author Share Posted April 22, 2013 Follow Post#5 exactly. Indent execute and stop commands. It will work.You make it seem like I am working in Wordpad or Notepad. This is what I currently see:http://s23.postimg.org/7mtd42lp7/HRShower_Example_1.jpgI don't know where to access the If/Then commands to even add them to my code. I have to start there first. Link to comment Share on other sites More sharing options...
sevendustweb Posted April 23, 2013 Author Share Posted April 23, 2013 I hope I am getting closer:http://s23.postimg.org/umf0nt5kb/HRShower_Example_2.jpg Link to comment Share on other sites More sharing options...
Godzilla Posted April 23, 2013 Share Posted April 23, 2013 create a boolean variable "Harry's Shower"create a lighting scene "Harry's Shower"......u have the scene alreadythen in programming:on the programming side goto your variable "Harry's Shower" on the action side goto your variable "Harry's Shower"........put in (2) if statements............(1) for true and (1) for false......under conditionalson the action side goto your lighting scene "Harry's Shower"select Harry's Shower-On ......nest under the true if statementselect Harry's Shower-Off for ..nest under the false if statementthen back over to the programming side select your custom button.....pressedthen back to the action side select your "Harry's Shower" variable.........select the toggle action Link to comment Share on other sites More sharing options...
Godzilla Posted April 23, 2013 Share Posted April 23, 2013 make sure you sync all scenes on the lighting scene tab....under agents, when you create new ltg scenes Link to comment Share on other sites More sharing options...
Cyknight Posted April 23, 2013 Share Posted April 23, 2013 Uhm looking at that programming, why not just create a SEPARATE custom button for "off"? You seem to have at least 3 slots left..... Link to comment Share on other sites More sharing options...
Godzilla Posted April 23, 2013 Share Posted April 23, 2013 now he has options, or at the very least learned how to toggle a lighting scene...pre-advanced scene togglewhich is great for keypads, using 1 buttonbut hear ya!! Link to comment Share on other sites More sharing options...
Cyknight Posted April 23, 2013 Share Posted April 23, 2013 now he has options, or at the very least learned how to toggle a lighting scene...pre-advanced scene togglewhich is great for keypads, using 1 buttonbut hear ya!!Why would you not use Advanced Lighting Scenes on a keypad button? The whole point of them is that they can track the state of the scene and create an actual toggle binding complete with LED tracking..... Link to comment Share on other sites More sharing options...
sevendustweb Posted April 23, 2013 Author Share Posted April 23, 2013 now he has options' date=' or at the very least learned how to toggle a lighting scene...pre-advanced scene togglewhich is great for keypads, using 1 buttonbut hear ya!![/quote']Why would you not use Advanced Lighting Scenes on a keypad button? The whole point of them is that they can track the state of the scene and create an actual toggle binding complete with LED tracking.....If I use Advanced Lighting Scenes, can I also program the scene to work with Sonos? Again, it's not just the lighting... I want my music, etc. running as well.Thanks for all the help, and sorry for being a tootle noobie on this.... I have to start somewhere, and you have all been extremely helpful. Link to comment Share on other sites More sharing options...
Cyknight Posted April 23, 2013 Share Posted April 23, 2013 We all had to start somewhere.And yes, you would just start the lighting scene (advanced or otherwise) AND do whatever else you wanted off of that button.My previous comment is more geared towards keypad buttons, not touchscreen custom buttons. Link to comment Share on other sites More sharing options...
Godzilla Posted April 23, 2013 Share Posted April 23, 2013 now he has options' date=' or at the very least learned how to toggle a lighting scene...pre-advanced scene togglewhich is great for keypads, using 1 buttonbut hear ya!![/quote']Why would you not use Advanced Lighting Scenes on a keypad button? The whole point of them is that they can track the state of the scene and create an actual toggle binding complete with LED tracking.....Wasnt sure what version he was on, that's why it says "pre-advanced scene toggle" Link to comment Share on other sites More sharing options...
sevendustweb Posted April 23, 2013 Author Share Posted April 23, 2013 I am on 2.4. If it is better to use an Advanced Lighting Scene, let me know. I want to make sure, however, that I can program other things (sonos) with an advanced lighting scene. Godzilla: when building the if/then statements you mentioned, should I put a stop after the first if/then as suggested earlier?It seems there could be a lot of bolleans in a project if you do a lot of programming. Link to comment Share on other sites More sharing options...
Godzilla Posted April 23, 2013 Share Posted April 23, 2013 you dont need the stop in the above example.advanced ltg scenes are easier, for the 1 button toggle, because it creates 1 for you, so you dont have to program the above example, just becareful in creating scenes (on what makes them active or inactive)....can be confusing for somethe older ltg scenes still work just fine....so either way you should be good Link to comment Share on other sites More sharing options...
sevendustweb Posted April 23, 2013 Author Share Posted April 23, 2013 I understand that if I go to Lighting --> Scenes, the button is already created and, when I press it, the lighting scene executes.What I have done, however, is created a custom button on the home page of my master bedroom touchscreen called "Lighting" where I have the most used scenes in one list. This way, I don't ever need to leave the main home screen. If I use an advanced lighting scene, the scene executes. However, I want to be able to integrate my Sonos (with my EV Sonos driver) into the programming so that the lighting scene executes and the Sonos automatically tunes to a certain channel in the master bathroom. Is this possible with an advanced lighting scene, or do I need to set it up via a custom button?Thanks! Link to comment Share on other sites More sharing options...
Cyknight Posted April 23, 2013 Share Posted April 23, 2013 You can do it two ways, either add the music option under the same custom button OR have the lighting scene itself execute the music - the latter means that however you trigger the lighting scene - the music starts playing.This can be done using either normal or advanced.Biggest difference (other than the advanced features that is) is that a light can be in less advanced lighting scenes than it can be in "normal" lighting scenes, something to keep in mind.16 Advanced (including any "toggle" you create for that lighting scene) vs 32 is I THINK the number per light. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.