sermayoral / ha-samsungtv-encrypted

Samsung TV Encrypted Models (H & J Series) custom component for Home Assistant
Apache License 2.0
39 stars 24 forks source link

Select Source no longer available #6

Closed staraxis closed 4 years ago

staraxis commented 4 years ago

In version 2.1 the select source is no longer visible on the media player entity and using the select_source service call no longer works either.

Version 1.0 allowed me to see the select source drop down and select between TV and HDMI. Any reason this is no longer available? Happy to help out. Cheers

sermayoral commented 4 years ago

@staraxis in this new version the custom should autodiscover the input sources.

Can you show me an screenshot of your media_player card?

rpcaeiro commented 4 years ago

Same here. Here is my screenshot: C4D58072-1CE9-4E07-9F21-3CC2FDFB7727

sermayoral commented 4 years ago

I suppose you cannot control volume with this slider... Do you???

rpcaeiro commented 4 years ago

No, slider doesn’t work.

sermayoral commented 4 years ago

The uPNP service are not working for you. Maybe the port 7676 is not right for you.

Can you try an uPNP software to see what port your TV is using for uPNP?. You can see all the services available for your TV as well

In Windows you can use this simple but effective software: https://www.microsoft.com/en-us/p/upnp-analyser/9nblggh69pdn?activetab=pivot:overviewtab#

Remember to launch it while the TV is on!!

rpcaeiro commented 4 years ago

Hi Sergio, Thank you for your care. Yes, the port being used is the 7676: image

sermayoral commented 4 years ago

@rpcaeiro we are going to solve your problem. In addition, if in the course we see that the custom can be improved, I will do it :-)

Can I see your urn:schemas-upnp-org:service:RenderingControl:1 card? If its location is different from mine: http://YOUR_TV_IP:7676/smp_15_

sshot-1

So I would know which your problem is

rpcaeiro commented 4 years ago

Sergio, That is a good point, indeed. My is not in the smp15, it is in the 19. image

sermayoral commented 4 years ago

@rpcaeiro Ok, problem detected!!

I have to make some changes in the code. I would like to autodiscover uPNP locations in order to get this working in every possible location.

I hope it is solved soon :-)

KixMan28 commented 4 years ago

@sermayoral Hi Sergio! I have just realized that I have the same issue as @rpcaeiro. The select source disappeared from my card. The link you provided above doesn't work for me.

staraxis commented 4 years ago

Hi all, sorry for the slow reply. Yes I have the same port as @rpcaeiro for my TV. Thanks for the help @sermayoral this is the first samsung integration that has worked for me after years of searching!

meloos commented 4 years ago

Hi there, I have Samsung UE40H6400, and have same problem as above. But I know where the issue is. Besides different Location for GetVolume (smp15 here), GetVolume itself doesn't work with NotImplemented error code from TV "api". Hence this part of code: https://github.com/sermayoral/ha-samsungtv-encrypted/blob/master/custom_components/samsungtv_encrypted/media_player.py#L192-L198 is not being called, resulting the issue from thread. Adding dummy volume value, allowing code block to run resulted in populated sources with correct one as selected.

KixMan28 commented 4 years ago

Hi @meloos! Where would you add the dummy volume value?

sermayoral commented 4 years ago

I almost have a solution for this, but i need to check a couple of things.

@rpcaeiro (or someone with this problem). Can you access to this IP from any browser with your TV turned on? In your case it would be http://192.168.1.190:7676/smp_19_

You should get a XML file like this:

<root>
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<device>
<deviceType>urn:schemas-upnp-org:device:MediaRenderer:1</deviceType>
...

Can you paste here all the XML content or can attach the file?

Thanks

sermayoral commented 4 years ago

@meloos thanks for the report.

By the way, for everybody, pull requests are welcome if you think it would improve the custom component :-)

KixMan28 commented 4 years ago

@sermayoral Here is my XML content:

https://pastebin.com/pMjKiuaZ

sermayoral commented 4 years ago

Thanks @KixMan28

what smpx have you browse? 19?

KixMan28 commented 4 years ago

Thanks @KixMan28

what smpx have you browse? 19?

Yes, 19, as you mentioned above. Should I try something else?

sermayoral commented 4 years ago

@KixMan28 its Ok, but 19 is not the good one for you.

I suspect you have the same smp as me. Could you check against smp15 ?

KixMan28 commented 4 years ago

@sermayoral Here you go:

https://pastebin.com/tBJkyfDN

sermayoral commented 4 years ago

Thanks @KixMan28

Last test. Could you check agains smp16 ?

rpcaeiro commented 4 years ago

I almost have a solution for this, but i need to check a couple of things.

@rpcaeiro (or someone with this problem). Can you access to this IP from any browser with your TV turned on? In your case it would be http://192.168.1.190:7676/smp_19_

You should get a XML file like this:

<root>
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<device>
<deviceType>urn:schemas-upnp-org:device:MediaRenderer:1</deviceType>
...

