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

getting UE55JU6850 to work. #29

Closed rschoell closed 4 years ago

rschoell commented 4 years ago

@sermayoral: changing over to a separate issue thread. thanks again for the cool implementation and work you've done. I'm on version 2.5 of your plugin.

I've collected similiar files, as others and uploaded them here for you: ip:9197/ConnectionManager_1.xml: https://pastebin.com/vwd7CjB0 ip::9197/RenderingControl_1.xml: https://pastebin.com/FE3LLmYF home-assitant.log: https://pastebin.com/dM1jrh7Z

As you outlined, I've tried KEY_POWER, but it does not work,. My current config looks as follows:

media_player:

if you need anything else, I'm happy to help you. Many thanks.

sermayoral commented 4 years ago

Hi @rschoell

For turning off problems, please, follow this to discover which command turn off your TV. If you find the successfull command, put this in the 'key_power_off' variable of your configuration.

For the UPNP part, I need to see the beggining of your logs being the custom component in debug mode to see the UPNP assignment the custom component make. Please, could you resend me the log of the first 300 lines (for example) from the beggining when you restart your Home Assistant instance?

rschoell commented 4 years ago

thanks Sermayoral, You can find the complete log from start of HA here: https://pastebin.com/gmVZU60V

many thanks Ralph

sermayoral commented 4 years ago

@rschoell

Ok, the UPNP assignments are right:

RenderingControl uPNP service detected in http://192.168.1.33:9197/upnp/control/RenderingControl1
MainTVAgent2 uPNP service detected in http://192.168.1.33:9197/MainTVServer2/control/MainTVAgent2

All the UPNP requests you get 400 - Bad Request with this body:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <s:Body>
        <s:Fault>
            <faultcode>s:Client</faultcode>
            <faultstring>UPnPError</faultstring>
            <detail>
                <UPnPError xmlns="urn:schemas-upnp-org:control-1-0">
                    <errorCode>402</errorCode>
                    <errorDescription>Invalid Args</errorDescription>
                </UPnPError>
            </detail>
        </s:Fault>
    </s:Body>
</s:Envelope>

Have you check your Home Assistant IP has permission over the TV? I need you to investigate your TV with UPNP Analizer. In #10 there are lots of information about UPNP Analyzer and permission, such as this reference:

@sermayoral thanks for your help with this. This is the output I get with WireShark: image

And this is the text, I think it will be more helpful for you to analyze:

