Jump to content

Help writing program


Go to solution Solved by Geddy,

Recommended Posts

Posted

I have Eisy 5.5.9 and i need some direction writing a program for my outdoor parking area. The parking area comes on at sunset everyday at 35% and i would like it to have it brighten to 100% when motion is triggered then dim back down to 35% after 5 minutes. Could someone  give me some pointers please? Thanks

 

Posted (edited)

Since you didn't provide a lot of details about your program or the motion sensor here is some general guidance. 

I'm assuming you already have a program that turns on the light to 35% at sunset, I going to call that the "Sunset Program".

Add a 2nd program that does this:

If

   Motion is detected and

   time window for the "sunset program" is true (ex. > sunset and < 11PM)

Then

  Turn lights on to 100%

  Wait 5 Minutes

  Run "Sunset Program" (if path)

Depending on how your if path in the "sunset program" is written, this might not work.  If the condition is "after sunset and before 11PM" for example, it will work. 

Edited by tmorse305
  • Like 1
Posted

Thanks I will try that. I didnt know what information was needed. My sunset program turns all the out door lights on at sunset off at sunrise. I added  the 2nd program like this:

Untitled.jpg.b9439d6fe4c3cb93d1427ef7d935dcee.jpg

is that right?

thank you for the help!

Posted

On Level isn't the value to change.  (what "On level" set is the level that is set when the switch is turned on manually.)

image.png.5bb842583213ad7f9c71a7b70b689586.png

This will change the current dim level.

Posted

Im not clear on what you are saying.  Sunset comes on and the parking area is 35% and when motion is detected I want it to be 100% so how would i write it correctly? How would that look?

Thanks

Posted

Ohhhhh! I think i understand. that what I am changing is not temporary but every time i I turn it on at the switch, right? 

I fixed it toUntitled2.thumb.jpg.2d92d3ad6d7a0a499af1874381544ffc.jpg

Posted

Change that to like this:

 

If
        From    Sunset
        To      11:59:59PM (same day)
 
Then
        Set 'Christmas Tree#' On 35%
 
Else
        Set 'Christmas Tree#' Off

 

I choose 11:59:59 because I'm not certain whether the ISY considers 12:00:00 exactly to be "Same Day" or "Next day".. I'm certain 12:00:01 would be Next Day, it should include 12:00:00 AM as Next Day, but since I didn't test the best advice it to just avoid it and use 11:59:59 because I know that is "Same Day".

  • Like 1
Posted

and those two programs should work fine together, this one and the motion...

 

Also when posting programs it's really better to Right click the program name then Copy to Clipboard and paste into the message, like i did above.   If you do that over screen shots people helping can cut and paste to re-arrange a program, screenshots take more typing to re-create.

Posted

so if i want it to  return to the original 35% do i still need to put the "else" in?

thanks for the copy trick!

 

Parking Pad Light - [ID 000D][Parent 0001]

If
        From    Sunset 
        To      11:45:00PM (same day)
    And 'Outdoor / Parking Pad Sensor.1 Motion' is switched On
 
Then
        Set 'Outdoor / Parking Pad' On 100%
        Wait  5 minutes 
        Run Program 'Sunset' (Then Path)
 
Else
   - No Actions - (To add one, press 'Action')
 

Posted
1 hour ago, n8ur9irl said:

do i still need to put the "else" in

The "else" that @MrBill was suggesting was for your Sunset program. 

You have a "Sunset" and a "Sunrise" program showing in your screenshot. I think he's assuming that your "Sunrise" program might be turning the outside lights off. You can use his suggestion to only have 1 program.

For instance I have this for my front door light:

Front Light - Night - [Run At Startup]

If
        From    Sunset  -  1 hour
        To      Sunrise +  1 hour (next day)
 
Then
        Set 'Front' On
 
Else
        Set 'Front' Off

This does both the turning on, and turning off. Be sure that it's triggered to run at startup incase you have a power outage that happens before your time and returns after your time it will turn on the outside lights.

As you have it now your parking pad light will only trigger from Sunset to 11:45pm. You would set it back to the 35%, but you need to edit the sunset program to turn the lights on to 35%. Right now your program just has them coming "ON" at Sunset. Their on% is either handled by another program or scene or device setting.

It's unclear how you're turning those on at 35%. What is "Outdoor Lights On"? Probably a scene?

 

Final comment...wouldn't you want the outside lights to go to 100% if there is motion all night long? It would potentially pause anybody approaching your house with the change in brightness. And if you have outdoor cameras might help with the details of the motion overnight. 

 

Posted

You need the else in the Sunset program to turn the light off.  I assumed that you meant you wanted the light to turn off at midnight, or a little before. 

  • Like 1
Posted

Yes i do want the motion switch to activate all night. We are in the country with bears. 😗

Thank you Geddy for the program advice I changed some other multiple folders to 1 on/off. One thing I am having a problem with the outdoor lights is that the 100% is activating in the daytime also. I have the scheduled times in "If" and I also changed the motion sensor to day only. See anything that would cause that

