Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: undefined method `ip' for nil:NilClass #5

Open
noah-ellman opened this issue Apr 16, 2017 · 2 comments
Open

Error: undefined method `ip' for nil:NilClass #5

noah-ellman opened this issue Apr 16, 2017 · 2 comments

Comments

@noah-ellman
Copy link

noah-ellman commented Apr 16, 2017

OR "Error: Invalid argument"
I'm not a ruby guy, more of a JavaScript/PHP guy. So I'm not too excited to dig deeper here...
but it seems there is a simple semantic error for most of the commands.

The only thing that works (works great!) is --on and --off. Everything else results in a syntax error.

ledenet-ufo 192.168.29.148 --status

Error: Invalid argument

C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bindata-2.4.0/lib/bindata/io.rb:31:in pos' C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bindata-2.4.0/lib/bindata/io.rb:31:in seekable?'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bindata-2.4.0/lib/bindata/io.rb:23:in initialize' C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bindata-2.4.0/lib/bindata/io.rb:240:in initialize'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bindata-2.4.0/lib/bindata/base.rb:143:in new' C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bindata-2.4.0/lib/bindata/base.rb:143:in read'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bindata-2.4.0/lib/bindata/base.rb:21:in read' C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/ledenet_api-1.4.2/lib/ledenet/api.rb:116:in block in send_packet'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/ledenet_api-1.4.2/lib/ledenet/api.rb:142:in socket_action' C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/ledenet_api-1.4.2/lib/ledenet/api.rb:112:in send_packet'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/ledenet_api-1.4.2/lib/ledenet/api.rb:130:in request_status' C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/ledenet_api-1.4.2/lib/ledenet/api.rb:20:in status'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/ledenet_api-1.4.2/bin/ledenet-ufo:156:in <top (required)>' C:/Ruby22-x64/bin/ledenet-ufo:23:in load'
C:/Ruby22-x64/bin/ledenet-ufo:23:in <main>

PS C:\Users\Noah\downloads> ledenet-ufo --on -r 200 -g 0 -b 255 --warm-white 0 --status

Error: undefined method `ip' for nil:NilClass

C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/ledenet_api-1.4.2/bin/ledenet-ufo:130:in <top (required)>' C:/Ruby22-x64/bin/ledenet-ufo:23:in load'
C:/Ruby22-x64/bin/ledenet-ufo:23:in <main>

Any ideas? :-)

(using window 10 and Ruby 2.2 and also tried with 2.3.x )

@sidoh
Copy link
Owner

sidoh commented Apr 17, 2017

Ah, yeah. I've heard that other people have had trouble with this library on Windows.

The second problem you're seeing sounds like it's not finding a device through discovery. There should be better error handling around that in the script.

The first one unfortunately seems closer to a fundamental incompatibility with Windows. Seems like it's nested deep in the library I used to define packet structures (bindata).

I'm burning most of my project time on a different effort right now, but I'll try to poke at this when I get time.

@noah-ellman
Copy link
Author

Ah, damn Windows. Thanks, hope you can find the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants