Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto discover On/Off state and update Lamp state in HomeKit #8

Open
Hopflnger opened this issue Dec 13, 2018 · 8 comments
Open

Auto discover On/Off state and update Lamp state in HomeKit #8

Hopflnger opened this issue Dec 13, 2018 · 8 comments

Comments

@Hopflnger
Copy link

Keep track of the lamp state and update HomeKit if a lamp will be switched off with a wall switch.
At the moment, when I switch off power from a lamp, it is still available in HomeKit and you cannot mention if it is really On or OFF. Thanks for your nice work! This is really the best Yeelight HomeKit implementation at the moment.

@sahilchaddha
Copy link
Owner

sahilchaddha commented Dec 14, 2018

Hey @Hopflnger ,
Thanks for your input.

Do you mean turn the lightBulb state to switched off in HomeKit whenever Device is unavailable(Plugged off from Power Supply) ?

I will be releasing a new version of the plugin which will turn the light off if light gets disconnected from the network & update its state when it gets back connected. I will also add a restriction to change state of Bulb from HomeKit whenever the light is disconnected.

Currently the plugin polls all lights at a specific interval to update HomeKit states. To reduce network traffic you see delay in change of lightBulb states.

@Aekung
Copy link

Aekung commented Dec 18, 2018

@sahilchaddha

Looking forward to the update. The ability to just turn the light off if light gets disconnected from the network would really be a cool additional to an already awesome plugin. I am thinking of using your plugin to control all the Yeelights in my house instead of the current one I'm using.

Right now, the currently plugin I'm using will only show "Unresponsive" to the lights where someone manually turns the switch off instead of turning it off by using Home App. We all know that Unresponsive Devices could potentially cause the lag or downtime of Home App so having it changes its state to 'Off' when it can't connect to the network even when someone is manually switching off the switch would likely solve the problem.

Looking forward to the update.

@sahilchaddha
Copy link
Owner

@Aekung ,
You can update the plugin to 1.2.1.
Powered off devices will be turned off in Homekit.
Do note there will be a small lag in turning off lights in homekit when Yeelight gets powered off.
Off state will be persisted until device reconnection.

@Aekung
Copy link

Aekung commented Dec 20, 2018

@sahilchaddha worked as you said. Thank you very much. By far, this is the best yeelight plugin I have ever tried. Hopefully you could get rid of the lagging but it's not that big anyway.

Thank you very much.

@Hopflnger
Copy link
Author

@sahilchaddha
Thanks for the update. Now this plugin is going in to the right direction.
Unfortunatly I cannot get the new plugin to work. The On State is recognized and HomeKit updates a new connected Lamp to the ON State. But the other direction is not updated. If I switch off a bulb, it will not update HomeKit to the OFF State... Any Ideas? regards Chris

@sahilchaddha
Copy link
Owner

@Aekung , I agree with you on terms of lag/delay. The sole purpose of delay/lag is to reduce network traffic.

@Hopflnger , Homekit lights should turn off whenever the Lights get powered off. Once powered off, you cannot turn on the light from HomeKit until Light is powered on.
Also do note, there is a delay from plugin side to turn off the lights in Homekit.

It might take upto 60 seconds (depending on your polling interval) for socket connection to timeout, and plugin to turn off those lights.

@zucht
Copy link

zucht commented Dec 29, 2018

Due to the on/off state deprecated devices/scenes cant be deleted, other than deleting the accessories and persist folder. Please make this function optional with a plugin config option.

@Hopflnger
Copy link
Author

Hopflnger commented Jan 18, 2019

@sahilchaddha

The newest update is running now since around 3 weeks without any major problems. Homekit also keeps responding very fast. Until now there was no need to restart the System.

Only small issue is, that it takes around 5-10 min to update the OFF state. Is it possible to adjust the polling intervall in your plugin?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants