bjeanes / go-lifx

Go implementation of the LIFX bulb protocol, including a command line client, a client library, and a debug-oriented traffic snooper
18 stars 8 forks source link

Light discovery only works if some other client asks for light info #10

Open bjeanes opened 10 years ago

bjeanes commented 10 years ago

In my local branch I'm trying to plug list/on/off into the primary CLI, but discovery isn't working:

$ go run cli/lifx/lifx.go list
I heard something, and it was a *payloads.DeviceGetPanGateway
Found 0 lights.

... UNLESS, I open my phone app when it is discovering, and then I see something like this:

$ go run cli/lifx/lifx.go list 
I heard something, and it was a *payloads.DeviceGetPanGateway
I heard something, and it was a *payloads.LightState
I heard something, and it was a *payloads.DeviceGetPanGateway
Found 2 lights

lifx-snoop confirms that the bulbs don't seem to be responding from messages originating from our client. I wonder if it is sending it on the wrong socket (peer instead of broadcast?)

bjeanes commented 10 years ago

This may be due to the same reason as #11