homebridge-samsung-tizen: TV power state erroneously triggers HomeKit automation

Hi @tavicu — Posting this here in case you have any insight. One issue comes up related to the TV power state: I have an automation in the Home app to turn OFF some Hue lights if/when the Samsung TV turns OFF. Most of the time this works as expected, but many times the lights will turn OFF even though the TV continues to be ON. I can trace this issue to the automation itself, so somehow HomeKit thinks the TV has turned off (even though it’s still on) so my lights get turned off as well.

I set Homebridge to DEBUG mode but I see very few messages related to the plugin in the logs. I see the messages indicating that the lights have been switched off, but no messages from your plugin that would indicate the TV has powered off as a trigger to the automation being fired.

One message that I see in the log is this one:

[16/02/2022, 12:34:51] [My TV] [DEBUG] https://api.smartthings.com/v1/devices/MY DEVICE ID/status undefined

Does this ring a bell with you? Could this be the possible source of the issue? Any insight would be welcome. Thanks again for all your efforts with this plugin.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15 (6 by maintainers)

Most upvoted comments

Got it. Thank you for confirming. I will continue to troubleshoot my RPi and network and see if I can get this to stabilize. I’m also trying a few things using a shortcut within the automation so that the automation doesn’t fire if the trigger is erroneously set.

If you feel this is addressed from your side, please feel free to close the issue. And THANK YOU once more for all your efforts with this plugin, I appreciate it.

@tavicu — Quick update: Things appear to be working worse now regarding this issue. After several days of my lights staying on without issue, the last couple of days the lights keep turning themselves off even though the TV remains on. This seemed to work better on the beta versions of the plugin. Is it possible that a regression was introduced with the release of the final plugin version? I have reset the TV a few times, have my RPi connected via Ethernet, set the timeout parameter to 1500, and the automation repeatedly triggers as if the TV has turned off even though it hasn’t.

Nothing was changed between beta and actual release.

Any suggestions? Thanks in advance.

As I already told you, timeout it’s not a fix. Because requests may respond in 200ms now and tomorrow in 3 seconds. You must find out what is keeping your connection low.

FIrst you could start by checking the inputs you set, try to not have too many inputs of type app! Each input will result in one request at 30 seconds. If you have 10 inputs this will result in 10 requests each 30 seconds and it will slow your TV response.

Then see how many plugins you have in your Homebridge server. Try to split them in multiple bridges. You can do this from Config UI X.

How is your PI? It is running only this server or you have other things too? Like a Plex server or something. Because depending on what you run on it it may run slower. What is the temperature of the Pi CPU when running? After ~75degree it will start to underclock the CPU.

If you have other PC in the house, try to run the curl command and see the results. If they are better that means the problem is somewhere on the PI. If they are still bad means your TV may actually respond slow or the network connection it’s not good. You could also try to force restart the TV by holding the power button on the remote until you see the samsung logo.