Announcement

Collapse
No announcement yet.

Samsung TV Y2016 and newer (series K and up) remote control

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Samsung TV Y2016 and newer (series K and up) remote control

    Originally posted by dcorsus View Post
    Ah excellent, now I recall. I did the changes for a specific user but never released it completely. You could download the zip file in https://forums.homeseer.com/showpost...4&postcount=33
    , stop hs3, overwrite the Mediacontroller.exe with the one from the zip in the HS3 homedirectory but perhaps before you do that make sure you delete the remote control device using the PI config page!

    I looked at the attached info and all is looking good. If you want to help test, keep the debug flag on and post full logs, preferable when the PI starts and (re)discovers the devices OR when you add them OR when you click on buttons to issue commands.

    Perhaps best that we move this conversation to its own thread and call it say "Samsung TV Y2016 and newer remote control"

    Cheers,

    Dirk
    Hi Dirk,

    I have tested this beta version ("3.0.0.29") from August 28th 2017. Please see attached log files. The first buttons I tried worked (Volume). Then I tried Power off and everything seemed to stop working, until after restarting HS. Haven't noticed it after this occurence.

    At this point I have tested several buttons and noticed some are not working (for example PowerOff, HDMI1, HDMI2, etc. - Though the latter might be caused because I haven't hooked up these sources after switching to this new tv). Buttons that are definitely working are Volume buttons, navigation buttons and HDMI Source.

    I will test some more tomorrow, but right now it's bedtime in this timezone

    Edit: For future reference: I'm testing with a 2017 model UE55MU7070
    Attached Files
    Last edited by Bernold; April 3, 2018, 04:18 PM. Reason: Added model number
    Plugins I developed for HS4: Somfy Local, MiLight (LimitlessLED), Updates, Volvo (VoC), OpenTherm Gateway (OTGW)
    Running HS4 Pro on Windows 10 Pro on a Synology VM, with Node-RED running as a container.

    #2
    Originally posted by Bernold View Post
    Hi Dirk,

    I have tested this beta version ("3.0.0.29") from August 28th 2017. Please see attached log files. The first buttons I tried worked (Volume). Then I tried Power off and everything seemed to stop working, until after restarting HS. Haven't noticed it after this occurence.

    At this point I have tested several buttons and noticed some are not working (for example PowerOff, HDMI1, HDMI2, etc. - Though the latter might be caused because I haven't hooked up these sources after switching to this new tv). Buttons that are definitely working are Volume buttons, navigation buttons and HDMI Source.

    I will test some more tomorrow, but right now it's bedtime in this timezone
    Thanks for creating its own thread and good to see at least a bunch of things are working. We may have to google some postings about latest Key codes for newer Samsung TVs. The codes I found in the past, you can see them in the MediaControler_RemoteControl.ini file which is in the <hs3 root>\config folder.

    Dirk

    Comment


      #3
      I am working on a table in which I compare the PI buttons with SamsungCtl, to figure out if there could be working alternative keycodes.
      Tested most buttons, but I need to change setup to test all (for example: connect to cable instead of using the DVR).
      For some buttons I'm still trying to find out what they're supposed to do in the first place.
      There might also be a few more possible keys to add, for example gamepad buttons that are available in the official Samsung Smart View app. I will add them to the table and will see if I can Google corresponding codes.
      Also, the IR remote is quite basic, so I will test with some other Samsung IR remotes (like my B-series) to see if the TV accepts some direct commands like HDMI1/2/3/4 at all.
      Plugins I developed for HS4: Somfy Local, MiLight (LimitlessLED), Updates, Volvo (VoC), OpenTherm Gateway (OTGW)
      Running HS4 Pro on Windows 10 Pro on a Synology VM, with Node-RED running as a container.

      Comment


        #4
        Originally posted by Bernold View Post
        Hi Dirk,

        I have tested this beta version ("3.0.0.29") from August 28th 2017. Please see attached log files. The first buttons I tried worked (Volume). Then I tried Power off and everything seemed to stop working, until after restarting HS. Haven't noticed it after this occurence.
        How did you power down the TV? Was it remotely or not. I need to give it some thought on how the PI would detect the TCP connection is down without having to wait for way too long to have it timeout.
        I hope I can get my J series to work, they have many similarities except that the communication is completely encrypted. if I can get it to work, I can make all of this a lot more robust by testing it at home versus through (very helpful ) proxies

        Dirk

        Comment


          #5
          Originally posted by dcorsus View Post
          How did you power down the TV? Was it remotely or not. I need to give it some thought on how the PI would detect the TCP connection is down without having to wait for way too long to have it timeout.
          I hope I can get my J series to work, they have many similarities except that the communication is completely encrypted. if I can get it to work, I can make all of this a lot more robust by testing it at home versus through (very helpful ) proxies

          Dirk
          Still working on that table, but sometimes it's actually used to watch tv by my girlfriend..

          Power works in a strange way. This is what I have so far. Please note that the tv is only connected by Wi-Fi at the moment. It seems that the connection is cut within 5 seconds or so. I tested without IR remote.

          KEY_POWER (the toggle button) works. TV turns off and on within those 5 seconds.
          KEY_POWERON does not work with the PI, however it does work with Samsungctl (running from my Synology NAS). As far as I can see the key codes are the same. Could it be a timing issue? The same seems to happen with KEY_RW.
          KEY_POWEROFF does not work, not with the PI and not with Samsungctl.

          Meanwhile I'm Googling for alternative keycodes. I came across this article, which may help you on your way for your tv. I'm not sure which model is being described and the date makes me doubt, but I do see encoding: http://netio.davideickhoff.de/en/projects/31

          Another option for your tv that comes to mind is one that I'm using for my DVR. It's branded Ziggo Horizon, but is actually a Samsung SMT-G7401 (or SMT-G7400 for an old model). The age is similair to your tv and the system is not Tizen either, so it might work. Here's a link to the PHP script: https://www.domoticz.com/wiki/Control_ZiggoHorizon
          I'm running a modified version on my NAS and I'm calling it by sending the code of a button with hs.urlaction(). I could share my version if you can use it, but maybe you would like to keep this thread clean and start a new one. Ofcourse I would love to do this with the PI instead of the PHP script..
          Plugins I developed for HS4: Somfy Local, MiLight (LimitlessLED), Updates, Volvo (VoC), OpenTherm Gateway (OTGW)
          Running HS4 Pro on Windows 10 Pro on a Synology VM, with Node-RED running as a container.

          Comment


            #6
            Originally posted by Bernold View Post
            Still working on that table, but sometimes it's actually used to watch tv by my girlfriend..

            Power works in a strange way. This is what I have so far. Please note that the tv is only connected by Wi-Fi at the moment. It seems that the connection is cut within 5 seconds or so. I tested without IR remote.

            KEY_POWER (the toggle button) works. TV turns off and on within those 5 seconds.
            KEY_POWERON does not work with the PI, however it does work with Samsungctl (running from my Synology NAS). As far as I can see the key codes are the same. Could it be a timing issue? The same seems to happen with KEY_RW.
            KEY_POWEROFF does not work, not with the PI and not with Samsungctl.

            Meanwhile I'm Googling for alternative keycodes. I came across this article, which may help you on your way for your tv. I'm not sure which model is being described and the date makes me doubt, but I do see encoding: http://netio.davideickhoff.de/en/projects/31

            Another option for your tv that comes to mind is one that I'm using for my DVR. It's branded Ziggo Horizon, but is actually a Samsung SMT-G7401 (or SMT-G7400 for an old model). The age is similair to your tv and the system is not Tizen either, so it might work. Here's a link to the PHP script: https://www.domoticz.com/wiki/Control_ZiggoHorizon
            I'm running a modified version on my NAS and I'm calling it by sending the code of a button with hs.urlaction(). I could share my version if you can use it, but maybe you would like to keep this thread clean and start a new one. Ofcourse I would love to do this with the PI instead of the PHP script..
            While trying to make my TV work, I at least found one issue in the Websocket implementation that is also used for your TV. As far as I can tell, it might not be an issue but if the "total command string" > 256 bytes, it would be.

            Quick look at the 2 links, looks to me like older TVs which support was already in this PI, but thanks for forwarding the info.

            Dirk

            Comment


              #7
              Originally posted by dcorsus View Post
              While trying to make my TV work, I at least found one issue in the Websocket implementation that is also used for your TV. As far as I can tell, it might not be an issue but if the "total command string" > 256 bytes, it would be.

              Quick look at the 2 links, looks to me like older TVs which support was already in this PI, but thanks for forwarding the info.

              Dirk
              Slightly off topic, but are you saying I should be able to add a remote for my DVR? Because it's only detected as a server type.

              I have more or less finished my table, although I haven't tested with cable, LAN or more than 1 HDMI source. Compared all buttons from the PI with the commands as documented for Samsungctl. And I have found and tested some additional keycodes.

              Here are the results:

              KEY_CONVERGENCE -> Opens browser, returns close status 31522
              KEY_DTV_SIGNAL -> Opens search, returns close status 31522
              KEY_FACTORY -> Reacts ("Not available"), but sounds dangerous
              KEY_HOME -> Home button
              KEY_MORE -> Opens digits menu (123)
              KEY_TTX_MIX -> Reacts, function unknown
              There seem to be alternative keycodes for some buttons as well, but that's not very interesting, I guess.

              I didn't find any more keys that don't work in the PI, but do work in Samsungctl then the ones I mentioned yesterday.

              I attached my full findings for future reference.
              Attached Files
              Plugins I developed for HS4: Somfy Local, MiLight (LimitlessLED), Updates, Volvo (VoC), OpenTherm Gateway (OTGW)
              Running HS4 Pro on Windows 10 Pro on a Synology VM, with Node-RED running as a container.

              Comment


                #8
                Originally posted by Bernold View Post
                Slightly off topic, but are you saying I should be able to add a remote for my DVR? Because it's only detected as a server type.

                I have more or less finished my table, although I haven't tested with cable, LAN or more than 1 HDMI source. Compared all buttons from the PI with the commands as documented for Samsungctl. And I have found and tested some additional keycodes.

                Here are the results:

                KEY_CONVERGENCE -> Opens browser, returns close status 31522
                KEY_DTV_SIGNAL -> Opens search, returns close status 31522
                KEY_FACTORY -> Reacts ("Not available"), but sounds dangerous
                KEY_HOME -> Home button
                KEY_MORE -> Opens digits menu (123)
                KEY_TTX_MIX -> Reacts, function unknown
                There seem to be alternative keycodes for some buttons as well, but that's not very interesting, I guess.

                I didn't find any more keys that don't work in the PI, but do work in Samsungctl then the ones I mentioned yesterday.

                I attached my full findings for future reference.
                Your DVR, albeit from Samsung looks "highly customized". Best thing to do if you are not sure whether this PI has support or not, is to get me the device and service XML. The easiest way to do that is to go to the config page, click at the bottom on the "show UPNP devices", a page should open showing you all the UPNP devices active on your subnet. You can now click on the (blue) hyperlinks, which will open subpages. Capture everything related to your DVR and post or email me.

                I suspect there is a lot more we can do (as demonstrated by the samsungctrl), but I would have to find time to read through postings. I can see for example from the smartview app, that they have at least 3 distinct categories: ie. remote control, 2nd tv and (I believe) gaming/keyboard. I suspect that the json has different parameters in it, so one way is to snoop it all and post it.

                I'm still struggling with mine, despite being able to register the PIN, get the AES encryption key, I think the encryption code/parameters I'm using are wrong but impossible to tell what is wrong with the gibberish that comes out after encrypting and why the TV says "no thank you".

                I can update the code with a proper list (or bigger) list of keycodes once the dust settles. Unfortunately Samsung does not publish which codes it support as opposed to Sony (and Roku) that you can query and the device will give you a list of supported keys.

                Dirk

                Comment


                  #9
                  Originally posted by dcorsus View Post
                  Your DVR, albeit from Samsung looks "highly customized". Best thing to do if you are not sure whether this PI has support or not, is to get me the device and service XML. The easiest way to do that is to go to the config page, click at the bottom on the "show UPNP devices", a page should open showing you all the UPNP devices active on your subnet. You can now click on the (blue) hyperlinks, which will open subpages. Capture everything related to your DVR and post or email me.

                  I suspect there is a lot more we can do (as demonstrated by the samsungctrl), but I would have to find time to read through postings. I can see for example from the smartview app, that they have at least 3 distinct categories: ie. remote control, 2nd tv and (I believe) gaming/keyboard. I suspect that the json has different parameters in it, so one way is to snoop it all and post it.

                  I'm still struggling with mine, despite being able to register the PIN, get the AES encryption key, I think the encryption code/parameters I'm using are wrong but impossible to tell what is wrong with the gibberish that comes out after encrypting and why the TV says "no thank you".

                  I can update the code with a proper list (or bigger) list of keycodes once the dust settles. Unfortunately Samsung does not publish which codes it support as opposed to Sony (and Roku) that you can query and the device will give you a list of supported keys.

                  Dirk
                  I will try to keep this thread clean and e-mail you the XML files for my DVR (which is probably used by millions of others in The Netherlands).

                  Yesterday I tried to see if I could use Fiddler to snoop data from the app, but when I tried it disconnected. Will give it another try soon. I think there should be more keycodes, especially for the gamepad.

                  I wonder if the app works for your tv at all. The iOS app works for me, but the Windows app doesn't connect. While going through the installed files I came across an XML called UnsupportedTVList.Plist with mostly H and J series models mentioned in it..

                  For Tizen models I think I came across a function somewhere that would return all supported keys, but I think it had to be run as an app from the tv.
                  Plugins I developed for HS4: Somfy Local, MiLight (LimitlessLED), Updates, Volvo (VoC), OpenTherm Gateway (OTGW)
                  Running HS4 Pro on Windows 10 Pro on a Synology VM, with Node-RED running as a container.

                  Comment


                    #10
                    Originally posted by Bernold View Post
                    I wonder if the app works for your tv at all.
                    .... well there is always that risk However, I'm using two other 3rd party code, one a JavaScript, the other the official SmartView code and both do work. Interestingly enough the 2015/2016 models encrypt the payload with AES (and ask for PIN), whereas the 2017 and newer have very similar Websocket implementations but dropped the AES encryption of the payload. I'm using the .NET AES module but I suspect I configure it wrong because the payload encrypted with the JaveScript code, I'm so far been unable to decrypt despite using exact same Cypher info.

                    Originally posted by Bernold View Post
                    UnsupportedTVList.Plist with mostly H and J series models mentioned in it...
                    Saw that one as well ...

                    Originally posted by Bernold View Post
                    For Tizen models I think I came across a function somewhere that would return all supported keys, but I think it had to be run as an app from the tv.
                    That would be great, so if you find more, post it

                    Dirk

                    Comment


                      #11
                      Originally posted by dcorsus View Post
                      .... well there is always that risk However, That would be great, so if you find more, post it

                      Dirk
                      I can't seem to find the page I found earlier, but if I do I will post it.

                      This page mentions something about getSupportedKeys():
                      http://developer.samsung.com/tv/deve...remote-control

                      Also I found a book which could be interesting. It is published by Wiley and is called Samsung SmartTV Application Development. I guess linking to it is not allowed on this forum, but the book can easily be found.
                      Plugins I developed for HS4: Somfy Local, MiLight (LimitlessLED), Updates, Volvo (VoC), OpenTherm Gateway (OTGW)
                      Running HS4 Pro on Windows 10 Pro on a Synology VM, with Node-RED running as a container.

                      Comment


                        #12
                        Originally posted by Bernold View Post
                        I can't seem to find the page I found earlier, but if I do I will post it.

                        This page mentions something about getSupportedKeys():
                        http://developer.samsung.com/tv/deve...remote-control

                        Also I found a book which could be interesting. It is published by Wiley and is called Samsung SmartTV Application Development. I guess linking to it is not allowed on this forum, but the book can easily be found.
                        I literally succeeded about 10 minutes ago to send successfully my first remote command to my Samsung J series. After about 3 weekends and many very very late nights, I got it working and understand now most of it. I'm still chasing a major problem in that it only works if I ask for a PIN each time, reusing the pairing from the past, I thought I had that down, but apparently not.

                        Looking over the other info you sent me. Not sure how to retrieve the remote codes, how you access that API, maybe something with newer Samsungs, can't say I've seen this on mine anywhere. I could check the XML of your TV and see if it has anything remotely the same as getsupportedkeys.

                        Looking through the XML, I would think that you can add the Ziggo as a player and as a server. Have you tried that? Nothing in the XML about remote control though.

                        Dirk

                        Comment


                          #13
                          Originally posted by Bernold View Post
                          Slightly off topic, but are you saying I should be able to add a remote for my DVR? Because it's only detected as a server type.

                          I have more or less finished my table, although I haven't tested with cable, LAN or more than 1 HDMI source. Compared all buttons from the PI with the commands as documented for Samsungctl. And I have found and tested some additional keycodes.

                          Here are the results:

                          KEY_CONVERGENCE -> Opens browser, returns close status 31522
                          KEY_DTV_SIGNAL -> Opens search, returns close status 31522
                          KEY_FACTORY -> Reacts ("Not available"), but sounds dangerous
                          KEY_HOME -> Home button
                          KEY_MORE -> Opens digits menu (123)
                          KEY_TTX_MIX -> Reacts, function unknown
                          There seem to be alternative keycodes for some buttons as well, but that's not very interesting, I guess.

                          I didn't find any more keys that don't work in the PI, but do work in Samsungctl then the ones I mentioned yesterday.

                          I attached my full findings for future reference.
                          I'm updating the code. Are there any specific keys that you think are important enough to support or fix?
                          I suspect the powerOn might be via WOL unless the TV goes into standby mode while the whole UPNP/Remote subsystem is still on, not very likely.

                          Dirk

                          Comment


                            #14
                            Originally posted by dcorsus View Post
                            I'm updating the code. Are there any specific keys that you think are important enough to support or fix?
                            I suspect the powerOn might be via WOL unless the TV goes into standby mode while the whole UPNP/Remote subsystem is still on, not very likely.

                            Dirk
                            Hi Dirk,

                            Sorry, had some long and exhausting days at work. Good to hear that you're making progress for your own tv. Maybe you don't need it anymore, but I did come across another project: https://github.com/bradmb/smartthings-samsung-tv (Apparently some sort of PI for SmartThings) for Samsung H Series.

                            About the Ziggo Horizon: It's impossible to use UPnP to watch recordings. That's limited too, unfortunately. I will stick to using the PHP remote script I have now. Maybe some day I will try to rewrite it to something more native to HS.

                            I may have found some more additional keys, but haven't had time to test them yet. Should be possible to do so within max. 36 hours.
                            Plugins I developed for HS4: Somfy Local, MiLight (LimitlessLED), Updates, Volvo (VoC), OpenTherm Gateway (OTGW)
                            Running HS4 Pro on Windows 10 Pro on a Synology VM, with Node-RED running as a container.

                            Comment


                              #15
                              Originally posted by Bernold View Post
                              Hi Dirk,

                              Sorry, had some long and exhausting days at work. Good to hear that you're making progress for your own tv. Maybe you don't need it anymore, but I did come across another project: https://github.com/bradmb/smartthings-samsung-tv (Apparently some sort of PI for SmartThings) for Samsung H Series.

                              About the Ziggo Horizon: It's impossible to use UPnP to watch recordings. That's limited too, unfortunately. I will stick to using the PHP remote script I have now. Maybe some day I will try to rewrite it to something more native to HS.

                              I may have found some more additional keys, but haven't had time to test them yet. Should be possible to do so within max. 36 hours.
                              Well, I just tested the keycodes I found, but they don't seem to do anything here. Attached file for future reference.

                              As for the other keys I found earlier: I think it would be nice to add a few to the generate button: KEY_CONVERGENCE (Browser), KEY_DTV_SIGNAL (Search), KEY_HOME (Home), KEY_MORE (123)
                              Attached Files
                              Plugins I developed for HS4: Somfy Local, MiLight (LimitlessLED), Updates, Volvo (VoC), OpenTherm Gateway (OTGW)
                              Running HS4 Pro on Windows 10 Pro on a Synology VM, with Node-RED running as a container.

                              Comment

                              Working...
                              X