Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn on at sunrise, turn off at sunset #1

Open
danielmconrad opened this issue Dec 6, 2016 · 0 comments
Open

Turn on at sunrise, turn off at sunset #1

danielmconrad opened this issue Dec 6, 2016 · 0 comments

Comments

@danielmconrad
Copy link
Owner

  1. Ask user for address or zipcode and store the lat/lng in config
    http://maps.googleapis.com/maps/api/geocode/json?address=60618
  2. Ask user if monitor should be turned off at sunset or x hours after sunrise and store in config
  3. Run script every 30 mins.
    a) If current time is within 30 mins of sunrise, turn on monitor.
    http://api.sunrise-sunset.org/json?lat=41.9464283&lng=-87.70740889999999&date=today
    b) If current time is within 30 mins of sunrise + x hours or sunset, turn off monitor.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant