Jump to content

Programming Question - keep lights on


gadgetfreak

Recommended Posts

Posted

I would like to set up a programs to activate a scene (such as all bathrooms lights on to 50% at night) and keep them on throughout the entire night. But I would like those lights to remain on even if someone accidentally turns any one of them off (via a light switch). So, if someone presses the paddle off on the switch, the light will immediately turn back on to it's 50% state.

 

Does anyone have any good suggestions on how to accomplish this? Thanks in advance.

Posted

That's pretty simple:

 


  • Create a scene with all the devices at 50%
    Create a trigger program:

Persistent 50


If
       Control 'Your Trigger Device.1' is switched On
   And Control 'Your Trigger Device.1' is not switched Off
   And From    Sunset 
       To      Sunrise (next day)

Then
       Set Scene 'Persistent 50' On

Else
       Set Scene 'Persistent 50' Off


  • Create a second program to fix any inadvertent OFFs:

Fix Persistent 50


If
       (
            Control 'Switch 1' is switched Off
         Or Control 'Switch 2' is switched Off
       )
   And Program 'Persistent 50' is True

Then
       Run Program 'Persistent 50' (Then Path)

Else
  - No Actions - (To add one, press 'Action')

Posted

Thank you for the quick reply. But I have a follow up question: So my scene (called "Bathroom Lights") would be to include the 3 bathroom light switches at 50% (let's call them light1, light2, and light3).

 

What is the 'Your Trigger Device.1' you mentioned in the Persistent 50 program?

 

Thanks.

Posted
Thank you for the quick reply. But I have a follow up question: So my scene (called "Bathroom Lights") would be to include the 3 bathroom light switches at 50% (let's call them light1, light2, and light3).

 

Exactly

 

What is the 'Your Trigger Device.1' you mentioned in the Persistent 50 program?

 

Thanks.

 

You didn't say how or when you wanted the program to run, so I surmised you wanted to be able to trigger it manually when you had guests. What did you have in mind?

Posted
Oh sorry. I want the lights to remain on from 10PM until sunrise.

 

See if this works for you:

 

Persistent 50


If
       From    10:00:00PM
       To      Sunrise (next day)

Then
       Set Scene 'Persistent 50' On

Else
       Set Scene 'Persistent 50' Off

Posted

And you think i don't need anything else except that one program? What about if someone taps the bottom of a light switch? I ask because my current program is to turn on the Bathroom Lights scene from 10pm until sunrise and an off command at the switch turns it off and keeps it off. Thx.

Posted

Sadly, this doesn't work. I have a scene called 'Bathrooms - All' which includes all my bathroom switches and turns all of them on. I have the first program called 'Bathrooms' which I tested tonight to set the 'Bathrooms - All' scene to on. I made another program called 'Bathrooms - Persist' which says:

 

If Control '.Lights / Bathroom - Master' is switched Off

Or Control '.Lights / Bathroom - Powder' is switched Off

etc.

 

Then

Set Scene 'Bathrooms - All' On

 

That didn't work and neither did it work when I changed the "Then" to say:

 

Then

Run Program 'Bathrooms' (Then Path)

 

What am I missing?

Posted

If you click on the Main tab, select the scene Bathrooms - All and click On, do all the lights turn on to 50%?

 

If so, then there's probably a typo in one of the programs. Right-click the first program, Copy to Clipboard, paste to a reply, then repeat for the second program.

Posted

Yes. I can run the scene properly. I will make this even easier. I simplified everything and the following program called 'Bathrooms - Persist' still doesn't work:

 

If

Control '.Lights / Bathroom - Powder' is switched Off

 

Then

Set Scene 'Bathrooms - All' On

 

Else

- No Actions - (To add one, press 'Action')

 

Does that help? Thx.

Posted

Are you tapping the Off side of the '.Lights / Bathroom - Powder' paddle or holding it? Do you have any other programs triggered by '.Lights / Bathroom - Powder'? If you run a scene test on that scene, do all member devices pass?

Posted

I am just tapping the down paddle to turn the light off - not holding it down.

 

The scene responds fine in a different program but I have no programs triggered by the switch - the switch is just a responder not a controller. Does that make a difference?

 

Also, when I just manually turned on the scene in the console, one of my Den lights just turned on and off. There should be no reason that that should happen and I have no idea why or how to troubleshoot. Similarly, the scene test fails on two of the five lights (though the powder room passed) and, again, the lights respond in the scene.

 

Thanks again for all the help.

Posted

Sounds like you've got a couple of problems there.

 

To remove the den light from the scene, first add it to the scene, write the changes to the devices, then delete it from the scene.

 

It also sounds like you've got communications challenges and the message retries are interfering with your program execution. There are other posts in the forum explaining scene tests so I won't go into that here. Add a Wait 10 Seconds command before sending that scene On command to get you going in the meantime.

Posted

I added the den light to the scene and then removed it and that fixed the scene problem.

 

I also ran a scene test and all 5 bathroom lights came back as successful.

 

The light switch in the bathroom is hard-wired to the light. But, again, it is just programmed as a responder (which I think is proper).

 

I tried my program again (which is simply to turn on the scene when off is pressed in the powder room) and it still doesn't work. I added a 10 second wait on the first line of the THEN command and it STILL doesn't work.

 

I am so thankful for all your ideas and would love to hear some more from you. Thanks again.

Posted
I made another program called 'Bathrooms - Persist' which says:

 

If Control '.Lights / Bathroom - Master' is switched Off

Or Control '.Lights / Bathroom - Powder' is switched Off

etc.

 

Then

Set Scene 'Bathrooms - All' On

 

That didn't work...

 

Can you paste your program into a post? If you right-click on the program in the admin console, you will get a context menu that has "Copy to Clipboard." Then paste it between "[ code ]" and "[ /code ]" tags in your post.

 

This may have something to do with operator precedence in your IF statement. Below is a sample program. No WAIT should be necessary -- since the light switches are only responders, there should be no scene cleanup in the process that you need to wait for before restoring the scene lighting levels. Also, there is an inherent one second wait in executing the program.

 

If
       (
       Control '.Lights / Bathroom - Master' is switched Off
    Or Control '.Lights / Bathroom - Powder' is switched Off
       )
   And From    10:00:00PM
       To      Sunrise (next day)
Then
       Set Scene 'Bathrooms - All' On
Else
  - No Actions - (To add one, press 'Action')

 

Adding the parenthesis around the ORed control statements may straighten things out. Let us know.

Posted

If

Control '.Lights / Bathroom - Powder' is switched Off

 

Then

Wait 5 seconds

Set Scene 'Bathrooms - All' On

 

Else

- No Actions - (To add one, press 'Action')

 

 

----------------------

 

How do I add "parenthesis around the ORed control statements"?

 

Thx.

Posted

Well..., that's a pretty basic program. Have you check the program status page to see if the program is even running when you turn off the powder room light? The program status page shows the date/time of the last program run, and the status indicates the outcome of the IF statement: True (THEN branch executed) or False (ELSE branch executed).

 

Also, the "." in front of the name of the device. I am not familiar with this syntax, but perhaps someone else could speak up with regard to whether that may cause problems in programs in the ISY? Do other programs with "." in front of the device name run correctly?

Posted

Sending an off command to the powder room does NOTHING on the program summary page. And the . in front is only because I made a folder with all my lights called ".Lights".

 

So what could possibly be wrong here? This is so unusual.

Posted

Just to be clear, by "Sending an off command to the powder room," you mean mean tapping the switch off, right? Sending an off from the ISY to the device will change its state, but will not trigger the program condition "IF Control '.Lights / Bathroom - Powder' is switched off." Only local control of the switch will trigger the program.

 

If local control doesn't initiate the program, then you may want to delete and re-add the switch. If the switch doesn't have the PLM in its link table (and, I think, vice-versa) then the ISY will not see the switched off event for the switch.

Posted

Well last night I was tapping the switch (actually, I was sending my 10 year old to do it) and it wasn't working. Today, I am in the office and I sent a command through the ISY. I now understand that the latter won't work and I need to wait until I get home to further test.

 

However, how do I check to see if the switch has the PLM in its link table (and, vice-versa)?

 

Thanks.

Posted

A couple of ways:

 

1) Just watch the log. If the switch has at least one table entry, it will broadcast the Off. If the PLM has the entry, it will receive the Off and show it in the log. If I am not mistaken, if the links are missing from either the switch or the PLM, then no entries for the switch will show in the log.

 

2) Right mouse click on the switch in the Admin tool, select "Diagnostics," and then select "Show Device Links" and/or "Show PLM Links" (or something along these lines. This will show the links in the device's link table as well as the links in the PLM link table for the device.

Posted

I assume you mean the event viewer and not the log. No matter what switch I press, nothing shows up in the event viewer. If I activate a light through the admin console, I do see entries show up in the event viewer. Any ideas what is going on? Thx.

Posted

Check the links. If the switch has no links in its link table, then local operations will not be broadcast. If there is at least one link, such as that to the PLM, then every local operation should also be broadcast, followed by clean-up events.

 

Someone check my facts on this.

Guest
This topic is now closed to further replies.

×
×
  • Create New...