Hypertext Transfer Protocol
    POST /upnp/control/RenderingControl1 HTTP/1.1\r\n
        [Expert Info (Chat/Sequence): POST /upnp/control/RenderingControl1 HTTP/1.1\r\n]
            [POST /upnp/control/RenderingControl1 HTTP/1.1\r\n]
            [Severity level: Chat]
            [Group: Sequence]
        Request Method: POST
        Request URI: /upnp/control/RenderingControl1
        Request Version: HTTP/1.1
    SOAPACTION: "urn:schemas-upnp-org:service:RenderingControl:1#SetVolume"\r\n
    Content-Length: 384\r\n
    Content-Type: text/xml\r\n
    Content-Encoding: utf-8\r\n
    Host: 192.168.220.22:9197\r\n
    Connection: Keep-Alive\r\n
    \r\n
    [Full request URI: http://192.168.220.22:9197/upnp/control/RenderingControl1]
    [HTTP request 1/1]
    [Response in frame: 2711]
    Content-encoded entity body (utf-8): 384 bytes [Error: Decompression failed]
        Data (384 bytes)
            Data: 3c3f786d6c2076657273696f6e3d22312e302220656e636f…
            [Length: 384]

I have to mention That set volume on uPnP Analyzer didn´t work at the first try, I got 501 Error qhen I tried to set the volume, then I ran the getsourcelist command on uPnP Analyzer, and then the TV shows up a message asking for permission, I accepted that and then the set volue command started to work.

I hope this helps, if you need any other test, please let me know.

Many thanks for your time!

Originally posted by @pablolassalle in https://github.com/sermayoral/ha-samsungtv-encrypted/issues/10#issuecomment-626724063

rschoell commented 4 years ago

@sermayoral I wished I could use uPNP Analyser. As the comments in the app store state, the app instantly crashes on Windows 10 current version. Can't get this to work. I guess I'll better get a Harmony Hub to control the TV.

rschoell commented 4 years ago

@sermayoralmailto:reply@reply.github.com

I guess I found my problem in checking config against current beta: [cid:image001.png@01D62AC1.C71B05E0]

Hass.IO seemingly does not contain the module Crypto, hence cannot use it. So there’s nothing you really can help me with. Sadly. Anyways: many thanks for your help and such a great module.

Ralph

Von: Sergio Mayoral Martínez notifications@github.com Gesendet: Donnerstag, 14. Mai 2020 20:32 An: sermayoral/ha-samsungtv-encrypted ha-samsungtv-encrypted@noreply.github.com Cc: surfer2100 rschoell@outlook.com; Mention mention@noreply.github.com Betreff: Re: [sermayoral/ha-samsungtv-encrypted] getting UE55JU6850 to work. (#29)

@rschoellhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Frschoell&data=02%7C01%7C%7C0f55252c9c004a654b0408d7f83508a7%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637250778962114193&sdata=tdni%2Fn39dbPbr8Xnzu9shzvP3mtm7Oi2OYch4DHq%2BII%3D&reserved=0

Ok, the UPNP assignments are right:

RenderingControl uPNP service detected in http://192.168.1.33:9197/upnp/control/RenderingControl1

MainTVAgent2 uPNP service detected in http://192.168.1.33:9197/MainTVServer2/control/MainTVAgent2

All the UPNP requests you get 400 - Bad Request with this body:

    <s:Body>

           <s:Fault>

                   <faultcode>s:Client</faultcode>

                   <faultstring>UPnPError</faultstring>

                   <detail>

                           <UPnPError xmlns="urn:schemas-upnp-org:control-1-0">

                                  <errorCode>402</errorCode>

                                  <errorDescription>Invalid Args</errorDescription>

                           </UPnPError>

                   </detail>

           </s:Fault>

    </s:Body>

</s:Envelope>

Have you check your Home Assistant IP has permission over the TV? I need you to investigate your TV with UPNP Analizer. In #10https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fsermayoral%2Fha-samsungtv-encrypted%2Fissues%2F10&data=02%7C01%7C%7C0f55252c9c004a654b0408d7f83508a7%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637250778962124188&sdata=0tBjwF6ohB5pc0voV7Ud%2BsMPwqXSb8LutVGOjqBIJ0A%3D&reserved=0 there are lots of information about UPNP Analyzer and permission, such as this reference:

@sermayoralhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fsermayoral&data=02%7C01%7C%7C0f55252c9c004a654b0408d7f83508a7%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637250778962134188&sdata=YYlui%2Bad83wYIAvo7d3MRk5ox1IByLAdRKeUS3neXgQ%3D&reserved=0 thanks for your help with this. This is the output I get with WireShark: [image]https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F44057799%2F81570390-e96ed400-9376-11ea-9654-b1dbf13fd305.png&data=02%7C01%7C%7C0f55252c9c004a654b0408d7f83508a7%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637250778962144178&sdata=bNAG%2BVUt35AVCpWNvmDPiB%2BhHisyRMIp564Pg1%2BvCag%3D&reserved=0

And this is the text, I think it will be more helpful for you to analyze:

Hypertext Transfer Protocol

POST /upnp/control/RenderingControl1 HTTP/1.1\r\n

    [Expert Info (Chat/Sequence): POST /upnp/control/RenderingControl1 HTTP/1.1\r\n]

        [POST /upnp/control/RenderingControl1 HTTP/1.1\r\n]

        [Severity level: Chat]

        [Group: Sequence]

    Request Method: POST

    Request URI: /upnp/control/RenderingControl1

    Request Version: HTTP/1.1

SOAPACTION: "urn:schemas-upnp-org:service:RenderingControl:1#SetVolume"\r\n

Content-Length: 384\r\n

Content-Type: text/xml\r\n

Content-Encoding: utf-8\r\n

Host: 192.168.220.22:9197\r\n

Connection: Keep-Alive\r\n

\r\n

[Full request URI: http://192.168.220.22:9197/upnp/control/RenderingControl1]

[HTTP request 1/1]

[Response in frame: 2711]

Content-encoded entity body (utf-8): 384 bytes [Error: Decompression failed]

    Data (384 bytes)

        Data: 3c3f786d6c2076657273696f6e3d22312e302220656e636f…

        [Length: 384]

I have to mention That set volume on uPnP Analyzer didn´t work at the first try, I got 501 Error qhen I tried to set the volume, then I ran the getsourcelist command on uPnP Analyzer, and then the TV shows up a message asking for permission, I accepted that and then the set volue command started to work.

I hope this helps, if you need any other test, please let me know.

Many thanks for your time!

Originally posted by @pablolassallehttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpablolassalle&data=02%7C01%7C%7C0f55252c9c004a654b0408d7f83508a7%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637250778962154174&sdata=%2BnnB%2BceaqpbyDpPRLvbJ0YuMxz4A%2F8kV0e9HToqZqHU%3D&reserved=0 in #10 (comment)https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fsermayoral%2Fha-samsungtv-encrypted%2Fissues%2F10%23issuecomment-626724063&data=02%7C01%7C%7C0f55252c9c004a654b0408d7f83508a7%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637250778962164175&sdata=%2FDq89Sk1korEhxU8QmcJfY0bII%2BtAQV3kA4Sl%2FsLzVQ%3D&reserved=0

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fsermayoral%2Fha-samsungtv-encrypted%2Fissues%2F29%23issuecomment-628813240&data=02%7C01%7C%7C0f55252c9c004a654b0408d7f83508a7%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637250778962174167&sdata=BBx4RiHIhSvLyUM9dbqWohNiVn5QFDf9TJHhgAIOKs8%3D&reserved=0, or unsubscribehttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAJUVD46CYWOYSGLYYUZ62LDRRQ2INANCNFSM4M3KQ7NQ&data=02%7C01%7C%7C0f55252c9c004a654b0408d7f83508a7%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637250778962184160&sdata=3hePUma7T26w1pK9q29OZeDJDwqZnGUiIDesKm%2FklKA%3D&reserved=0.