sbidy / wiz_light

A WiZ Light integration for Home Assistant
MIT License
341 stars 68 forks source link

Regression: Bulbs stopped working #99

Closed VerityNH closed 3 years ago

VerityNH commented 3 years ago

Affected Version: v0.3 Lamp Affected: "moduleName":"ESP01_SHDW1_31",

After the latest update 3 bulbs stopped working and do not register in the HA via ConfigFlow or manual configuration.

VerityNH commented 3 years ago

Updated description

edterbak commented 3 years ago

Same here, After update to v0.3 a bulb went offline. Rolling back to v0.2 returned the bulb back online. Edit I dont know exact model, but bulb has printed on it: wiz colors, 4.9W 2200-6600K(RGB) 470lm 9290024488 In the wiz app it is controlable

sbidy commented 3 years ago

It seems to be an issue with the backend lib. This not an issue with special bulb type.

sbidy commented 3 years ago

https://github.com/sbidy/pywizlight/issues/42

VerityNH commented 3 years ago

It seems to be an issue with the backend lib. This not an issue with special bulb type.

I've specified the bulb type because other bulbs work without issues

sbidy commented 3 years ago

Is is possible that this bulb has a bad WiFi connection? So maybe some packages are dropped?

VerityNH commented 3 years ago

Is is possible that this bulb has a bad WiFi connection? So maybe some packages are dropped?

I don't think so, two of those are within 4 meters to the Access Point, the third one is about 10 meters, but there are 4 that are about the same distance and working perfectly. All of those can be easily controlled by the Wiz app.

Is there any way to debug and provide you more information?

edterbak commented 3 years ago

Is is possible that this bulb has a bad WiFi connection? So maybe some packages are dropped?

Same as above Seems unlikely. It is 3m from AP. Other Bulbs at 10m operates fine. Wiz app works fine as well.

PsychoMange commented 3 years ago

I have the same problem, all my bulbs of this type/model stopped working:

Wiz Candle C37 E14 (full colour) - https://www.wizconnected.com/en-GB/consumer/products/8718699787097/ I don´t know what ESP typ this correspond to though, is there an easy way to check this?.

I had some trouble with these bulbs in previous version too regarding the "min_mireds" and "max_mireds" not being correct making the slider for "Color temperature" not work, but I where able to fix this this by adding a "customize" for the entity in the configuration.yaml. So maybe there is some data missing for this lightbulb in the "bulb library"?

All my other models of Wiz lightbulbs are working fine.

sbidy commented 3 years ago

It seems to be an problem with the "brightness only" bulbs. Can you confirm that these bulbs are supporting kelvin and brightness only?

Can you also please add in your configuration.yaml the following lines:

logger:
    default: warning
    logs:
      homeassistant.components.wiz_light: debug

This should give a better output for debugging in the log.

Please install the current 0.3.1 version too.

Sorry about the issue but I don't have all possible bulbs here for testing 😉 ... I'll try to simulate these but a "real" one will be the best! Thank you for the feedback!

VerityNH commented 3 years ago

Logger: homeassistant.helpers.entity Source: helpers/entity.py:477 First occurred: 5:07:29 PM (3 occurrences) Last logged: 5:08:59 PM

Update of light.corridor_lamp is taking over 10 seconds

2021-02-03 17:09:19 WARNING (MainThread) [homeassistant.components.light] Updating wiz_light light took longer than the scheduled update interval 0:00:15

PsychoMange commented 3 years ago

The bulb I'm referring to is a full color model. This is printed on the bulb: WIZ colors 4.9W 2200-6500K(RGB) 470lm 40mA 220-240Vac 50/60Hz 9290024488

edterbak commented 3 years ago

To give feedback: I just updated to Wiz Light Bulb Integration v0.3.1.

For me the issue is fixed. Light works again as normal (Y)

Thank you for the work invested!! Much appreciated.

VerityNH commented 3 years ago

Spoke too early, issue is fixed for me

code-in-progress commented 3 years ago

Just to add to this. My non-color bulbs will not add through the integration at all. I'm on version 0.3.1 as well.

The affected model is: ESP06_SHDW9_01.

