lifxjs icon indicating copy to clipboard operation
lifxjs copied to clipboard

LiFX 2.0 Protocol

Open angeloxx opened this issue 10 years ago • 17 comments

LiFX 2.0 firmware upgrade broke the protocol. The On/Off command changes to: proto=0x14, packettype=0x75 with the same payload, The SetColor command changes to proto=0x14, same packettype and payload.

angeloxx avatar Feb 01 '15 13:02 angeloxx

You can still use 0x15, but the proto changes to 0x14

angeloxx avatar Feb 01 '15 13:02 angeloxx

Hi, I use kayno project, but from aps lifx2.0 it's not working anymore. Is there a chance to ge a modified library? Thanks https://github.com/kayno/arduinolifx

ipa64 avatar Feb 23 '15 16:02 ipa64

Apologies for the delay, I've been having some trouble with my bulbs since the firmware upgrade. I'll look into it this weekend and see where I can get.

magicmonkey avatar Feb 24 '15 22:02 magicmonkey

@angeloxx Were you able to fix this? Can you provide any code diffs?

fitch avatar Mar 02 '15 12:03 fitch

Here https://github.com/kayno/arduinolifx

Le 2 mars 2015 à 13:33, Markus Rautopuro [email protected] a écrit :

@angeloxx Were you able to fix this? Can you provide any code diffs?

— Reply to this email directly or view it on GitHub.

ipa64 avatar Mar 02 '15 14:03 ipa64

:+1:

ryanj avatar Mar 04 '15 16:03 ryanj

@ipa64 Sorry for a stupid question, but how does your link show a correction to this node.js library?

fitch avatar Mar 04 '15 16:03 fitch

Apologies it's taking me a while to get to this, it took me longer than expected to get the new firmware working with the proper Lifx apps let alone the little nodeJS library. I intend to merge the PRs, test it, then issue an update to the npm package; I just need to get the time to do it... hopefully in the next few days (although I thought that a few days ago).

magicmonkey avatar Mar 04 '15 17:03 magicmonkey

(Meanwhile, check this out: it seems that this fork https://github.com/stormboy/lifxjs works with LIFX 2.0.)

fitch avatar Mar 04 '15 17:03 fitch

Thanks @fitch - I tried the stormboy/lifxjs repo, but I wasn't able to get it to discover, or to control my bulbs (which are running the 2.0 firmware).

ryanj avatar Mar 05 '15 01:03 ryanj

Ok, maybe it's still incomplete. I have 3 bulbs with 2.0 firmware and running this with https://github.com/stormboy/lifxjs works:

yyy@xxx ~/x/lifxjs -> node cli.js 
Keys:
Press 1 to turn the lights on
..
New gateway found: 192.168.100.3
New gateway found: 192.168.100.12
Lights on
New gateway found: 192.168.100.11
Lights off
Lights on

(Lights turn on and off :), and I can set the color also.)

fitch avatar Mar 05 '15 05:03 fitch

MY BAD - my firewall was blocking port 56700 I'm able to detect the bulbs now. Thanks for testing @fitch

ryanj avatar Mar 06 '15 01:03 ryanj

Thanks all, I've just got some time and merged a bunch of pending pull requests, and also pulled stormboy/master. Some quick testing suggests that it still works with my bulbs, I'll roll an NPM release later if I don't find any problems.

magicmonkey avatar Mar 08 '15 16:03 magicmonkey

I didn't manage to control individual bulbs with stormboy/master and commit c1e346d5477300ea868c3903ef1a033478a9641a. I'm trying to pass the bulb address (as a hex string like d073d5010064) to lx.lightsColour hue, saturation, brightness, kelvin, time, bulbAddress, but it doesn't do anything. Controlling all the lights (without the bulb address) works. I'll try later if I can manage what I'm doing wrong.

fitch avatar Mar 08 '15 18:03 fitch

angeloxx suggestion of using protocol 0x14 for setLightColour seems to have done the trick for me as per my branch: https://github.com/wiegraff13/lifxjs

wiegraff13 avatar Mar 14 '15 02:03 wiegraff13

It appears that packet 0x65 no longer causes the light to respond with a 0x6b packet.

Correction: My issue was actually in the code above the lifx.js. The requestStatus function works on 2.0 as is.

wiegraff13 avatar Mar 14 '15 21:03 wiegraff13

There are now official documentations for version 2.0 https://github.com/LIFX/lifx-protocol-docs

MariusRumpf avatar Jun 14 '15 11:06 MariusRumpf