-
-
Notifications
You must be signed in to change notification settings - Fork 89
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
[TV] Polling Erroneously Triggers Automation #528
Comments
Hi, i am not quite sure if i understand your issue correctly, but did you should be able to do what you describe in HomeKit already. You trigger some actions or automations based on the TV status. Is there an issue with that? |
It a problem I have with other plugins on home bridge. I'm not sure what the technical cause for this problem is. It expressed as repeated triggering of a "device controlled" automation in HomeKit. If you turn on the tv, HomeKit reflects this instantly. When the plug in polls the api, it seems like it tells HomeKit again the device is on, trigging the device is on automation again. |
What LG TV do you have? |
Model number 32LQ63BPUA, webOSTV 7.0(2.4.4), TV Firmware 4.40.91. The TV powers on and off perfectly with HomeKit. It's the repeated automation triggers that makes it difficult to tie automation to its use. |
As far as i can see your TV does not use polling to get the status but rather listens to the TV events as it is a newer one. The TV only sends the events when something happens and as far as i know it only sends the turn on event once. What you could is to enable |
That just states that the plugin is trying to connect to the tv, there might be something that causes it to disconnect, hence you need to enable the |
okay, I added,
And after rebooting homebridge, I see this in the log:
It's unclear how homebridge updates HomeKit. Automation I have tied to the TV's state repeat. |
But did you start homebridge in debug mode? This log only indicates that the plugin is trying to connect to your TV, based on that the plugin should not even work. |
Yeah, well that is certainly not the complete log so i guess that you are missing something. I would need the complete log, as without that it is impossible for me to tell why your TV constantly re-connects. |
My use case for this is to trigger scenes based on device status. To turn off lights when the TV turns on for example. There is a large delay between when the TV status changes and when and if a scene fires. Unsure how to track this down, but it's a rare use case for me so I'm not tracking it closely. |
I understand your use case, but that does not help much here to identify your issues. I would still need a proper debug log. |
I'll pull deeplogs over the weekend. I suspect I'm dealing with wifi stability issues that are difficult to pin down. I live in a congested radio environment in a downtown area. I'm finding that fluctuations in radio signals can cause Homekit and related devices to disconnect and reconned despite having created separate SSIDs and having multiple APs tuned to reduce this. It seems like every time the wifi device reconnects its status is repeated through the system causing triggers to fire again. Seems like a programing solution could be implemented that checks to see what the last message received said and if the new message is the same, don't do anything. |
Every time the TV reconnects then the full state of the TV needs to be pulled, as there is no way to know for what reason the TV has gone offline. I guess the core issue here seems to be the highly unstable wifi connection, you would need to try to investigate that and possibly try out a wired connection and check if that fixes the issue. |
I'm still trying out different options like extending the "refresh" to 60000 ms. I rent, my options for creating a wired network are limited. Wifi is it sadly. I've tuned my network with multiple SSIDs, two MESH configured Amplifi Alien APs and using inSSIDER regularly to pick the "best" channel. since the router can't figure it out. I acknowledge this isn't a life threatening problem. It's a luxury to have the ability to automate your home with technology. Having said that, it does improves quality of life, reduces energy consumption, and when it works well can have an economic benefit. It would be awesome if the community as a whole could create solutions that are more resilient to common situations like mine. Assuming everyone has the ability to create a wired network eliminates a large population of people who could benefit from technology and ruins their experience with its advances. And waiting for the next version and the expense of replacing your hardware to take advantage of often incomplete promises of improved tech is hostile to consumers. Something I wish we would change as it waste a lot of time and money. It would be great if code was written to be resilient, like always asking a device "did you get that command?" or providing better tools for tuning a product you your environment. Thank you for your response and work on making this plugin in better. I'll do what I can to assist in it's evolution. |
Hello,
I have an LG TV and it use the TV's power status to control automation. I'm finding polling activity will trigger automation.
Use case:
When "TV Turns On" turn off Fan.
When LG server is polled and returns "on" value the automation is triggered again.
Is it possible to only inform HomeKit of actual changes instead of repeating known values? If polling returns the same value the push message sent when the device was turned on, nothing should happen.
Push (User powers on TV) - Tells HomeKit device is ON.
Polling - "Devices is on" - this equals the last Push message, do nothing.
Push (User powers off TV) - Tells HomeKit device is OFF.
Polling - "Devices is off" - This equals the last Push message, do nothing.
Could logic like this be applied to this plug in to avoid duplicate message being sent to HomeKit?
The text was updated successfully, but these errors were encountered: