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

Create event for state changed of bulb #50

Open
RobinBol opened this issue Dec 7, 2016 · 3 comments
Open

Create event for state changed of bulb #50

RobinBol opened this issue Dec 7, 2016 · 3 comments

Comments

@RobinBol
Copy link
Contributor

RobinBol commented Dec 7, 2016

It would be great if node-lifx could emit an event when a user changes the state of a light using the mobile app for example. Right now this is not possible as far as I know. I know polling could be used but that is rather undesired.

I have tried to cook up something myself, however I could not really read the incoming traffic and check whether the needed information was actually broadcasted.

@RobinBol
Copy link
Contributor Author

RobinBol commented Dec 7, 2016

It seems the iOS app does receive broadcasts from the bulb when I change its state externally, so all properties as color, temperature, onoff, seem to be broadcasted. If the library could pick this up and emit events that would be great.

@RobinBol RobinBol changed the title Create event for state changed of light Create event for state changed of bulb Dec 7, 2016
@MariusRumpf
Copy link
Owner

This is something not yet documented by LIFX. I read in a forum post that this is realized by polling but If you saw the broadcast events before we can have a look at these packets. In magicmonkey/lifxjs#46 somebody wrote a new wireshark dissector which might show this package then. I have not had the time to test that yet but feel free to do so. The other question is why and when these messages are broadcasted then. I don't know of any flag settings this behavior.

I personally only own an android device which I can check then.

@RobinBol
Copy link
Contributor Author

RobinBol commented Dec 8, 2016

It might indeed be that the mobile app initiates the polling, of which I say the responses being send over the network from the bulb to my computer.

I did not manage to setup the wireshark lua sniff script on my mac unfortunately..

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

No branches or pull requests

2 participants