haroldunger Posted October 20 Posted October 20 I have several different programs that turn on lights at various hours and at different levels. If I happen to have one of these lights turned on before the program executes, then it will change the light level to that indicated by the program. I've tried writing several programs to disable the program if the light is already on, but I have been unsuccessful. I would appreciate help in creating a program script that would avoid this issue. Thanks. Quote
paulbates Posted October 20 Posted October 20 (edited) Can you post one of the programs? Ideally, you'd add an if clause to see if the light is on . Here's a sample idea If Time is xx:xx AND Status my light is 0% Then Turn on the light Unfortunately it would have to be one light at a time using this method Edited October 20 by paulbates Quote
haroldunger Posted October 20 Author Posted October 20 If I turn off the light during this period, the program will turn it on again. I could try fade up, but there doesn't seem to be a max level and time frame for this option - I don't want 100%. Thanks. Quote
dbwarner5 Posted October 20 Posted October 20 I do something similar for my back deck lights. They are "checked" into correct settings, but if I want them to STAY off, they would come back on as you said. So I set up a trigger program that says IF light is on and is turned off, Then Decklightsstayoff =1. Then in my original program, I add that variable to the IF statement so that it wont run if the variable is 1. Some more needed than above to fine tune things and reset the trigger etc, but hopefully this gives you the path to go on. If you need more, let me know and I can show some programs. Cheers. Quote
haroldunger Posted October 21 Author Posted October 21 Ty! I’ll give it a go and will report back. BTW, ur roadmap is very impressive. 1 Quote
Geddy Posted October 22 Posted October 22 @haroldunger FYI - the preferred method of sharing programs is to right click on the program and select the last menu item of "Copy to Clipboard" then paste as text into your reply (make sure you use COPY and not export). I've removed your doc file and added as image, but to make it easier for those helping you on programs having the text version makes it easy to edit and highlight the changes. The way around having the light adjust if it was already on would be to set a status with "NOT" in the statement. This is one I have for a light that needs to stay on during the night: Backdoor Light - If From Sunset - 1 hour To Sunrise + 2 hours (next day) And 'Backdoor' Status is not On Then Wait 10 seconds Set 'Backdoor' On Use the "Status" rather than "Control". In your situation could simply be "If {node} Status is not Off" then don't run the program. Since your time is specific to Sunset + 30 minutes it will only trigger at that time. Otherwise, can change your time From/To and if the light is turned off during that window then your program would trigger true and run the "Then" portion. I used to run a program that would dim a light as the night went along. It would be shocking if I had the light dimmer than the initial setting (if we were watching a movie and had the lights down <30% it would suddenly run it up to 80% when the time trigger happened). I ended up splitting that program like @dbwarner5 into two programs with a status that it would only then run if the light was higher than the initial brightness. Make sure the other program doesn't have an "IF" and I like to have it disabled. Program 1 would run the "Then" of Program 2. Quote
haroldunger Posted October 22 Author Posted October 22 Okay and thx. I’ll reread ur email many times and try to create a program for a progressively brighter light that doesn’t all of a sudden go to/-100% from 60%, or so. Quote
dbwarner5 Posted October 22 Posted October 22 (edited) Here are the programs that I "waterfall" with. I dont have a time out, but I do have a 1am reset on these. Hope this makes sense.. I have five different settings from the same switch, in sequence. Mbed Doug reading 1 SD - [ID 01C8][Parent 01CF] If 'MBed Reading Doug' is switched On And 'MBed Reading Doug' is not switched Off Then Resource 'Doug's Reading on bright' Enable Program 'Mbed Doug reading 2 LD' Disable Program 'Mbed Doug reading 1 SD' Mbed Doug reading 2 LD - [ID 01C9][Parent 01CF][Not Enabled] If 'MBed Reading Doug' is switched On Then Resource 'Doug's Reading on full bright' Enable Program 'Mbed Doug reading 3 LD' Disable Program 'Mbed Doug reading 2 LD' Mbed Doug reading 3 LD - [ID 01CA][Parent 01CF][Not Enabled] If 'MBed Reading Doug' is switched On Then Resource 'Doug's Reading on Blue Dim' Enable Program 'Mbed Doug reading 4 LD' Disable Program 'Mbed Doug reading 3 LD' Mbed Doug reading 4 LD - [ID 01CB][Parent 01CF][Not Enabled] If 'MBed Reading Doug' is switched On Then Resource 'Doug's Reading on Red dim' Enable Program 'Mbed Doug reading 5 LD' Disable Program 'Mbed Doug reading 4 LD' Mbed Doug reading 5 LD - [ID 01CC][Parent 01CF][Not Enabled] If 'MBed Reading Doug' is switched On Then Resource 'Doug's Reading on green dim' Enable Program 'Mbed Doug reading 1 SD' Disable Program 'Mbed Doug reading 5 LD' This one resets the loop when I turn the switch off. Mbed Doug reading Turned off - [ID 0350][Parent 01CF] If 'MBed Reading Doug' is switched Off Or 'MBed Reading Doug' Status is Off Then Run Program 'Mbed Doug reading off' (Then Path) Set 'MBed Reading Doug' Fast On Mbed Doug reading off - [ID 01C2][Parent 01CF] If - No Conditions - (To add one, press 'Schedule' or 'Condition') Then Wait 1 second Resource 'Doug's Reading Off' Run Program 'Mbed Doug reading reset loop' (Then Path) Mbed Doug reading reset loop - [ID 01CE][Parent 01CF] If Time is 1:00:00AM Then Wait 2 seconds Enable Program 'Mbed Doug reading 1 SD' Disable Program 'Mbed Doug reading 2 LD' Disable Program 'Mbed Doug reading 3 LD' Disable Program 'Mbed Doug reading 5 LD' Disable Program 'Mbed Doug reading 5 LD' Else - No Actions - (To add one, press 'Action') Edited October 22 by dbwarner5 Quote
haroldunger Posted October 22 Author Posted October 22 Big meal to digest here... Please give me a bit of time to understand what you have done. Thank you very much. 1 Quote
dbwarner5 Posted October 22 Posted October 22 Again, this is for a hue spot light in the ceiling. the switch is an Insteon switch. Switch is always on to give power to the hues. Insteon program turns it back on, if turned off, after turning hte hue off. Quote
haroldunger Posted October 25 Author Posted October 25 Sorry for not yet responding... Having been having a major issue with a new PLM that is failing - just replaced it. Will get back to working with the lighting programs shortly. Thx again. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.