Skip to content
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 state is regularly changing, even without any actions #23

Closed
tadeusz-niemiec opened this issue May 27, 2020 · 16 comments
Closed

TV state is regularly changing, even without any actions #23

tadeusz-niemiec opened this issue May 27, 2020 · 16 comments

Comments

@tadeusz-niemiec
Copy link

tadeusz-niemiec commented May 27, 2020

Describe the bug
I have NU8042 and I found some weird stuff going on with the state of my TV.
My logs show that every ~25 mins the TV's state changes to "on" and after around 30s back to the "off" state. It happens without any human action, for example during the night.

(Figured this out when I had set an automation to turn off my main light after the TV is turned on - my light was randomly switching off during the day without touching the TV :D)

Expected behavior
TV state should change only when I actually turn on/off my TV.

Screenshots
image

Environment details:

  • Rasbian, Home Assistant as a standalone
  • Home Assistant version installed: 0.109.1
  • Component version installed: v0.3.2 (was happening also before)
  • Last know working version: none
  • TV model: NU8042

Output of HA logs
Check the screen above

My config

samsungtv_smart:
  -  host: 192.168.0.105
     update_method: ping
     source_list: '{"ENTER": "KEY_ENTER", "TV": "KEY_TV", "HDMI": "KEY_HDMI1" }'
@ollo69
Copy link
Owner

ollo69 commented May 27, 2020

Do you use SmartThings API with your configuration?
TV during the night enable Internet connection, probably to check firmware update, this cause the integration to report the TV as on. May be enabling SmartThings (and also removing the line "update_method" in configuration) can make the check a little bit more reliable, but not sure about this.
My TV appear as "ON" once for night for about 30 sec., not more than this. How often happen to you?

@tadeusz-niemiec
Copy link
Author

@ollo69 it happens a lot -
image

Yes, i have smarthings API enabled.

I'll remove the update_method line and check how this works out. Will keep you informed.

@tadeusz-niemiec
Copy link
Author

tadeusz-niemiec commented May 27, 2020

@ollo69 unfortunately this hasn't changed anything -
image

These two already occured after removing the update_method line and restarting the HA :(

@ollo69
Copy link
Owner

ollo69 commented May 27, 2020

Could you try to ping your IP TV from the RaspBerry for 5 minutes in one windows where the TV is reported as On and let me know how long the TV answer to the ping?

@tadeusz-niemiec
Copy link
Author

@ollo69 it responds for 32 seconds. It's actually the same window as it shows in the Home Assistant logs

@ollo69
Copy link
Owner

ollo69 commented May 27, 2020

So at least components detect well TV network availability :)
This is complex situation, I do not have other way to detect TV status.
What I can do is increase the time required to determine the TV is On, but this will cause a longer On detect time in case that the TV is really turned on.
I will think about this...

ollo69 added a commit that referenced this issue May 31, 2020
- Added option for SmartThings status check
- Added option to delay startup detection for issue #23
- Deprecated config parameter "CONF_UPDATE_METHOD"
- Updated documetation
@ollo69
Copy link
Owner

ollo69 commented May 31, 2020

I released a new version with a possible fix for this issue. Eventualy you can try increase the configuration option "Seconds to delay power ON status" if default value (30 sec) is too low.
Please let me know if this solve.

@tadeusz-niemiec
Copy link
Author

@ollo69 Great, it works as expected! Thank you for your effort :)

@ollo69
Copy link
Owner

ollo69 commented Jun 1, 2020

Fine, I close this issue. Reopen if you still have problem.

@eugenet8k
Copy link

@tadeusz-niemiec and whoever faced this problem. I got Samsung Frame TV 2020, and was facing the same behavior with both the generic HASS "Samsung Smart TV" component and this one ("SamsungTV Smart"). My TV would go online every 20 mins or so. That triggered the automation I had around state change from off to on and obviously it was a mess.

I figured that this TV intent to connect the network seems like some software update checks. And indeed, after I turned off in the TV settings "Automatic Check for Updates" the problem was remediated. I guess it is a reasonable trade to keep state change reporting sane.

@ollo69
Copy link
Owner

ollo69 commented Sep 30, 2020

This thread is closed, so please open a new one.
Anyway did you try to increase the configuration option "Seconds to delay power ON status"? This option was created to work-around this issue.

@eugenet8k
Copy link

eugenet8k commented Sep 30, 2020

@ollo69 you might misunderstand my comment. I found out that if I turn off Samsung TV automatic check for updates, the issue disappears, the TV does not go online every 25 minutes. So this is just an alternative solution to this thread problem.

@ollo69
Copy link
Owner

ollo69 commented Sep 30, 2020

Clear, I understood. Just wondering if the component option also solve the problem in case you don't want to disable the automatic check for update option.

@eugenet8k
Copy link

eugenet8k commented Sep 30, 2020

@ollo69 yes, it might solve it in my case. But 30+ sec delay was not an option for me. I configured my speakers to turn on after TV was on, and having such a long delay was killing a good user experience.

@tadeusz-niemiec
Copy link
Author

tadeusz-niemiec commented Oct 1, 2020

@tadeusz-niemiec and whoever faced this problem. I got Samsung Frame TV 2020, and was facing the same behavior with both the generic HASS "Samsung Smart TV" component and this one ("SamsungTV Smart"). My TV would go online every 20 mins or so. That triggered the automation I had around state change from off to on and obviously it was a mess.

I figured that this TV intent to connect the network seems like some software update checks. And indeed, after I turned off in the TV settings "Automatic Check for Updates" the problem was remediated. I guess it is a reasonable trade to keep state change reporting sane.

Thanks for sharing this! This was so simple and I haven't thought about it... I also decided to sacrifice automatic updates for fast TV state detection :)

@wilcomir
Copy link

wilcomir commented May 7, 2023

Hello, @ollo69 I understand this is a very old issue but the trick to disable automatic updates is still relevant today - at least it was for me.

Are you open to a PR for the readme file? I can add a bit of insight on this topic where people get a chance to read it. To be fair, this is such a promiment issue with an otherwise perfect integration that I would mention the workaround in the setup flow - but that might be too far fetched.

Keep in mind I am using smart things and "Use SmartThings TV status information" option is enabled. I believe the integration prefers the ping to smart things information as it is faster, but this leads to a lot of false positives.

Let me know your thoughts, and thanks for the great work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants