Guest
Login
Register
Home
Help
Search
Login
Register
more G-Labs products
This forum is soon going to be read-only.
Please join the new
HomeGenie community on Google+
HomeGenie Forum
General Category
General Discussion
wizard script and scheduler
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: wizard script and scheduler (Read 653 times)
February 03, 2017, 05:35:03 PM
Read 653 times
mchias13
Information
Jr. Member
Posts:
45
wizard script and scheduler
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.
Logged
February 03, 2017, 10:01:32 PM
Reply #1
Bounz
Information
Full Member
Posts:
94
Re: wizard script and scheduler
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?
Logged
February 04, 2017, 12:48:19 AM
Reply #2
mchias13
Information
Jr. Member
Posts:
45
Re: wizard script and scheduler
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
«
Last Edit: February 04, 2017, 01:25:19 AM by mchias13
»
Logged
February 07, 2017, 04:51:33 PM
Reply #3
bkenobi
Information
Global Moderator
Posts:
1525
Re: wizard script and scheduler
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.
Logged
https://github.com/bkenobi/HomeGenie_Apps
February 07, 2017, 08:06:56 PM
Reply #4
mchias13
Information
Jr. Member
Posts:
45
Re: wizard script and scheduler
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)
Logged
February 07, 2017, 09:38:23 PM
Reply #5
Bounz
Information
Full Member
Posts:
94
Re: wizard script and scheduler
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.
Logged
February 07, 2017, 10:14:53 PM
Reply #6
mchias13
Information
Jr. Member
Posts:
45
Re: wizard script and scheduler
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.
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
HomeGenie Forum
General Category
General Discussion
wizard script and scheduler