tavicu / homebridge-samsung-tizen

Homebridge plugin for Samsung TV's with Tizen OS
MIT License
647 stars 89 forks source link

Using remote control to turn TV OFF #603

Closed quranc closed 1 year ago

quranc commented 1 year ago

This is a problem that occurs when the TV is turned OFF by the remote control. Below is a image with timestamps of what happens from turning the TV ON to turning the TV OFF.

stateChanges

When the assumed state is wrong, the TV is still OFF but when using it in automations this can be a problem with faulty reports. So here is a step-by-step of what happens when the TV is being turned OFF:

There's probably several way(s) of solving this issue but to give one suggestion.

Suggested solution: Since of what I have seen it's only possible to know the status of the TV by checking if the PORT of the TV is accessible or not. What could possibly be done here is instead have some kind of cool-down (by checking the timestamps, one minute should be enough until the PORT have been accessible and not accessible again) from when the first report of the TV being turned OFF. During this time it should not report anything. This could be a setting that you can set yourself, and of course default if not stated.

tavicu commented 1 year ago

Hi. There are multiple scenarios that needs to be meet when checking the state of TV.

Unfortunately it's not 100% accurate and I don't recommend using the main switch for automations. Instead buy a smart plug that reports power usage and do automations based on that. This way will be 100% correct.

In the future I will try to see how I can improve the detection. But for the moment, it will stay like this.