alessiodionisi / homebridge-lgtv2

LG webOS plugin for homebridge: https://github.com/nfarina/homebridge
MIT License
29 stars 7 forks source link

No HomeKit switch status change by turn on/off with remote #11

Open SlowMo1942 opened 7 years ago

SlowMo1942 commented 7 years ago

It is a little sobering that when I turn on the TV with the remote, that the HomeKit switch doesn't change his status. Is that not implemented or a issue?

amitgandhinz commented 7 years ago

i have noticed this issue too. If the TV is on via the remote, and you tell Siri to turn off the TV, she thinks the TV is already off and does nothing - because the home app hasnt updated with the status of On.

Looking at the code, i see there is supposed to be a 5 second interval on polling when the state is off, but I wonder if this is not triggering correctly.

amitgandhinz commented 7 years ago

checkInterval : poll for state every 5 second if power state is off. setState:

So...if your tv is already on, and you update your home kit status, the state will be set to on, and no polling will be initiated. Therefore when the state changes outside of home kit, it wont detect the changes properly.

I'll see if I can simplify some of this polling code to just always poll, rather than doing it selectively so that it is less prone on these edge cases where polling is not intiated, putting home kit into an incorrect state.

alessiodionisi commented 7 years ago

Currently checkInterval function is used only to check the status after setState = On. We could check, with same function, the state every 10/15 seconds.

DJay-X commented 7 years ago

First of all thanks for this plugin and your work. @alessiodionisi Installing 1.3.2 worked but I only see a switch in Eve App. Shouldn't be in this version also Volume in percentage and so a slider (like brightness) be available? Would be great to see development going on. Thx.

astrapowerrr commented 6 years ago

@DJay79 in that function I’m also very interested! But 7 months ago last update.... I start to believe this plugin is over...

But of course I don’t hope so!!