Giter Site home page Giter Site logo

sjwyatt / sunwait Goto Github PK

View Code? Open in Web Editor NEW

This project forked from risacher/sunwait

0.0 0.0 0.0 120 KB

Sunwait calculates sunrise or sunset times with civil, nautical, astronomical and custom twilights, for use with Windows Task Scheduler or 'cron' on Linux.

License: GNU General Public License v3.0

C++ 89.58% C 8.23% Makefile 2.19%

sunwait's Introduction

sunwait

Sunwait calculates sunrise or sunset times with civil, nautical, astronomical and custom twilights.

It is intended for use in home automation with Windows Task Scheduler or cron. Use it to turn lights on before it gets dark! The program can wait from invocation until the event specified on the command line occurs or it can return immediately indicating if it is day or night. It's best to schedule Sunwait to run a little before the earliest opportunity for the event to occur each year - ie dusk range is 3:30pm to 10:30pm here, so it reasonable to schedule a dusk task at 3pm and allow Sunwait to pause the task for between 30mins and 7 and a half hours. If you scheduled the task for 6pm, then your lights will come on no earlier than 6pm.

The sun's position is calculated using time, and position - latitude and longitude should be specified on the command line.

Features:

  • Calculates sunrise and sunset for given coordinates
  • Can wait for sunrise/sunset, or return DAY or NIGHT codes
  • Works with Windows Task Scheduler (or cron)
  • Supports custom twilight angles
  • Used to automate domestic lighting with Arduino transmitter and radio controlled sockets

History:

This project is a "reclaimed fork". I (Dan Risacher) wrote the original version around 2000, and maintained it until 2004. In 2013, Ian Craig made a version that compiled cleanly on Windows and added some useful features. In 2019, I'm moving it to GitHub as a better collaborative development platform. If you have feature requests or issues, please report them here.

sunwait's People

Contributors

risacher avatar kadorken avatar allanlaal avatar ahorn42 avatar ckuethe avatar danieldjewell avatar linuxkidd avatar lbdroid avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.