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

Media Player turns off repeatedly #4

Closed
holdestmade opened this issue Mar 27, 2020 · 13 comments
Closed

Media Player turns off repeatedly #4

holdestmade opened this issue Mar 27, 2020 · 13 comments

Comments

@holdestmade
Copy link

Works great on a Samsung 6 Series, but if I add another TV, a Samsung Q7 Series, the Q7 turns off repeatedly. If I switch it back on with media_player it works for a short while (10s or so) then turns off.

I've added the Smartthings API token and both TVs are detected and media_players are created in HA

Using the configuration.yaml method to allow me to customise sources and apps.

2020-03-27 13:03:00 INFO (MainThread) [custom_components.samsungtv_smart.media_player] Samsung TV 192.168.1.4:8002 added as 'Bens TV'
2020-03-27 13:03:08 INFO (MainThread) [custom_components.samsungtv_smart.smartthings] SmartThings discovered TV devices: {'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx': {'name': '[TV] Samsung 6 Series (40)', 'label': "Ben's TV"}, 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx': {'name': '[TV] Samsung Q7 Series (65)', 'label': 'TV'}}
2020-03-27 13:03:08 INFO (MainThread) [custom_components.samsungtv_smart.config_flow] Configured new entity TV (SmartThings) with host 192.168.1.22
2020-03-27 13:03:08 INFO (MainThread) [homeassistant.components.media_player] Setting up media_player.samsungtv_smart
2020-03-27 13:03:08 INFO (MainThread) [custom_components.samsungtv_smart.media_player] Samsung TV 192.168.1.22:8002 added as 'TV'
2020-03-27 13:03:08 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new media_player.samsungtv_smart entity: media_player.tv
@ollo69
Copy link
Owner

ollo69 commented Mar 27, 2020

Your case (2 TV on smartthings) is still not managed, but I know the issue.
I will release the fix shortly (tonight or tomorrow).
Good to have a user with this case to test :)

@holdestmade
Copy link
Author

holdestmade commented Mar 27, 2020

OK, thats great. Let me know if you need anything else to try
Looking at my logs, the component does detect both TVs

Finally, getting my Samsung TVs work with HA !

@ollo69
Copy link
Owner

ollo69 commented Mar 28, 2020

Hi,

I released a new version that should manage this case.
Please delete both TV from HA and, if you have to restart HA, temporary comment the component section in configuration.yaml.
During configuration step should appear a second windows that ask to select the SmartThings TV associate to the TV that you are configuring.

Wait for your feedback.

@holdestmade
Copy link
Author

holdestmade commented Mar 28, 2020

Yes thats it, it works perfectly on both TVs
Only issue is one of my apps is not discovered - Emby, I did it with the configuration.yaml before using "Emby": "vYmY3ACVaa.emby"
I have used the GUI setup, can I then use the confiuration.yaml to amend them or will it overwrite them ?
Also, a lot of these in the log:
2020-03-28 10:46:51 WARNING (MainThread) [custom_components.samsungtv_smart.media_player] Error getting HTTP info for app: Netflix

@ollo69
Copy link
Owner

ollo69 commented Mar 28, 2020

Hi,

of course you can use configuration.yaml after GUI setup, it will be used to amend them and will not overwrite.
Don't care about that log: it may happen sometime due to state change, I will change this log to debug in next release.
I just released a new version that check for already used SmartThings device. Now you should see the second windows only for the first TV setup (because the second can use the only one available in SmartThings).

Can you please test this new version and report result?

@holdestmade
Copy link
Author

Yes, that worked perfectly, added back the config.yaml and my emby app works great.
I can't switch on the TV that is connected wirelessly to the network but the wired one works fine, I expected this and will be wiring it shortly and nothing to do with this component.
Thanks very much for doing this, I've tried for over a year to get my TVs working properly in HA

@ollo69
Copy link
Owner

ollo69 commented Mar 28, 2020

Maybe wireless connection does not support Wakeup On Lan, or maybe the macaddress configured for that TV is not correct. If you know the wireless Mac Address you can try to use the config.yaml parameter CONF_MAC to force a value different from what automatically detected.

@holdestmade
Copy link
Author

OK I'll try that, thanks

@holdestmade
Copy link
Author

Yes, adding that mac address worked ! Many thanks

Below is a list of App IDs I've found and tested working that I couldn't see on your lists 1 and 2:

Amazon Prime
evKhCgZelL.AmazonIgnitionLauncher2

BBC iPlayer
DqEoaplKlw.bbchybrid

ITV Hub
OEvCiupaFR.ITVHub

All 4
OCaxbgg9v6.chfourctv

My5
EkzyZtmneG.My5

Recordings/Schedule
org.tizen.schedule-manager

EPG
org.tizen.epg

@ollo69
Copy link
Owner

ollo69 commented Mar 28, 2020

Can you make another test for me: on a pc open a browser and put in the address http://{host}:8001/api/v2/ (replacing {host} with the ip of the tv wireless connected).
May be you have to confirm the popup on the TV, than you should receive back some info in JSON format .
Can you check if the JSON contain the wireless MAC-Address? Can you send me back the JSON removing data that you want to hide (like the MAC Address itself)?

Thanks.

@holdestmade
Copy link
Author

Hi,

just checked and the TV will not turn on now, I guess the WIFI chip goes to sleep after a few minutes.

Did as above and the mac is present:

{
"device": {
"FrameTVSupport": "false",
"GamePadSupport": "true",
"ImeSyncedSupport": "true",
"OS": "Tizen",
"TokenAuthSupport": "true",
"VoiceSupport": "false",
"countryCode": "GB",
"description": "Samsung DTV RCR",
"developerIP": "192.168.1.33",
"developerMode": "1",
"duid": "uuid:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"firmwareVersion": "Unknown",
"id": "uuid:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"ip": "192.168.1.4",
"model": "17_KANTM_UHD_BASIC",
"modelName": "UE40MU6120",
"name": "[TV]Ben's TV",
"networkType": "wireless",
"resolution": "3840x2160",
"smartHubAgreement": "true",
"ssid": "xx:xx:xx:xx:xx:xx",
"type": "Samsung SmartTV",
"udn": "uuid:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"wifiMac": "xx:xx:xx:xx:xx:xx"
},
"id": "uuid:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"isSupport": "{"DMP_DRM_PLAYREADY":"false","DMP_DRM_WIDEVINE":"false","DMP_available":"true","EDEN_available":"true","FrameTVSupport":"false","ImeSyncedSupport":"true","TokenAuthSupport":"true","remote_available":"true","remote_fourDirections":"true","remote_touchPad":"true","remote_voiceControl":"false"}\n",
"name": "[TV]Ben's TV",
"remote": "1.0",
"type": "Samsung SmartTV",
"uri": "http://x.x.x.x:8001/api/v2/",
"version": "2.0.25"
}

@holdestmade
Copy link
Author

The wired tv is the same apart from

"networkType": "wired"

and "wifiMac" shows my wired mac address

@ollo69
Copy link
Owner

ollo69 commented Mar 28, 2020

Ok, thanks.
I was wondering if there was other info different from what I have, but as you wrote before the problem is related to the wifi chip that do not manage very well wol packet.

I will check in the future if exist other method to turn TV on, for the moment the solution is to wire the TV :).

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

2 participants