nklerk / nl.nielsdeklerk.XiaomiYeelightCandela

Homey App for Xiaomi Yeelight Candela BLE Lights.
0 stars 3 forks source link

Lights not responding #1

Open ASNNetworks opened 5 years ago

ASNNetworks commented 5 years ago

Hi, I installed and tested this app for a few days. Very happy with your work and I appreciate you making this! The app has some bugs controling the lights. Sometimes the lights simply don’t respond when turning on/off. It seems to be at totally random times. Perhaps something wrong with the bluetooth stack? It does not time-out, the device icon in Homey will turn on but the light simply won’t and vice versa.

I am willing to alpha/beta test btw to fix this bug :).

nklerk commented 5 years ago

I have the same issue. The thing is that the current version of the Bluetooth API caches the state of a Bluetooth light. I’ve reported it as bug at Athom. Because of this there is no way for a dev to know if the device is connected. It always says true even if it’s not connected. Therefore I have to connect, send a command and disconnect without knowing if the command got excepted or rejected. In some cases the Bluetooth messaging didn’t reach the lamps without a way of knowing it.

When the API bug is fixed I can include a way to queue commands and validate if they reached the lamp. For now this is the best I can deliver.

I assume there’s a way on checking the status of the lamps, I haven’t found it yet. If I do then the app can represent true state. But I’m not there yet.

Hope this helps understanding why my driver isn’t perfect yet.

ASNNetworks commented 5 years ago

That’s too bad but I understand your explanation. I hope Athom can fix this bug/implementation soon then. Thanks for replying!

zee-eend commented 4 years ago

Homey update: [BLE] Allow writeWithResponse

Is this the way to fix this problem? :)