mclarkk / lifxlan

Python library for accessing LIFX devices locally using the official LIFX LAN protocol.
MIT License
503 stars 115 forks source link

Discovery problem - Product List out-of-date #138

Closed autolog closed 3 years ago

autolog commented 4 years ago

I use this library in the LIFX plugin for Indigo (Mac Home Automation). Some users of the plugin are reporting that bulbs with the latest firmware (3.5 / 3.6) are not being discovered when running a discovery (earlier version firmware bulbs are discovered OK).

As I haven't got any bulbs with updated firmware, I was wondering whether anyone else has experienced this and as to whether there is a fix / workaround?

autolog commented 4 years ago

I have done further investigations on this and it appears that a bulb with newer firmware has a different product code? Specifically, a BR10 with new firmware 3.6 is product code 63. I was able to get round the issue for one of my users by replicating product 44 > 63. I note that the LIFX Products documentation on the LIFX Developer site doesn't yet include this new model. I suspect there may be other models not yet handled. I have added an error message to my Indigo plugin to flag up discovered but unknown products.

autolog commented 4 years ago

Created an issue on the LIFX Developer Zone for this issue.

autolog commented 4 years ago

It looks like there are two new products with Ids 62 and 63 - see response from LIFX in the LIFX Developer Zone.

autolog commented 4 years ago

LIFX have now updated the LIFX Product Definition on Github as at 6th January 2020.

I note that the json file also contains "matrix" entries for each bulb which are only set to true for Tiles and Candles?

I also note that in lifxlan.py, the discover_devices method defaults to a light if it gets an exception (Comment: # cheating -- it just so happens that all LIFX devices are lights right now) but sets no default if product id isn't found. Maybe the method should set a default LIFX lamp with a model name of UNKNOWN PRODUCT nn or similar?

mclarkk commented 3 years ago

Updated product list with #153. Also, added default product for when the product ID is not known -- great idea!