i0null / homebridge-lgtv-2012

LG TV 2012 plugin for Homebridge
MIT License
6 stars 2 forks source link

Long update time, when TV is off #7

Open i3laze opened 6 years ago

i3laze commented 6 years ago

First of all, thanks for the plugin! I find switching LG TV off from HomeKit is rather useful.

Seems, when TV is off (and it's IP not responding), HomeBridge waits for some miracle (from your plugin) while querying TV's status. This leads to whole bunch of HomeKit accessories stalled in "updating" status for 15+ sec: https://github.com/nfarina/homebridge/issues/1892

Could you please implement some "try {ping IP once}, catch {status = off}" logic to make "TV Off" status reporting instant (1 ping timeout)?

i0null commented 6 years ago

Hi, thanks for the feedback, I too had issues with status updates delays in an earlier versions, but for some reason am unable to replicate after updating my node stacks to v8.11.3 and v10.4, not sure if this will help?

this.powered in the code is currently set by the 1 ping timeout you mentioned. However without the status checks it would never be set to true allowing the volume to be changed by Siri.

Certainly open to ideas or pull requests.

i3laze commented 6 years ago

Thanks, I’m using Docker-Homebridge image, which is still on Node v8.11.3. Just pulled the latest 0.4.44, will check if “updating” issue is still exists.

i3laze commented 6 years ago

Sorry, but no luck on v8.11.3 - when TV is turned off, whole Home.app is stuck in “Updating” its status. It makes the plugin unusable. Please, downgrade your Node and investigate.

ganewate commented 4 years ago

Howdy,

Just installed this plugin and am also seeing the same behaviour. Homebridge is running on a Linux VM, node version shows as v12.13.1.

Was keen to hook in this TV into the bridge so that I could turn it off at night when the wife has fallen asleep on the remote (input turns it on), if there was a parameter to live with no functional volume controls you mentioned but get the ability to power off while not having the plugin it would still serve a purpose. As it stands it seems to just constantly lock up all accessories connected to HomeBridge while it's trying to poll the TV when the TV is off.

villar3 commented 4 years ago

Hello,

your plugin is very cool, but i have the same issue and all the plugin on the homebridge server don't responding. I need uninstall your plugin for this time

Ludelag commented 3 years ago

Some days ago I install this plugin as well which works perfectly when the TV is ON, but when TV is just turned off the update status in homekit takes years and make the rest of divices stop working and updating. There is so far any solution?

Maybe @merdok https://github.com/merdok can give us a push in this issue, could you @i3laze change the topic of the issue and include in it @merdok. he has develped the webos plugin which works like charm

merdok commented 3 years ago

I do not think that i will be able to help here. First i do not have such a TV, second i do not know how the communication with those TVs work. The only tip which i can give is to make non blocking request to the TV, this will not block homebirdge and potentially other accessories. All status updates should be done in a non blocking way.