Commit Graph

64 Commits

Author SHA1 Message Date
Paul van Tilburg f1aa6352a0 Add support for non-interactive usage of huec
For example:

  huec scene 1
  huec off 2
2016-02-02 17:34:11 +01:00
Paul van Tilburg bc9fbf73a6 Refresh the promp status every 10 seconds (when showing a new prompt) 2015-12-12 10:05:16 +01:00
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 c68b56714d Start event/scene number at 0; sync output with bulb info 2015-03-15 18:10:13 +01:00
Paul van Tilburg bd483d55b4 Include Huey in the default namespace for convenience
This allows you to directly access the classes Bulb/Group/Event/etc.
2015-03-15 18:08:59 +01: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 9783142eb0 Refresh light status every 2 minutes
With recent firmware for the bridge, refreshing is way faster!
2015-03-11 22:41:24 +01:00
Paul van Tilburg 4a58375c65 Enable sync output to stdout (useful for sync log watching) 2015-03-11 22:41:05 +01:00
Paul van Tilburg 9f00831b5a Mention (missing) depend on nokogiri 2015-01-01 17:04:58 +01:00
Paul van Tilburg 0e07a32bee Mention supported conditions in the README 2015-01-01 17:00:14 +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 1bc924a0a4 Improve feature list in the README 2014-11-29 18:03:05 +01:00
Paul van Tilburg 44953b846c Fix typo 2014-11-29 17:53:47 +01:00
Paul van Tilburg 0970d3857e Add weekdays condition example; improve text some more 2014-11-29 17:53:12 +01:00
Paul van Tilburg 042b32c6a2 Textual improvements of the README 2014-11-29 17:51:10 +01:00
Paul van Tilburg 4f3a305145 Add commands to load and execute events/activate scenes 2014-11-29 17:38:10 +01:00
Paul van Tilburg cbb9258b39 Store the configuration in an instance variable 2014-11-29 17:37:42 +01:00
Paul van Tilburg b676d6d3e6 Add the weekdays condition 2014-11-22 12:11:08 +01:00
Paul van Tilburg 51257cefd1 Actually trigger the parsing of options 2014-11-20 21:40:15 +01:00
Paul van Tilburg 41afbdd72c Add some message during the startup of huec
Also show the discovered lights and groups.
2014-11-20 21:38:10 +01:00
Paul van Tilburg 38cbd0b7d0 Add option parsing to huec (similar to hued) 2014-11-20 21:37:48 +01:00
Paul van Tilburg 5820e87af6 Fix error in a log message 2014-11-20 21:37:02 +01:00
Paul van Tilburg fc19ae0530 Add missing newline 2014-11-20 21:36:55 +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 6854137cbb Actually finish sentence 2014-11-16 12:52:28 +01:00
Paul van Tilburg a13baafca3 README.md fixes 2014-11-16 11:59:23 +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 23ce14ea2a Add command-line switch to set the configuration directory 2014-11-16 11:53:40 +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 ac83d469ee Fix spacing in LICENSE 2014-11-16 11:28:50 +01:00
Paul van Tilburg 6c159866f1 Only ignore configuration files in the config directory 2014-11-16 11:27:12 +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
Paul van Tilburg 7d6ae9c093 Move huec/hued to the bin directory 2014-11-16 11:13:18 +01:00
Paul van Tilburg e3394a9bcf Tweak/fix log messages about valid rules 2014-11-16 00:33:19 +01:00
Paul van Tilburg 6c78b621c4 Support negation of conditions by prefixing them with "^" 2014-11-16 00:32:42 +01:00
Paul van Tilburg 4abf514b90 Use a custom prompt
In the prompt, show a character per lights that is a green/red `o' for
on/off or a bright red `x' for unreachable.
2014-11-16 00:11:34 +01:00
Paul van Tilburg ddac8fc45e Rename 'refresh' to 'refresh!'; reorder commands 2014-11-16 00:11:00 +01:00
Paul van Tilburg 0e2b7f5d36 Add command 'commands' for listing the available commands 2014-11-16 00:09:52 +01:00
Paul van Tilburg c26d987000 Fixed typo leading to a syntax error when using alert 2014-11-16 00:09:14 +01:00
Paul van Tilburg 2d1899a935 Add missing file header 2014-11-16 00:07:46 +01:00
Paul van Tilburg 97e39f333f Improve logging of active rules
* Mention valid rules and active rules.
* Rename variables accordingly and refactor the trigger related methods.
* Log whether a trigger rule has already been triggered.
2014-11-15 22:37:13 +01:00