birkirb / hue-cli

Command Line Interface to the Philips Hue lighting system.
MIT License
63 stars 9 forks source link

error on flash #4

Closed bmesuere closed 9 years ago

bmesuere commented 9 years ago

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.

birkirb commented 9 years ago

I'll try and take a look at that, thanks for the stack trace...

birkirb commented 9 years ago

Fixed.