Can you paste here all the XML content or can attach the file?

Thanks

Hi Sergio, Now I’m really confused. Today I did scan again my tv and guess what, today the service rendering is in smp11. Is this normal? Anyway here is the result:

1 0 urn:schemas-upnp-org:device:MediaRenderer:1 MS_DigitalMediaDeviceClass_DMR_V001 Display.TV.LCD Multimedia.DMR DMR-1.50 [TV] sala Samsung Electronics http://www.samsung.com/sec Samsung TV DMR UE65HU8500 AllShare1.0 http://www.samsung.com/sec 20110517DMR uuid:1e65fb81-008e-1000-9fd9-bc1485142079 JHCPH5RIVH56M image/jpeg 48 48 24 /dmr/icon_SML.jpg image/jpeg 120 120 24 /dmr/icon_LRG.jpg image/png 48 48 24 /dmr/icon_SML.png image/png 120 120 24 /dmr/icon_LRG.png urn:schemas-upnp-org:service:RenderingControl:1 urn:upnp-org:serviceId:RenderingControl /smp13 /smp14 /smp12 urn:schemas-upnp-org:service:ConnectionManager:1 urn:upnp-org:serviceId:ConnectionManager /smp16 /smp17 /smp15 urn:schemas-upnp-org:service:AVTransport:1 urn:upnp-org:serviceId:AVTransport /smp19 /smp20 /smp18 Y2014,WebURIPlayable,SeekTRACK_NR,NavigateInPause VEN_0105&DEV_VD0001

KixMan28 commented 4 years ago

Here it is the smp16:

https://pastebin.com/iLKmEHqq

sermayoral commented 4 years ago

@rpcaeiro it's possible.

Your TV assingns smp ports randomly... wow.

Thanks!!

sermayoral commented 4 years ago

@rpcaeiro by the way, it's not an XML??? Its a little strange...

rpcaeiro commented 4 years ago

@rpcaeiro by the way, it's not an XML??? Its a little strange...

Sorry, was my phone browser.

rpcaeiro commented 4 years ago

@rpcaeiro it's possible.

Your TV assingns smp ports randomly... wow.

Thanks!!

I’m now doing a few more attempts to see if I find any pattern

sermayoral commented 4 years ago

@rpcaeiro it's possible. Your TV assingns smp ports randomly... wow. Thanks!!

I’m now doing a few more attempts to see if I find any pattern

@rpcaeiro don't worry, this is not a problem because the new code discover smp ports :-).

All I need is the XML content well-formed. Thanks!!

sermayoral commented 4 years ago

Here it is the smp16:

https://pastebin.com/iLKmEHqq

@KixMan28 My suspects are right. You have same smp ports as me. The question is... Why your GetVolume service is not working?

I will try increasing the timeout a little more in the service call. We will see what happens

rpcaeiro commented 4 years ago

@rpcaeiro it's possible. Your TV assingns smp ports randomly... wow. Thanks!!

I’m now doing a few more attempts to see if I find any pattern

@rpcaeiro don't worry, this is not a problem because the new code discover smp ports :-).

All I need is the XML content well-formed. Thanks!!

@rpcaeiro it's possible. Your TV assingns smp ports randomly... wow. Thanks!!

I’m now doing a few more attempts to see if I find any pattern

@rpcaeiro don't worry, this is not a problem because the new code discover smp ports :-).

All I need is the XML content well-formed. Thanks!!

Here it is

Edit2.txt

sermayoral commented 4 years ago

@rpcaeiro now it is correct. Thanks!!

It looks very good. I'm going to make some modifications and the custom will be ready.

If you want, I can share the custom with new changes here before doing a new release. What do you think?

rpcaeiro commented 4 years ago

@rpcaeiro now it is correct. Thanks!!

It looks very good. I'm going to make some modifications and the custom will be ready.

If you want, I can share the custom with new changes here before doing a new release. What do you think?

Great, lets do it. I will be more then glad to help you.

KixMan28 commented 4 years ago

After several restarts of the HA, now the integration works as supposed: I can see all my sources, and the volume slider works.

sermayoral commented 4 years ago

@KixMan28 great!!

@rpcaeiro its done.

Can you replace your custom_component with this, restart HA and tell us how it works?

samsungtv_encrypted.zip

rpcaeiro commented 4 years ago

@sermayoral , You are amazing. All working perfectly. Sound, slide, source, off. Thank you

Muchas y muchas gracias por todo tu trabajo. Un fuerte abrazo. :)

sermayoral commented 4 years ago

@rpcaeiro great!!!

So, i'm going to commit the changes and doing a release!

Es un placer @rpcaeiro :-)

KixMan28 commented 4 years ago

Hi Sergio! Should I try this new version myself?

sermayoral commented 4 years ago

@KixMan28 is not necessary.

I'm going to do a release after some minutes, so if you want, you can update it via HACS :-)