jfarmer08 / homebridge-wyze-smart-home

Wyze Smart Home plugin for Homebridge.
MIT License
93 stars 14 forks source link

Wyze Color Bulbs No Longer Dimmable #183

Closed conor888 closed 7 months ago

conor888 commented 8 months ago

Describe The Bug: After updating to the newest version of the plugin, v0.5.37-alpha.4, I can no longer change the brightness level of my Wyze Color Bulbs through the Home app, only turn them on/off.

To Reproduce:

  1. Tap to go into detail view on a Wyze Color Bulb in the Home app.
  2. Slide the brightness slider up and down.

Expected behavior:

  1. Bulb changes brightness corresponding to input value.

Logs:

[10/22/2023, 3:51:19 PM] [HB Supervisor] Starting Homebridge with extra flags: -I -P /var/lib/homebridge/node_modules --strict-plugin-resolution
[10/22/2023, 3:51:19 PM] [HB Supervisor] Started Homebridge v1.6.1 with PID: 1239653
[10/22/2023, 3:51:22 PM] Loaded config.json with 0 accessories and 2 platforms.
[10/22/2023, 3:51:22 PM] Loaded 0 cached accessories from cachedAccessories.
[10/22/2023, 3:51:22 PM] ---
[10/22/2023, 3:51:22 PM] Loaded plugin: homebridge-wyze-smart-home@0.5.37-alpha.4
[10/22/2023, 3:51:23 PM] Registering platform 'homebridge-wyze-smart-home.WyzeSmartHome'
[10/22/2023, 3:51:23 PM] ---
[10/22/2023, 3:51:23 PM] Loading 2 platforms...
[10/22/2023, 3:51:23 PM] [Wyze] Initializing WyzeSmartHome platform...
[10/22/2023, 3:51:23 PM] [Wyze] Initializing child bridge 0E:96:AD:C5:04:DD
Setup Payload:
X-HM://xxxxxxxxxxx
Enter this code with your HomeKit app on your iOS device to pair with Homebridge:

    ┌────────────┐     
    │ xxx-xx-xxx │     
    └────────────┘     

[10/22/2023, 3:51:23 PM] Homebridge v1.6.1 (HAP v0.11.1) (Homebridge E9E7) is running on port 51097.
[10/22/2023, 3:51:23 PM] [Wyze] Launched child bridge with PID 1239703
[10/22/2023, 3:51:24 PM] Registering platform 'homebridge-wyze-smart-home.WyzeSmartHome'
[10/22/2023, 3:51:24 PM] [Wyze] Loaded homebridge-wyze-smart-home v0.5.37-alpha.4 child bridge successfully
[10/22/2023, 3:51:24 PM] Loaded 12 cached accessories from cachedAccessories.0E96ADC504DD.
[10/22/2023, 3:51:24 PM] Homebridge v1.6.1 (HAP v0.11.1) (Wyze) is running on port 55731.

Plugin Config:

{
    "bridge": {
        "name": "Homebridge E9E7",
        "username": "0E:27:14:61:E9:E7",
        "port": 51097,
        "pin": "xxx-xx-xxx",
        "advertiser": "bonjour-hap"
    },
    "accessories": [],
    "platforms": [
        {
            "name": "Config",
            "port": 8581,
            "auth": "form",
            "theme": "auto",
            "tempUnits": "f",
            "lang": "auto",
            "platform": "config"
        },
        {
            "name": "Wyze",
            "username": "xxxxxxxxxxx",
            "password": "xxxxxxxxxxx",
            "keyId": "xxxxxxxxxxx",
            "apiKey": "xxxxxxxxxxxs",
            "refreshInterval": 60000,
            "hms": false,
            "showAdvancedOptions": false,
            "apiLogEnabled": false,
            "logLevel": "none",
            "excludeMacAddress": false,
            "excludedeviceType": false,
            "_bridge": {
                "username": "0E:96:AD:C5:04:DD",
                "port": 55731
            },
            "platform": "WyzeSmartHome"
        }
    ],
    "disabledPlugins": []
}

Screenshots: N/A

Environment:

github-actions[bot] commented 8 months ago

Message that will be displayed on users' first issue

jfarmer08 commented 8 months ago

Error logs would help with this. I mean I think this is the same issue as the other ticket but hard too tell without them.

AJFinnie commented 8 months ago

I'm also experiencing this. With alpha 5, and it started with 3 I think. But I only just began using it while 3 was available, and at the time I found another unverified one to use. I'd very much prefer to use this plugin though. So, here's my best attempt at capturing logs. If I can get something better please let me know?

homebridge_brightness_bug.log

Worth mentioning: The brightness isn't kicking back any errors that I see. But it simply isn't changing. If I select 50% brightness, it remains 100% in the UI tile. The tile will change if I modify it through the Wyze app or Google Home. But it has the same behavior, reverting to the percentage originally shown.

edit: Dimming works fine in 5.36, for me. Using it for now.

marcusdiddle commented 8 months ago

Also experiencing this issue after updating to 0.5.37-alpha.5. Wyze bulbs are able to be turned on/off, but brightness cannot be adjusted. Attempting to adjust Brightness in Apple Home presents a spinning circle on the device tile, which never goes away. Refreshing the app just puts brightness percentage reading back where it was. No errors are being logged in Homebridge.

Not sure if worth noting, but after updating to 0.5.37-alpha.5, all of my Wyze devices were unresponsive until I logged into Wyze and generated an API Key. After inputting my API Key into Homebridge, all of my devices came back. Not sure how using an API Key would introduce any kind of functionality issues, but just mentioning it.

marcusdiddle commented 8 months ago

@AJFinnie Thanks for the tip. I just verified that reverting to v0.5.36 restores dimming for me as well. Will stay on v0.5.36 until this is sorted in the meantime.

birdclan09 commented 8 months ago

I have this same problem, but I don't see any errors in the log to support it.

jfarmer08 commented 8 months ago

https://github.com/jfarmer08/homebridge-wyze-smart-home/releases/tag/v0.5.37-alpha.6

birdclan09 commented 8 months ago

This did not resolve the problem for me.

jfarmer08 commented 8 months ago

Can you upload WyzeMeshLight.js so that i can verify its the latest?

jfarmer08 commented 8 months ago

Any update

birdclan09 commented 8 months ago

Thanks for responding. I'm just dropping Wyze products for HomeKit native devices. Thanks.

jfarmer08 commented 8 months ago

@birdclan09 Keep in mind this plugin has nothing to do with Wyze. It's a community driven plugin. And I try my best to resolve all issues that I can. There is no direct API from wyze to use so this is all custom.

AJFinnie commented 8 months ago

https://github.com/jfarmer08/homebridge-wyze-smart-home/releases/tag/v0.5.37-alpha.6

I appreciate the work on this update, but after installing it, and restarting Homebridge, it didn't seem to fix the dimming for my Color Bulbs. It does eliminate the repeated log messages about my front door camera though. I wish I knew where to begin looking for it in the code, and what to modify as I would be willing to try different.

I updated to it, and restarted Homebridge. The behavior was the same, with no error logs I could see. I'm providing the WyzeMeshLight.js so you can verify, as requested from another user. WyzeMeshLight.zip

Thank you for taking the time to look into this.

And right as I was about to submit this (after gathering the file from my server), the two lights I had dimmed minutes ago, just dimmed. So there seems to be a very large delay. I'll try to time it if that might be of interest to you. I didn't have logging on unfortunately.

EDIT: it took a little over 4 minutes to update the brightness. I had modified two, and the time between both was 4m10s and 4m20seconds, give or take a couple of seconds to get between timers. The log is attached. I've edited my MAC's out, but I can do a better job of changing them if it helps track devices? wyzecolorlight.log

birdclan09 commented 8 months ago

@birdclan09 Keep in mind this plugin has nothing to do with Wyze. It's a community driven plugin. And I try my best to resolve all issues that I can. There is no direct API from wyze to use so this is all custom.

I understand. I appreciate your hard work.

jfarmer08 commented 8 months ago

@AJFinnie I can see in the log that the brightness is changing

for the delay. You can edit that file and remove '''await this.plugin.client.sleep(500)''' you will find it in the file 3 times, but with different values. You will have to restart the plugins after this.

The delay has always been there but with recent code changes I think they are actually working now. If you remove them or lower the number and find a stable place let me know.

marcusdiddle commented 8 months ago

Thanks for responding. I'm just dropping Wyze products for HomeKit native devices. Thanks.

Exactly what I just did over the last couple days. Replaced six Wyze smart outlets and eight Wyze bulbs. Switched to Meross products which were all able to be added directly to HomeKit without any issue, no hub, and I'm no longer reliant on HomeBridge, community plug-ins, etc.

@jfarmer08 Appreciate all the work people like you do to keep things like this up and running, but I've just not been a fan of having to rely on HomeBridge in general. I know it's more capable, but I'd rather just rely on native HomeKit compatibility for ease of use.

birdclan09 commented 8 months ago

@marcusdiddle agreee. Metros and Aqara are some device brands that are affordable and easy to use (and support HomeKit). Thanks @jfarmer08!

AJFinnie commented 8 months ago

@jfarmer08 Thank you for the suggestion.

I went ahead and commented out each of the lines that started with "await this.plugin.client.sleep". There were 4? One under Brightness, ColorTemperature, Hue, Saturation. I'm going to continue toying with the color options in the Home app from my phone, but nothing seems to have broken from the change. I'll keep trying to test as I can this afternoon. Let me know if I can try any specific scenarios you can think of?

I deeply appreciate that you've been maintaining this project, and keep it up to date. Thank you for all your time and work.

jfarmer08 commented 7 months ago

https://github.com/jfarmer08/homebridge-wyze-smart-home/releases/tag/v0.5.37-alpha.7