After LIFX bulb firmware update, HASS no longer see this bulb

Hello,
I restarted everything ‘restartable’ and I am using non beta app.
btw, my bulb firmware is v2.13

Indeed an update yesterday. It is for LIFX 3rd gen and LIFX plus bulbs, so those who are not experiencing issues, do you have these types of bulbs?

Hi,
I think I have 3rd gen bulb LIFX A19.

Having this issue too. I have the LIFX + (A19) v2.13 and its not showing up after the firmware update.

After messing around with it, it seems to be something with the updated LIFX component and the new LIFX bulb firmware.

changing your light config to lifx_legacy gets it to show up again, but you will only get basic functionality (no effects, just basic color changes. brightness, warmth).

- platform: lifx_legacy
  server: 10.0.0.6
  broadcast: 10.0.0.255

Hope we can figure out how to get the normal lifx component working again…

This is probably easy to fix but I do not have Gen3 hardware so I cannot debug. To isolate the problem, can somebody try out the aiolifx package alone and see whether that also fails? Just do:

git clone https://github.com/frawau/aiolifx
python3 aiolifx/examples/lifx-cli.py

Then press Enter and see if it lists your bulbs.

After git clone I run the python3 aiolifx/examples/lifx-cli.py
and get

Traceback (most recent call last):
  File "aiolifx/examples/lifx-cli.py", line 26, in <module>
    import aiolifx as alix
ImportError: No module named 'aiolifx'

Not sure if I’m doing somthing wrong though. I’m doing it on my RasPi and have HASS installed with Hassbian.

My bad, that actually does not work. Sorry. I’d better stop trying to give instructions blindly.

If nobody shows up to fix this quickly, I will order a LIFX + in 12 hours.

@amelchio, I’ll update one of my third gen bulbs and see what I can uncover.

2 Likes

Select Bulb:
[1] Kitchen
[2] Mudroom
[3] d0:73:d5:xx:xx:3d
[4] d0:73:d5:xx:xx:57

Kitchen (Gen 2 A19 White)
MAC Address: d0:73:d5:xx:xx:0e
IP Address: 192.168.2.16
Port: 56700
Power: Unknown
Location: My Home
Group: Kitchen

Vendor: 1
Product: White 800 (Low Voltage)
Version: 0

Host Firmware Build Timestamp: 1485471208000000000 (2017-01-26 22:53:28 UTC)
Host Firmware Build Version: 1.21
Wifi Firmware Build Timestamp: 1456093684000000000 (2016-02-21 22:28:04 UTC)
Wifi Firmware Build Version: 101.62

None (Option 3 [Gen 3 BR30+ FW 2.13])
MAC Address: d0:73:d5:xx:xx:3d
IP Address: 1
Port: 56700
Power: Unknown
Location: None
Group: None

Vendor: None
Product: Unknown
Version: None

Host Firmware Build Timestamp: None (None UTC)
Host Firmware Build Version: None
Wifi Firmware Build Timestamp: None (None UTC)
Wifi Firmware Build Version: None

Thanks. It seems the problem is with aiolifx. I just ordered a LIFX + and should hopefully get it by tomorrow.

I’ll try to get a fix into HA 0.46 but that is a very tight schedule.

I did a quick packet capture and notice there isn’t any broadcast/multicast unlike the Gen2 blubs. Just Lifx cloud activity

Gen3 FW 2.13
1 0.000000 146.148.44.137 192.168.2.18 TCP 219 56700 → 55941 [PSH, ACK] Seq=1 Ack=1 Win=65535 Len=165
2 0.001123 192.168.2.18 146.148.44.137 TCP 60 55941 → 56700 [ACK] Seq=1 Ack=166 Win=7100 Len=0
3 0.202579 192.168.2.18 146.148.44.137 TCP 219 55941 → 56700 [PSH, ACK] Seq=1 Ack=166 Win=8192 Len=165
4 0.254946 146.148.44.137 192.168.2.18 TCP 54 56700 → 55941 [ACK] Seq=166 Ack=166 Win=65535 Len=0

Gen2 FW 1.21
1 0.000000 192.168.2.16 224.0.0.251 MDNS 276 Standard query 0x0989 PTR _alljoyn._tcp.local, “QU” question PTR _alljoyn._udp.local, “QU” question TXT TXT
2 0.000208 192.168.2.16 255.255.255.255 MDNS 276 Standard query 0x0989 PTR _alljoyn._tcp.local, “QU” question PTR _alljoyn._udp.local, “QU” question TXT TXT
3 4.988434 192.168.2.16 224.0.0.251 MDNS 276 Standard query 0x0989 PTR _alljoyn._tcp.local, “QU” question PTR _alljoyn._udp.local, “QU” question TXT TXT
4 4.988954 192.168.2.16 255.255.255.255 MDNS 276 Standard query 0x0989 PTR _alljoyn._tcp.local, “QU” question PTR _alljoyn._udp.local, “QU” question TXT TXT

Okay, I think I got it. Can somebody please confirm?

In .homeassistant/deps/aiolifx/aiolifx.py (or, if you are using Python 3.4: .homeassistant/deps/aiolifx/aiolifx34.py) go to line 105 and remove the origin comparison so

                if response.origin == 1 and response.source_id == self.source_id:

turns into

                if response.source_id == self.source_id:

Then restart Home Assistant to pick up the change. Here is a diff, if you like that better:

--- a/aiolifx/aiolifx.py
+++ b/aiolifx/aiolifx.py
@@ -102,7 +102,7 @@ class Device(aio.DatagramProtocol):
             self.lastmsg=datetime.datetime.now()
             response_type,myevent,callb = self.message[response.seq_num]
             if type(response) == response_type:
-                if response.origin == 1 and response.source_id == self.source_id:
+                if response.source_id == self.source_id:
                     self.ip_addr = addr
                     if "State" in response.__class__.__name__:
                         setmethod="resp_set_"+response.__class__.__name__.replace("State","").lower()

(cc @bigmike @keatontaylor @oobie11 @Lazy)

1 Like

My light is back! I didn’t do any further testing but it’s back… Good job! Thank you!

1 Like

Thanks for verifying! It is still tight but I think we will make it for HA 0.46.

Working for me too, I had to re-add

- platform: lifx
  server: 10.0.0.6
  broadcast: 10.0.0.255

instead of

- platform: lifx_legacy
  server: 10.0.0.6
  broadcast: 10.0.0.255

in order for the deps/aiolifx to show up, but after doing the change in aiolifx34.py my light and all the effects are working properly now. Thanks.

1 Like

Confirmed, the fix made it into the HA 0.46 release (should be out soon).

1 Like

I’m a bit late to the party, but my lights just updated to 1.22 and have broken my setup. My issue is that I’m currently running 0.35.3. My setup doesn’t have /aiolifx and instead has liffylights.py. I know the simple answer is to update home assistant, but I need to update my automations to play nice with the new “easy” automations thing. Is there anything I can do to get my lights up and running while I update my automations?

Curiously, while not related at all, Liffylights has the same bug. It is on this line and you have to change it into

    size = pack("<H", len(contents) + 2)

if I recall correctly. Liffylights is not maintained so this will not be fixed (not by me, at least).

Edit: if someone wonders, I mixed up two bugs. This Liffylights bug is similar to issue #8284, affecting LIFX Generation 2 bulbs with firmware 1.22.

1 Like

Thanks a ton, that worked perfectly! I guess this was a good thing, I’ve been putting off updating for far too long.