Jump to content

Complex program??


Go to solution Solved by oberkc,

Recommended Posts

Posted

I am having trouble setting up a program (or programs?) to accomplish a task.  Here is the scenario:

We host an event at our home once or twice each week, at different times--on different days.  We turn it on with our voice command. The problem is that I ALWAYS want the inside lights to come on, but only want the outside lights to come on when it is sunset or later.  Then, when the event is over, I want to voice command it to turn off; again the inside lights would ALWAYS turn off, but the outside lights would come on only if it's after sunset, or stay off if it is not.  I hope that makes sense.

How do you make turning off a scene control turning things on or off?

I know how to do the Alexa voice commands, but I can't get it through my head how to do the other stuff.  Can anyone help me?

Thanks!

Posted

I think you may be stuck in a cycle of over thinking. Break down each think into a smaller program and then have a master program set to run each of the programs.

It may take some trial and error. But, I find breaking it down into smaller bits helps to find what does and doesn't work and the adjustments are easier.

  • Like 1
Posted

You may be right about the overthinking, since I've been trying to figure this out for a year now!

I'll try to break it down further.  Any other suggestions are surely welcome.

Thanks for your help!

Posted (edited)

Are your outside lights normally on our off after sunset?

You could create 2 programs to trigger instead of triggering the scene directly.

The first program would turn on the inside lights and set a variable (let's say to 1)

Then have another program trigger based off that variable being 1 if it's after sunset.

Same premise applies to the off

Edited by lilyoyo1
  • Solution
Posted

One can set up an ISY program as a device for Alexa to turn on or off.  When doing so, commanding Alexa to turn off the device (the program, in this case) the program will execute the "ELSE" path of the program.  When commanding Alexa to turn on the device, the program will execute the "THEN" path.  Given this, my initial reaction would be to create three programs.  Logically, they could look something like:

Program 1 (the program Alexa would turn on and off):

if

nothing

then

run program 2 (if path)

else 

run program 3 (if path)

Program 2:

if 

from sunset to sunrise

then

turn on inside lights

turn on outside lights

else

turn on inside lights

Program 3

if 

from sunset to sunrise

turn off inside lights

else

turn off inside lights

turn off outside lights

  • Like 3
Posted

I don't want to complicate this, but I run something similar when we are done watching TV for the night.

In our family room we way 'Alexa, Turn Off The TV'. It's an Alexa routine that executes two actions:

1) Turns off my TV and associated gear every time. My Harmony Hub takes care of that.

2) Runs the following ISY program for lights and thermostat control:

If
        From    Sunset 
        To      Sunrise (next day)
 
Then
        Set 'Fireplace Lights' On
        Set 'Speaker Lights' Off
        Set 'Fan' Off
        Set 'Fan Light' Off
        Set 'Kasa Controller / Mantle' Off
        Set 'Kasa Controller / Kitchen Counter Light 1' On
        Set 'Ecobee - Family Room' to Sleep, Hold Type Hold Next
        Wait  10 seconds
        Set 'Ecobee - Living Room' to Sleep, Hold Type Hold Next
        Wait  10 seconds
        Set 'Ecobee - Bedroom' to Sleep, Hold Type Hold Next
        Wait  10 minutes 
        Set 'Fireplace Lights' Off
        Set 'Kasa Controller / Kitchen Counter Light 1' Off
 
Else
        Set 'Fan' Off
        Set 'Speaker Lights' Off
        Set 'Fireplace Lights' Off
        Set 'Fan Light' Off
        Set 'Kasa Controller / Mantle' Off

The differences between the 'night' and 'day' actions are:

The thermostats are not altered during the day, and the Kitchen Counter Light is not turned on during the day because we don't need it to light the way to the bedroom during the day.

The wait 10 seconds to change the thermostat settings was added because they weren't all getting the 'signal' until I added that. The wait 10 minutes on the two lights is there in case we forget to turn them off on the way to the bedroom.

You might be able to pull elements (ideas) from this program to do what you are trying to do. Substitute your outside lights where I have my thermostats and/or Kitchen Counter Light.

 

Posted
12 hours ago, cksedg said:

I am having trouble setting up a program (or programs?) to accomplish a task.  Here is the scenario:

We host an event at our home once or twice each week, at different times--on different days.  We turn it on with our voice command. The problem is that I ALWAYS want the inside lights to come on, but only want the outside lights to come on when it is sunset or later.  Then, when the event is over, I want to voice command it to turn off; again the inside lights would ALWAYS turn off, but the outside lights would come on only if it's after sunset, or stay off if it is not.  I hope that makes sense.

How do you make turning off a scene control turning things on or off?

I know how to do the Alexa voice commands, but I can't get it through my head how to do the other stuff.  Can anyone help me?

Thanks!

like @oberkc's response I suggest linking programs, I'd do it slightly differently.  Use your existing programs for what happens all the time, the last statement of that program being to run the optional programs.  One thing NOT covered in that response was that these extra conditional programs must be disabled.  A disabled program still runs when commanded to by another program.

EXISTING PROGRAM:

If

   (probably blank because it's an Alexa command)

then

    ... do whatever to turn on the inside lights...

    Run Program OutdoorEventLightsON (If)

else

    ... do whatever to turn on the outside lights...

    Run Program OutdoorEventLightsOFF (If)

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

Program OutdoorEventLightsON (Disabled)

if

    Sunrise to Sunset (same day)

then

    .... do whatever to the outside lights during TURN ON if it's day (this might be left blank)

  else

    ....do whatever to the outside light during TURN ON if it's Night out.

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

Program OutdoorEventLightsOFF (Disabled)

if

    Sunrise to Sunset (same day)

then

    .... do whatever to the outside lights during TURN OFF if it's daytime

  else

    .... do whatever to the outside light during TURN OFF if it's Night out.

  • Like 1
Posted
4 hours ago, MrBill said:

One thing NOT covered in that response was that these extra conditional programs must be disabled.  A disabled program still runs when commanded to by another program.

Good catch snd should be heeded.

Posted

Wow!  Great suggestions!  I really appreciate all the help and feedback.  I will try to program this today.  I never would have figured it out on my own.  THANKS!

Posted

I programmed this tonight, and it works perfectly (in the night). I'll try it tomorrow during the day and see if it responds correctly, but I think it will.

One thing I had to change: In the main program, the following works great to turn the INDOOR lights ON, but they wouldn't go OFF when commanded.  I simply added the indoor lights to the OFF program's THEN and ELSE statements.  It works!

then

    ... do whatever to turn on the inside lights...

    Run Program OutdoorEventLightsON (If)

I"m happy!  Thanks again!

Guest
This topic is now closed to further replies.

×
×
  • Create New...