You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to use heliocron to run a script every x amount of minutes between sunrise and sunset, as opposed to using it to trigger a single event relative to sunrise/set?
The text was updated successfully, but these errors were encountered:
I'd probably try to do this with cron calling a script every x minutes and the script using heliocron to evaluate if the current time is between sunrise and sunset. For example I use something like the below in Python to collect the day state from Heliocron into a string:
def daylight_state(lat, lon):
result = subprocess.run(["/home/pi/heliocron", "-l", str(lat), "-o", str(lon), "poll", "--json"],
capture_output=True)
data = json.loads(result.stdout)
return data["day_part"]
Is it possible to use heliocron to run a script every x amount of minutes between sunrise and sunset, as opposed to using it to trigger a single event relative to sunrise/set?
The text was updated successfully, but these errors were encountered: