vieira / homebridge-yeelight-wifi

Homebridge plugin for Yeelight white and colored bulbs.
MIT License
129 stars 27 forks source link

A lot of problems with Xiaomi Mi Bedside Lamp #89

Open davilico05 opened 3 years ago

davilico05 commented 3 years ago

Description

Hi! At present, I use the package (homebridge-yeelight-wifi) for manage 2 Xiaomi products. One Desk Lamp and One Bedside Lamp. Both are Mijia. The Desk Lamp, doesn't present problems. Go completely smooth and fast. The Bedside Lamp I don't know why, but constantly has errors, doesn't respond and freeze all homebridge devices (on HomeKit).

I configured both devices with the same way, both have "Lan Control allowed" and I don't know what I need to do for fix this problem.

I have restarted the Bedside Lamp (cutting off the power to them and then reapply power), Homebridge Server and Raspberry computer. Severals times without changes in Bed light behaviour.

If someone can help me...

Xiaomi Product

Product: Mi Bedside Lamp Model: MJCTD01YL Manufacturer: Qingdao Yeelink Information Technology Co., Ltd (a Mi Ecosystem Company) Production Date: December 2017

Homebridge Config

Homebridge Version: v1.1.7 Node.js Version: v14.15.4 Npm Version: v6.14.11

Config File

{
            "platform": "yeelight",
            "name": "yeelight",
            "connection": {
                "retries": 1,
                "timeout": 7000
            },
            "defaultValue": {
                "desklamp-ad652d": {
                    "name": "Desk Lamp"
                },
                "bslamp1-7f2df6": {
                    "name": "Bed Lamp"
                }
            }
        }

HomeBridge start Log

[01/02/2021, 18:55:35] [HB Supervisor] Starting Homebridge with extra flags: -I [01/02/2021, 18:55:35] [HB Supervisor] Started Homebridge v1.1.7 with PID: 18334 [01/02/2021, 18:55:36] Loaded config.json with 1 accessories and 6 platforms. [01/02/2021, 18:55:36] --- [01/02/2021, 18:55:38] Loaded plugin: homebridge-bravia-tvos@4.1.8 [01/02/2021, 18:55:38] Registering platform 'homebridge-bravia-tvos.BraviaOSPlatform' [01/02/2021, 18:55:38] --- [01/02/2021, 18:55:38] Loaded plugin: homebridge-config-ui-x@4.37.0 [01/02/2021, 18:55:38] Registering platform 'homebridge-config-ui-x.config' [01/02/2021, 18:55:38] --- [01/02/2021, 18:55:39] Loaded plugin: homebridge-http-webhooks@0.1.11 [01/02/2021, 18:55:39] --- [01/02/2021, 18:55:39] Loaded plugin: homebridge-tplink-smarthome@6.1.0 [01/02/2021, 18:55:39] Registering platform 'homebridge-tplink-smarthome.TplinkSmarthome' [01/02/2021, 18:55:39] --- [01/02/2021, 18:55:39] Loaded plugin: homebridge-tuya@1.3.0 [01/02/2021, 18:55:39] Registering platform 'homebridge-tuya.TuyaLan' [01/02/2021, 18:55:39] --- [01/02/2021, 18:55:40] Loaded plugin: homebridge-xiaomi-roborock-vacuum@0.16.1 [01/02/2021, 18:55:40] Registering accessory 'homebridge-xiaomi-roborock-vacuum.XiaomiRoborockVacuum' [01/02/2021, 18:55:40] --- [01/02/2021, 18:55:40] Loaded plugin: homebridge-yeelight-wifi@2.2.2 [01/02/2021, 18:55:40] Registering platform 'homebridge-yeelight-wifi.yeelight' [01/02/2021, 18:55:40] --- [01/02/2021, 18:55:40] Loading 6 platforms... [01/02/2021, 18:55:40] [Config] Initializing config platform... [01/02/2021, 18:55:40] [Config] Running in Service Mode [01/02/2021, 18:55:40] [yeelight] Initializing yeelight platform... [01/02/2021, 18:55:40] [yeelight] Loaded accessory Bed Lamp. [01/02/2021, 18:55:40] [yeelight] Loaded accessory Desk Lamp. [01/02/2021, 18:55:40] [yeelight] Searching for known devices... [01/02/2021, 18:55:40] [yeelight] Sending search request... Enter this code with your HomeKit app on your iOS device to pair with Homebridge: [01/02/2021, 18:55:40] Homebridge is running on port 51447. [01/02/2021, 18:55:40] [yeelight] Received advertisement from ad652d. [01/02/2021, 18:55:40] [yeelight] Device Desk Lamp supports brightness [01/02/2021, 18:55:40] [yeelight] Device Desk Lamp supports color temperature [01/02/2021, 18:55:40] [yeelight] Initialized device (192.168.0.11:55443). [01/02/2021, 18:55:40] [yeelight] Received advertisement from ad652d. [01/02/2021, 18:55:40] [yeelight] Received advertisement from 7f2df6. [01/02/2021, 18:55:40] [yeelight] Device Bed Lamp supports brightness [01/02/2021, 18:55:40] [yeelight] Device Bed Lamp supports color [01/02/2021, 18:55:40] [yeelight] Device Bed Lamp supports color temperature [01/02/2021, 18:55:40] [yeelight] Initialized device (192.168.0.33:55443). [01/02/2021, 18:55:40] [yeelight] Received advertisement from 7f2df6. [01/02/2021, 18:55:55] [yeelight] All known devices found. Stopping proactive search.

Problems lines

[01/02/2021, 18:59:43] [yeelight] 192.168.0.33: read ECONNRESET.
[01/02/2021, 18:59:43] [yeelight] 192.168.0.33 closed. error? true.
[01/02/2021, 18:59:50] [yeelight] 0x00000000047f2df6: failed communication attempt 0 after 7000ms.
vieira commented 1 year ago

Perhaps the wifi connection to the bedside lamp is weaker? I would suggest decreasing the timeout (to say 1000ms) and increasing the number of retries to at least 3.