Parking Pad Light - [ID 000D][Parent 0001]

If
        From    Sunset 
        To      11:45:00PM (same day)
    And 'Outdoor / Parking Pad Sensor.1 Motion' is switched On
 
Then
        Set 'Outdoor / Parking Pad' On 100%
        Wait  5 minutes 
        Run Program 'Outdoor Lights' (Then Path)
 
Else
   - No Actions - (To add one, press 'Action')
 

  • Solution
Posted
15 hours ago, n8ur9irl said:

See anything that would cause that

If the program you posted is the only one triggering based on motion then it shouldn't be doing it during the day, but now you've said you've adjusted the motion sensor to only trigger at night. Did that help? What kind of motion sensor are you using?

It sounds like there might be another program triggering the light. You can use the "Find/Replace" feature in the program tree. Click on the root folder (probably "My Programs"). Right click to get a menu. Select "Find/Replace". You'll get the window to search for finding "Your Devices". Select the "Parking Pad..." and then only hit "Find" (note, you don't want to replace so be sure you only click "FIND"

image.png

image.png

 

15 hours ago, n8ur9irl said:

Yes i do want the motion switch to activate all night.

If you want it to run all night then you should remove the "11:45pm (Same Day)" from the program and make it something like "Sunrise (Next Day)". The example @MrBill gave above was from his own system and it was for a light he wants to turn off before midnight. The example I gave above turns my lights on and off around the sunset/sunrise time. You would want something similar to allow the motion to trigger during the middle of the night.

 

What you posted in a screen shot above could be your issue. Unless you modified THAT program. The way you had it in the screen shot was that anytime there was motion they light would come on. You also ran the "THEN" of the Sunset path meaning whatever that program does happened following the program you posted. 

When you call on a "THEN" there's no evaluation of that program and it just runs "THEN". So even though the sunset program probably has a time to happen you're avoiding that schedule when you run "THEN" of that program. 

 

Since you've been modifying several programs please post all CURRENT programs that trigger the light (Sunset, Sunrise (if still 2 programs), and motion trigger). This way we can accurately review what is currently being used.

 

 

 

 

  • Like 1
Posted
11 minutes ago, Geddy said:

The example @MrBill gave above was from his own system and it was for a light he wants to turn off before midnight.

No actually it was because @n8ur9irl said she wanted it to stop at 12:00

On 5/20/2023 at 1:27 PM, n8ur9irl said:

Thank you I also added that i want it between the hours Sunset and 12:00

The important thing to understand is that the two programs are designed to interact with each other.  The reason they are designed to interact with each other is so that a Motion event at the end of the window will end with the light off.   For that reason it's a Must that the SUNSET Program also include the off time, and that not be two separate programs.  But are these programs even for the same light?   Looking back it looks like we are dealing with 'Outdoor lights' and "parking pad'.

So I'm going to use a GENERIC device "Light" in this example to illustrate how it works:

Program Light

If
       From Sunset
           To Sunrise (next day)
Then
       Set 'Light' on 35%
Else
       Set 'Light' Off

this program will make 'light' be 35% from Sunset to Sunrise.

Now we add a second related program:

Program Motion

If
            Motion_Detected is switched on
   AND  From Sunset
                to    Sunrise (next day)
then
         Set 'light' on 100%
          Wait 15 min
          Run Program Light (if)

This program, on motion during the same time period will turn the light up to 100%, wait 15 minutes, then run the Original program to turn the light back down. 

Why do we run the original program, instead of just going back to 35%?  Because if the motion occurred 5 minutes before Sunrise, the light would first get bright for motion, the light would first turn off at Sunrise, then when the end of the Wait 15 minutes occurred it would turn back on to 35%.   Since we have interrelated these two programs what will happen now is that the light will go bright 5 minutes before sunrise and turn off at sunrise then when the Wait expires it will turn off again.
     

  • Like 3
Posted

Im using an insteon motion sensor II for the program. even after the change to the only at night it didnt help . i did the search and it didn't come up with any thing else. I did change the timing

Parking Pad Light - [ID 000D][Parent 0001][Run At Startup]

If
        From     8:15:00PM
        To      Sunset  (next day)
    And 'Outdoor / Parking Pad Sensor.1 Motion' is switched On
 
Then
        Set 'Outdoor / Parking Pad' Fade Up
        Wait  5 minutes 
        Run Program 'Outdoor Lights' (Then Path)
 
Else
   - No Actions - (To add one, press 'Action')
 

Outdoor Lights - [ID 0025][Parent 0001][Run At Startup]

If
        From    Sunset  +  1 hour 
        To      Sunrise -  1 hour  (next day)
 
Then
        Set 'Sunrise' On
 
Else
        Set 'Sunrise' Off

 

motionsensoroptions.jpg.1e157b5db22e47c110c2e448b25d08a5.jpg

Posted

The light i am working with is the parking pad light only. So should i forget using the sunset program and just make a new program like you showed? Right?

Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Forum Statistics

    • Total Topics
      37k
    • Total Posts
      371.4k
×
×
  • Create New...