2021-02-04 17:01:54 ERROR (MainThread) [homeassistant.components.light] Error adding entities for domain light with platform wiz_light                                                                                   │
│Traceback (most recent call last):                                                                                                                                                                                       │
│  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 316, in async_add_entities                                                                                                                │
│    await asyncio.gather(*tasks)                                                                                                                                                                                         │
│  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 422, in _async_add_entity                                                                                                                 │
│    capabilities=entity.capability_attributes,                                                                                                                                                                           │
│  File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 419, in capability_attributes                                                                                                           │
│    data[ATTR_EFFECT_LIST] = self.effect_list                                                                                                                                                                            │
│  File "/config/custom_components/wiz_light/light.py", line 226, in effect_list                                                                                                                                          │
│    return [self._scenes[key] for key in [8, 9, 13, 28, 30, 29, 31]]                                                                                                                                                     │
│  File "/config/custom_components/wiz_light/light.py", line 226, in <listcomp>                                                                                                                                           │
│    return [self._scenes[key] for key in [8, 9, 13, 28, 30, 29, 31]]                                                                                                                                                     │
│IndexError: list index out of range
PsychoMange commented 3 years ago

I have the same problem, all my bulbs of this type/model stopped working:

Wiz Candle C37 E14 (full colour) - https://www.wizconnected.com/en-GB/consumer/products/8718699787097/ I don´t know what ESP typ this correspond to though, is there an easy way to check this?.

I had some trouble with these bulbs in previous version too regarding the "min_mireds" and "max_mireds" not being correct making the slider for "Color temperature" not work, but I where able to fix this this by adding a "customize" for the entity in the configuration.yaml. So maybe there is some data missing for this lightbulb in the "bulb library"?

All my other models of Wiz lightbulbs are working fine.

I got all my bulbs to work in v0.3.1 now. 😄

In case this may help someone, here is what I did:

I don´t know if all the steps where necessary, but I had already gone back form v0.3 to v0.2 when 0.3.1 came out.

FYI The "Wiz Candle C37 E14 (full colour)" got recognized as "ESP14_SHRGB1C_01 (WiZ Light Platform)" and the values for min/max_mireds are correct now, so no need to customize that anymore. 👍

Thank you for the great work!

code-in-progress commented 3 years ago

Added all the lights again with the integration UI. (I made sure to use the same name as befor, which resulted in the same entity_id as before.)

You can use the integration UI with 0.2??? I’ll have to give that a shot as the WAF is super low at the moment. LOL

PsychoMange commented 3 years ago

Added all the lights again with the integration UI. (I made sure to use the same name as befor, which resulted in the same entity_id as before.)

You can use the integration UI with 0.2??? I’ll have to give that a shot as the WAF is super low at the moment. LOL

Oh no! I missed a crucial step efter restarting HA, which was update to 0.3.1 again of course. I will update my post. Sorry about that.

sbidy commented 3 years ago

In the 0.3.1 are some issues with the bulb mapping because of the fundamental changes in the color and CCT behavior. I'm currently update the backend lib with an auto mapping. Please stay tuned. The 0.3.2 will resolve (hopefully and finally) this annoying issue.

My general advice for mirgration from 0.2. to 0.3 is to re-add all bulbs via UI. The YAML config file will be deprecated in the future. Please also update to the latest HASS version. If you use an older on the startup can be slow if bulbs are offline.

borbika commented 3 years ago

I have similar issue with my Lutec brand lamps (gemini and origo models), they have stopped working (are unavailable) sinc v0.3.

My other wiz brand gu10 bulbs are working fine (all 20 of them).

When I reverted back to the version to 0.2, the bulbs stopped working, but the Lutec lamps came back to life.

borbika commented 3 years ago

I have similar issue with my Lutec brand lamps (gemini and origo models), they have stopped working (are unavailable) sinc v0.3.

My other wiz brand gu10 bulbs are working fine (all 20 of them).

When I reverted back to the version to 0.2, the bulbs stopped working, but the Lutec lamps came back to life.

btw in the Wiz app I can see all my lamps and bulbs

sbidy commented 3 years ago

Can you please update to the 0.4. and check if the bulbs are now working and shown up?

borbika commented 3 years ago

Can you please update to the 0.4. and check if the bulbs are now working and shown up?

Yess! Great job! All my wiz lights work in HA again.

Thank You very much!