From cb738c961588233548a2c74982f2ff003eb089a0 Mon Sep 17 00:00:00 2001 From: Joe Keenan Date: Sun, 10 Jun 2018 13:00:23 -0400 Subject: [PATCH] Fixed unpack bug for LightSetColor message API spec and message packing routine both include a reserved 8-bit unsigned field. Unpack did not account for this. --- lifxlan/unpack.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lifxlan/unpack.py b/lifxlan/unpack.py index 351c2ab..7910613 100644 --- a/lifxlan/unpack.py +++ b/lifxlan/unpack.py @@ -171,8 +171,9 @@ def unpack_lifx_message(packed_message): message = LightGet(target_addr, source_id, seq_num, {}, ack_requested, response_requested) elif message_type == MSG_IDS[LightSetColor]: - color = struct.unpack("<" + ("H"*4), payload_str[0:8]) - duration = struct.unpack("