merdok / homebridge-webos-tv

Homebridge plugin for LG webOS TVs
MIT License
663 stars 89 forks source link

[Bug] Toggle state is wrong sometimes #7

Closed Dexwell closed 6 years ago

Dexwell commented 7 years ago

Thanks for the fantastic plugin.

Sometimes the toggle says my TV it's on when it's not. Can this be fixed?

merdok commented 7 years ago

Should be fixed with version 0.8.3! Please let me know if it works better now!

Dexwell commented 7 years ago

Seems to work great so far 🙌🏼

merdok commented 7 years ago

Good to hear! Thanks for the info!

Dexwell commented 7 years ago

Hmm, seems it isn't completely fixed after all. Siri says the TV is on when turned off with the remote. Only after I open the Home app first the TV accessories update to the correct state.

merdok commented 7 years ago

I could reproduce the issue once with my setup, but after i asked Siri the second time right after the first one, then Siri announced the correct state. Anyway i will check that out and see if i can improve it even further.

Dexwell commented 7 years ago

Yeah, HomeKit probably does the same state 'Updating' after the first voice command.

merdok commented 7 years ago

The TV doesn't sends out any signal to homebridge after it was turned off with the remote that is why the state needs to be checked every time the user requests the tv state. I believe the issue with siri is that it just lags the first time when she is asked about the tv state. But still, this should not happen and i will check out if i can come up with a solution for that. I am currently busy, but i will check it out next week.

georgkreimer commented 6 years ago

The homebridge-yeelight plugin has a heartbeat that checks the status of the WiFi lamp every 10secs. Maybe this helps with building a solution: https://github.com/vvpossible/homebridge_yeelight/blob/master/yeelight/lib/yee.js#L90

merdok commented 6 years ago

Thanks for that. Will check it out!

merdok commented 6 years ago

I did some modifications, hopefully this is fixed now with the last release.