cellcortex / homebridge-yeelighter

Homebridge plugin for Yeelights - special focus on supporting features of ceiling lights
MIT License
98 stars 19 forks source link

Help me to understand the re-connect logic for manual configuration #148

Open maisun opened 4 months ago

maisun commented 4 months ago

Hi, Thanks for the great plugin and it's the only one that I have found which works without multicast supported in the network. I have VLAN setup for Yeelight Bulbs and I have configured them as the following: "manual": [ { "id": "0x0000000000xxxxxx", "address": "10.x.x.x", "name": "Guest Room Ceiling Lamp", "model": "mono", "support": "get_prop set_default set_power toggle set_bright start_cf stop_cf set_scene cron_add cron_get cron_del set_adjust set_name", "log": true, "offOnDisconnect": true, "colorTemperature": { "min": 5000, "max": 5000 }, "ignorePower": false } ]

It works when the bulb is connected to power however I noticed two things after the bulb lost power (switched off by the conventional switch): 1) The plugin doesn't seem to reconnect to it when the power is restored when the disconnect period is long. If for example power is restored in 10 minutes, the plugin can detect the bulb is online again and able to control it. However if the power is turned off during night, for some reason the plugin never tries to reconnect (a restart of HomeBridge will force reconnect). What is the logic of retry and does it have a time limit to give up when the light is not reachable? 2) offOnDisconnect doesn't seem to take effect and it is marked as "No Response" in HomeKit - not super important but would like to mention it Thank you very much for any input!