Code Monkey home page Code Monkey logo

hue-cli's People

Contributors

birkirb avatar cobyr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

hue-cli's Issues

Add Groups

It'd be nice to control multiple lights with a single command.

Failed to read configuration file

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 license given

no one can really fork the project or do anything like that without a license

Missing help/usage-command

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.

error on flash

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.

wrong # of params

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>'

Unknown or missing state

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

  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.

Listing lights fail

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

  1. Stehlampe Esszimmer: OFF
    Brightness: 0 (0%)
    Color: XY=[0.4578, 0.41], RGB≈[227, 172, 104]
  2. Stehlampe Wohnzimmer: OFF
    Brightness: 152 (60%)
    Color: Temperature=2732°K (366 mired), RGB≈[255, 166, 87]
  3. Stehlampe: ON
    Brightness: 254 (100%)
    Color: Temperature=2732°K (366 mired), RGB≈[255, 166, 87]
  4. Tisch: OFF
    Brightness: 192 (75%)
    Color: XY=[0.4174, 0.33], RGB≈[233, 140, 161]
  5. Lampe: OFF
    Brightness: 0 (0%)
    Effect:
  6. Stehlampe Schlafzimmer: OFF
    Brightness: 0 (0%)
    Effect:
  7. Deckenleuchte links: ON
    Brightness: 254 (100%)
    Effect:
  8. Deckenleuchte rechts: ON
    Brightness: 254 (100%)
    Effect:
  9. Deckenleuchte Wohnzimmer 1: ON
    Brightness: 254 (100%)
    Effect:
  10. Deckenleuchte Flur 1: OFF
    Brightness: 126 (49%)
    Effect:
  11. Deckenleuchte Flur 2: OFF
    Brightness: 126 (49%)
    Effect:
  12. Deckenleuchte Wohnzimmer 2: ON
    Brightness: 254 (100%)
    Effect:
  13. Deckenleucht Schlafzimmer: ON
    Brightness: 254 (100%)
    Effect:
  14. Dusche2: ON
    Brightness: 254 (100%)
    Color: Temperature=2732°K (366 mired), RGB≈[255, 166, 87]
  15. Dusche1: ON
    Brightness: 254 (100%)
    Color: Temperature=2732°K (366 mired), RGB≈[255, 166, 87]
  16. Links: OFF
    Brightness: 126 (49%)
    Color: XY=[0.4575, 0.4099], RGB≈[227, 172, 104]
  17. Rechts: OFF
    Brightness: 126 (49%)
    Color: XY=[0.4575, 0.4099], RGB≈[227, 172, 104]
  18. Steckdose: OFF
    /usr/local/lib/ruby/gems/2.4/gems/hue-lib-0.7.4/lib/hue/bulb.rb:92:in brightness_in_unit_interval': undefined method /' for nil:NilClass (NoMethodError)
    from /usr/local/lib/ruby/gems/2.4/gems/hue-lib-0.7.4/lib/hue/bulb.rb:96:in 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'
    from /usr/local/lib/ruby/gems/2.4/gems/hue-cli-0.1.4/lib/utilities/indentation.rb:11:in indent' from /usr/local/lib/ruby/gems/2.4/gems/hue-cli-0.1.4/lib/hue/extensions/bulb.rb:10:in print_state'
    from /usr/local/lib/ruby/gems/2.4/gems/hue-cli-0.1.4/lib/hue/extensions/bridge.rb:48:in 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'
    from /usr/local/lib/ruby/gems/2.4/gems/hue-cli-0.1.4/lib/hue/extensions/bridge.rb:47:in 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'
    from /usr/local/lib/ruby/gems/2.4/gems/hue-cli-0.1.4/lib/hue/cli.rb:30:in run' from /usr/local/lib/ruby/gems/2.4/gems/hue-cli-0.1.4/bin/hue:5:in <top (required)>'
    from /usr/local/bin/hue24:23:in load' from /usr/local/bin/hue24:23:in '

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.