birkirb / hue-cli Goto Github PK
View Code? Open in Web Editor NEWCommand Line Interface to the Philips Hue lighting system.
License: MIT License
Command Line Interface to the Philips Hue lighting system.
License: MIT License
It'd be nice to control multiple lights with a single command.
I just installed this gem but when I run it I get the following. Do you know why?
$ hue
Failed to read configuration file
Cause: No such file or directory - /home/rich/.hue-cli/applications.yml
no one can really fork the project or do anything like that without a license
When trying to use the hue command from the command-line, and you're unsure what commands or syntaxes are supported, there's no way to list that from the hue command itself.
By default it either lists devices or fails on unknown commands. To find supported commands, you have to manually look it up in the github readme.
It would be nice if a new "usage" command was added, and this command made the default when no matching command was found, instead of just failing uninformatively like it does now.
When running the flash command, the tools crashes with this error:
$ hue 2 flash
/Users/bart/.rvm/gems/ruby-2.2.2/gems/hue-lib-0.7.2/lib/hue/bulb.rb:166:in `flash': undefined method `[]' for nil:NilClass (NoMethodError)
from /Users/bart/.rvm/gems/ruby-2.2.2/gems/hue-cli-0.1.2/lib/hue/cli/commands/light.rb:48:in `flash'
from /Users/bart/.rvm/gems/ruby-2.2.2/gems/hue-cli-0.1.2/lib/hue/cli/command.rb:51:in `send_method'
from /Users/bart/.rvm/gems/ruby-2.2.2/gems/hue-cli-0.1.2/lib/hue/cli/command.rb:14:in `execute'
from /Users/bart/.rvm/gems/ruby-2.2.2/gems/hue-cli-0.1.2/lib/hue/cli/commands/light.rb:22:in `execute'
from /Users/bart/.rvm/gems/ruby-2.2.2/gems/hue-cli-0.1.2/lib/hue/cli.rb:31:in `run'
from /Users/bart/.rvm/gems/ruby-2.2.2/gems/hue-cli-0.1.2/bin/hue:5:in `<top (required)>'
from /Users/bart/.rvm/gems/ruby-2.2.2/bin/hue:23:in `load'
from /Users/bart/.rvm/gems/ruby-2.2.2/bin/hue:23:in `<main>'
from /Users/bart/.rvm/gems/ruby-2.2.2/bin/ruby_executable_hooks:15:in `eval'
from /Users/bart/.rvm/gems/ruby-2.2.2/bin/ruby_executable_hooks:15:in `<main>'
I already tried debugging, but I have no idea why the status is nil in hue-lib. The other commands run fine.
any thoughts on this?
--> hue register
Please press the button on your bridge.
Once done, press Enter to continue with the registration.
/Users/user/.rvm/gems/ruby-2.1.0/gems/hue-lib-0.7.2/lib/hue.rb:108:in `initialize': wrong number of arguments (0 for 1..2) (ArgumentError)
from /Users/user/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/timeout.rb:70:in `new'
from /Users/user/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/timeout.rb:70:in `timeout'
from /Users/user/.rvm/gems/ruby-2.1.0/gems/hue-lib-0.7.2/lib/hue.rb:69:in `discover'
from /Users/user/.rvm/gems/ruby-2.1.0/gems/hue-lib-0.7.2/lib/hue.rb:92:in `register_bridges'
from /Users/user/.rvm/gems/ruby-2.1.0/gems/hue-lib-0.7.2/lib/hue.rb:24:in `register_default'
from /Users/user/.rvm/gems/ruby-2.1.0/gems/hue-cli-0.1.2/lib/hue/cli/commands/register.rb:22:in `default'
from /Users/user/.rvm/gems/ruby-2.1.0/gems/hue-cli-0.1.2/lib/hue/cli/commands/register.rb:14:in `execute'
from /Users/user/.rvm/gems/ruby-2.1.0/gems/hue-cli-0.1.2/lib/hue/cli.rb:29:in `run'
from /Users/user/.rvm/gems/ruby-2.1.0/gems/hue-cli-0.1.2/bin/hue:5:in `<top (required)>'
from /Users/user/.rvm/gems/ruby-2.1.0/bin/hue:23:in `load'
from /Users/user/.rvm/gems/ruby-2.1.0/bin/hue:23:in `<main>'
from /Users/user/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `eval'
from /Users/user/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `<main>'
Hi,
Using hue-cli with Hue Lux bulbs.
When getting light state, i get a "Unknown or missing state" message like this:
hue light 1
- Salon: ON
Brightness: 100 (39%)
Unknown or missing state: {"on"=>true, "bri"=>100, "alert"=>"none", "effect"=>"none", "reachable"=>true}
I guess this is because there are Hue Lux without colors.
Just FYI if you want to "fix" this. Otherwise, it's working fine.
root@fw:~ => vi /usr/local/lib/ruby/gems/2.4/gems/hue-lib-0.7.4/lib/hue/bulb.rb +92
root@fw:~ => hue24 lights
brightness_in_unit_interval': undefined method
/' for nil:NilClass (NoMethodError)brightness_percent' from /usr/local/lib/ruby/gems/2.4/gems/hue-cli-0.1.4/lib/hue/extensions/bulb.rb:11:in
block in print_state'indent' from /usr/local/lib/ruby/gems/2.4/gems/hue-cli-0.1.4/lib/hue/extensions/bulb.rb:10:in
print_state'block in print_bulbs' from /usr/local/lib/ruby/gems/2.4/gems/hue-cli-0.1.4/lib/hue/extensions/bridge.rb:47:in
each'print_bulbs' from /usr/local/lib/ruby/gems/2.4/gems/hue-cli-0.1.4/lib/hue/cli/commands/lights.rb:16:in
execute'run' from /usr/local/lib/ruby/gems/2.4/gems/hue-cli-0.1.4/bin/hue:5:in
<top (required)>'load' from /usr/local/bin/hue24:23:in
'A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.