Commit Graph

18 Commits

Author SHA1 Message Date
Paul van Tilburg cb245ba880 Actually cache the new sunrise/sunset data of the correct day 2015-09-22 19:38:48 +02:00
Paul van Tilburg 48004beb92 Share the sunrise/sunset data across rules
Also, rewrite the darkness checking logic a bit.
2015-09-19 16:52:48 +02:00
Paul van Tilburg 005235fa03 Don't crash if a reload of rules failed 2015-09-19 16:51:59 +02:00
Paul van Tilburg a894d55f8c Replace the dark_at condition implementation
The previous implementation used the EarthTools Webservices, but this
website has been down for a few months now.  This replacement uses
the Sunset-Sunrise API.  (See also: http://sunrise-sunset.org/api.)
2015-09-18 23:34:32 +02:00
Paul van Tilburg 1bf5e0a7d4 Add support for the `at' condition
This is just the same as having a `from' and `until' condition (the latter
with t + 1 minute).
2015-03-11 22:43:10 +01:00
Paul van Tilburg 4cda530345 Bump version to 0.0.2 2015-01-01 16:59:51 +01:00
Paul van Tilburg bcb221cc51 Add the dark_at condition
Use the EarthTools Webservices to determine when the sun sets and when it
rises.  Use these moment to determine when it's dark.
(See also: http://www.earthtools.org/webservices.htm#usage)
2015-01-01 16:56:52 +01:00
Paul van Tilburg b676d6d3e6 Add the weekdays condition 2014-11-22 12:11:08 +01:00
Paul van Tilburg 5820e87af6 Fix error in a log message 2014-11-20 21:37:02 +01:00
Paul van Tilburg 1f1a40d176 Rescue and log failed rule executions 2014-11-20 09:01:42 +01:00
Paul van Tilburg 4d3f401459 Rescue and log a failed refresh 2014-11-20 08:47:47 +01:00
Paul van Tilburg bc9f104d9b Mention the version in the starting log message 2014-11-16 11:55:30 +01:00
Paul van Tilburg e712249458 Allow for bridge.yml to be absent 2014-11-16 11:53:58 +01:00
Paul van Tilburg 336abfc291 Prepend the config directory to the .yml file paths 2014-11-16 11:46:02 +01:00
Paul van Tilburg 8ffb5cf70a Log error messages when exceptions are rescued 2014-11-16 11:45:34 +01:00
Paul van Tilburg d89d2e2c22 Rename options to config 2014-11-16 11:44:48 +01:00
Paul van Tilburg 5eb6ddb307 Move default configuration to the Hued module; add config_dir 2014-11-16 11:43:54 +01:00
Paul van Tilburg e2921f9c2e Split up the code into separate files
* Rename the Hued class to Hued::Engine so that Hued can be the containing
  module
* Split off the version to lib/hued/version.rb
* Undo Rule being a nested class of Engine
2014-11-16 11:25:13 +01:00