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

Not working in Windows when running Docker #67

Open
Sawtaytoes opened this issue Jun 28, 2018 · 4 comments
Open

Not working in Windows when running Docker #67

Sawtaytoes opened this issue Jun 28, 2018 · 4 comments

Comments

@Sawtaytoes
Copy link

Sawtaytoes commented Jun 28, 2018

For whatever reason, this isn't working for me in Windows. There's no issue or error, I just don't see any clients showing up.

const fs = require('fs')
const LifxClient = require('node-lifx').Client

const client = new LifxClient()

client.on(
  'light-new',
  light => (
    light
    .getLabel(
      (_, label) => (
        console.log(
          light.address,
          '\t',
          label
        )
      )
    )
  )
)

client.init()

I'm LAN-networked, so that might have something to do with it. The LIFX Universal Windows app sees lights and will use that port so I don't think it's something in Windows itself.

Did something change or do I need to enable some setting to get this working properly in Windows?

@ristomatti
Copy link
Collaborator

ristomatti commented Jun 28, 2018

It's probably firewall blocking the Node process. You'll need certain UDP port range to be open for incoming packages. I don't remember it just now but try disabling the firewall for a moment to verify the cause if it's possible for you to do so.

@MariusRumpf
Copy link
Owner

MariusRumpf commented Jun 28, 2018

The UDP port used for the discovery is 56700. See https://github.com/LIFX/lifx-protocol-docs/blob/master/workflows.md

@Sawtaytoes
Copy link
Author

I noticed this in my console when running with debug: true on init:

DEBUG - 24000034d84a563100000000000000000000000000000000000000000000000002000000 to 255.255.255.255
DEBUG - 240000346ea6b48a00000000000000000000000000000022000000000000000002000000 from 10.1.0.5
DEBUG - 24000034d84a563100000000000000000000000000000000000000000000000002000000 to 255.255.255.255
DEBUG - 240000346ea6b48a00000000000000000000000000000022000000000000000002000000 from 10.1.0.5
DEBUG - 24000034d84a563100000000000000000000000000000000000000000000000002000000 to 255.255.255.255
DEBUG - 240000346ea6b48a00000000000000000000000000000022000000000000000002000000 from 10.1.0.5
DEBUG - 24000034d84a563100000000000000000000000000000000000000000000000002000000 to 255.255.255.255
...

That IP is the Raspberry Pi I have running this library. After shutting it down, those logs are removed, I only get the DEBUG ... to 255.255.255.255 lines afterward.

Looks like it's sending out the packets, but getting no responses right?

@Sawtaytoes
Copy link
Author

I figured it out! It's something to do with Docker.

To fix the issue, I had to uninstall Docker. Something about the Ethernet adapter it installs or something else related to it are causing problems. I wonder if it has an internal subnet it designates to itself that is incompatible with my home subnet and prevents multicasting from node-lifx because of that.

Do you know what might be the issue now since we can narrow it down to Docker?

@Sawtaytoes Sawtaytoes changed the title Not working in Windows Not working in Windows when running Docker Jun 6, 2019
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

3 participants