HomeGenie Forum
General Category => General Discussion => Topic started by: mchias13 on February 03, 2017, 05:35:03 PM
-
I created a "night time" event in the scheduler. Is there a way to access the variable for when it equates to true to be used in the wizard script?
what I'm trying to do:
I have my garage door opener working through my PI. What I would like to do is turn on my garage light for a few minutes if the door is opened and "night time". I know how to do everything except reference my "night time" variable.
-
Why do you want to use scheduler as a source of "night time" variable? Isn't it easier to declare a variable in script itself? Or you are going to use it in many places?
-
I could just use @solartimes.sunset and @solartimes.sunrise in the wizard script also, but I can't figure out how to do that either
Edit: think I got it working using scheduler.datetime greater than @solartimes.sunset
-
I haven't used that approach, but I am assuming that if you use it that way, you will only have night between sunset and midnight. I think you also need to add in a check for time less than sunrise.
-
I was hoping to only need 1 check to see if the current time was between sunset and sunrise. I never could get that to work. So instead I had to do using the weatherunderground times:
Garage door is open
time > sunset
or
garage door is open
time < sunrise
my goal was to do:
garage door is open
time = nighttime (where nighttime is defined in the scheduler as from sunset->sunrise)
-
I think you can take a look at "Outdoor.On" schedule example that is bundled with HG.
I didn't find any documentation on how this work, might have a look into the source code.
-
i do that for some lights that are based on time only. I haven't seen an example of how to compare it to another sensor and time in the scheduler.