Skip to content

Discovery + Use Appears to Fail on LIFX Firmware 3.70 #168

@ne0ndrag0n

Description

@ne0ndrag0n

Problem Description

Using lifxlan library in a support script to power a custom home automation server. I have two LIFX bulbs that were recently upgraded to firmware version 3.70. Following the firmware update the library appears to be unable to communicate with the bulbs in any fashion. Version 3.70 appears to have been released after the last update to the repository and I suspect the lifxlan library may require changes to be compatible with firmware 3.70.

Applicable Version

$ pip3 show lifxlan
Name: lifxlan
Version: 1.2.7
Summary: API for local communication with LIFX devices over a LAN.
Home-page: http://github.com/mclarkk/lifxlan
Author: Meghan Clark
Author-email: mclarkk@berkeley.edu
License: MIT
Location: /home/ashley/.local/lib/python3.6/site-packages
Requires: ifaddr, bitstring

Reproduction Steps

The following script will fail to discover any devices:

Python 3.6.9 (default, Jan 26 2021, 15:33:00) 
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from lifxlan import LifxLAN
>>> lifxlan = LifxLAN()
>>> lifxlan.get_lights()
[]

The device appears on network in router settings and is fully controllable via LIFX android app. Using MAC address and ip address reported in router settings, I run this script but to no effect:

Python 3.6.9 (default, Jan 26 2021, 15:33:00) 
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from lifxlan import Light
>>> light = Light( "<reported mac address>", "10.0.0.9" )
>>> light.set_power( 0 )
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ashley/.local/lib/python3.6/site-packages/lifxlan/light.py", line 56, in set_power
    self.req_with_ack(LightSetPower, {"power_level": 0, "duration": duration})
  File "/home/ashley/.local/lib/python3.6/site-packages/lifxlan/device.py", line 501, in req_with_ack
    self.req_with_resp(msg_type, Acknowledgement, payload, timeout_secs, max_attempts)
  File "/home/ashley/.local/lib/python3.6/site-packages/lifxlan/device.py", line 550, in req_with_resp
    raise WorkflowException("WorkflowException: Did not receive {} from {} (Name: {}) in response to {}".format(str(response_type), str(self.mac_addr), str(self.label), str(msg_type)))
lifxlan.errors.WorkflowException: WorkflowException: Did not receive [<class 'lifxlan.msgtypes.Acknowledgement'>] from d0:73:d5:68:e1:42 (Name: None) in response to <class 'lifxlan.msgtypes.LightSetPower'>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions