Sudden LAN API issues?

I’ve been controlling LIFX light strips with the LAN API for about 6 months now. Suddenly, they are no longer responding to some LAN API commands. I believe this started after the most recent firmware update.

Here are the bytes I am sending to set a zone to red (message type 501). This used to work fine. Would someone be available to take a look at this and let me know if something changed?

// Bytes to set one zone to red (no longer working)
31 00 00 34 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F5 01 00 00 0F 0F 4A 05 FA FA 65 E6 5C 0F 00 00 00 00 01

// Bytes to turn a light off (no longer working)
31 00 00 34 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 75 00 00 00 00 00 00 00 00 00

// Bytes to set everything to green (from documentation example, still works)
31 00 00 34 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 66 00 00 00 00 55 55 FF FF FF FF AC 0D 00 04 00 00

OK. The issue was the new firmware cares about the first two bytes which are supposed to indicate the size of the message. It looks like I never implemented that as previous versions didn’t care about them. In the above example, changing 31 to 33 and 2A respectively corrects the problem and aligns the bytes with the documentation.

4 Likes