Announcement

Collapse
No announcement yet.

Samsung TV Remote Control Plug-IN

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

    #16
    Originally posted by dcorsus View Post
    What OS are you using? If XP, did turn SSDP and UPNP services on (they are default on in Win7 and I believe also in Vista).

    Did you activate the plugin? If so can you turn the debug flag on (in the config screen of the plugin), save it and wait for 10 minutes. It should start a new discovery every 10 minutes, would be interesting to see what comes out.

    Dirk
    Forgot to mention, you have to turn "remote Control" on, else UPnP won't be able to discover your BR player.

    For mySettingsGeneralNetwork Remote ControlOn

    Comment


      #17
      Originally posted by norcoscia View Post
      Hi, just loaded the Samsung Remote plug-in (log below). I was thinking it would support my new Samsung E8000 that I just installed. From the log it looks like it found my TV but nothing shows up in the plug-in and no devices are created. Note - I tried the DLNA plug-in and it did find the TV but not really interested in that plug-in (it did not seem to build a useful set of devices for the TV), maybe it is not designed for that. Am I missing something?

      4/1/2012 6:23:12 AM Plug-In Initializing Plug-in: SamsungRemote
      4/1/2012 6:23:12 AM SamsungRemote InitIO Called
      4/1/2012 6:23:12 AM SamsungRemote InitializeUPnPDevices called
      4/1/2012 6:23:12 AM SamsungRemote ReadIniFile has discovered 2 device types to look for
      4/1/2012 6:23:22 AM SamsungRemote CreateUPnPControllers created an instance of UPnPDeviceController for UPnPDevice = [TV]PN60E8000 with index 0
      4/1/2012 6:23:22 AM SamsungRemote Initialized
      4/1/2012 6:23:22 AM Plug-In Finished initializing plug-in SamsungRemote
      It indeed seems to find the TV, wonder whether there is further security/authorization implemented in the newer versions. Did you set the "remote control" allowance? On my 55C8000 it is under SetupWireless Remote ControlOn, check whether there is anything else in TVs setup that indicates DLNA/UPNP or Remote control access/allowance.

      If nothing else works, can you click on the "Samsung Config" button on the top of the HS setup screen, turn debug and superdebug on, click "Save", restart HS and email me the startup log.

      Thanks

      Dirk

      Comment


        #18
        New beta v.04 posted

        Changes to beta v04

        • It appears that not all Samsung TVs support the urn:samsung.com:serviceId:TestRCRService service as part of device urn:samsung.com:device:RemoteControlReceiver:1. As a result, no HS devices are being created. The plugin now by default creates a remote control device when the UPNP subsystem detects the urn:samsung.com:device:RemoteControlReceiver:1 device. This might also be on BluRays

        Comment


          #19
          Originally posted by norcoscia View Post
          Hi, just loaded the Samsung Remote plug-in (log below). I was thinking it would support my new Samsung E8000 that I just installed. From the log it looks like it found my TV but nothing shows up in the plug-in and no devices are created. Note - I tried the DLNA plug-in and it did find the TV but not really interested in that plug-in (it did not seem to build a useful set of devices for the TV), maybe it is not designed for that. Am I missing something?

          4/1/2012 6:23:12 AM Plug-In Initializing Plug-in: SamsungRemote
          4/1/2012 6:23:12 AM SamsungRemote InitIO Called
          4/1/2012 6:23:12 AM SamsungRemote InitializeUPnPDevices called
          4/1/2012 6:23:12 AM SamsungRemote ReadIniFile has discovered 2 device types to look for
          4/1/2012 6:23:22 AM SamsungRemote CreateUPnPControllers created an instance of UPnPDeviceController for UPnPDevice = [TV]PN60E8000 with index 0
          4/1/2012 6:23:22 AM SamsungRemote Initialized
          4/1/2012 6:23:22 AM Plug-In Finished initializing plug-in SamsungRemote
          After looking at your logs, I think I may have figured it out. Download v04 and see if that takes care of the problem.

          Cheers,

          Dirk

          Comment


            #20
            Originally posted by ghostrunner View Post
            So finally I got some time to check this out again.

            I can discover my blu-ray on my android phone... But i can't get it discovered in HS...

            Should I try to reset the plugin ?? And if yes how to do this ?

            Rasmus
            Rasmus, give the new beta a try, if that still doesn't do it, turn superdebug on and email me in private the hs logfile.

            Dirk

            Comment


              #21
              New beta v.05 posted

              Changes to beta v05

              • The TCP/IP connection for the remote wasn't automatically re-established when the TV was power off/on or an error in the socket happened

              Comment


                #22
                Sammy TV control: VB Script for IP / Serial to switch on TV

                Hi dcorsus et al.

                I just discovered this thread and wanted to share some info on a project that drule and I have been working on, itself based on pjnewman's code/post on SamyGo

                We have also been working to solve the lack of integration IP/Serial control that many other manufacturers deem useful for their customers, but Samsung seems to think is unnecessary. drule has converted pjnewman's code to a vb script (code below) that can be called by an HS event to control the Sammy TVs (I believe all C & D series and fully operational on my UN55C8000). We also have a universal IP/Serial plugin in late stage testing that we hope to post soon. I have this listening to commands from iRule (iPhone/iPad etc) and triggering events using the Sammy script. The Optional Parameters of the event are configured in the following format ("Main","KEY_TOOLS"), including parentheses, where the "KEY_TOOLS" is the key that you want to send. The keys are already published in this thread.

                There are some basic and hopefully self-explanatory comments in the code below for configuration of your TV IP address, HS Host MAC address and HS Host IP address. The code does handle the initial registration of the HS IP remote with the TV and is essentially just pretending to be the Sammy iPhone app. There have been several iterations already to the code to handle various situations and we used a lot of wireshark captures to troubleshoot. Please feel free to use/modify. We had designs on turning this in to a plugin but will probably now not duplicate the efforts of dcorsus We'll focus on the other plugins so that we can get those out to the community.


                Code:
                Imports System.Net.Sockets
                    Const mType As String = "drhs_SamsungTV"
                    Const tvip As String = "1.1.1.1"      'Set a static IP address for your TV  and edit this string to match that.
                    Const tvport As Int32 = 55000      'This is the standard port that the TV listens on.  Do not change it.
                    Const mymac = "00-00-00-00-00-00"     ' Enter your HS host MAC address here.  This is used for the access control/validation, but not after that AFAIK
                    Const appstring = "iphone..iapp.samsung" ' What the iPhone app reports
                    Const tvappstring = "iphone.UN55C8000.iapp.samsung" ' Might need changing to match your TV type
                    Const remotename = "Homeseer Samsung Remote" ' What gets reported when it asks for permission/also shows in General->Wireless Remote Control menu
                
                    Public Sub Main(ByVal Params As Object)
                        If Params IsNot Nothing Then
                            Dim tcpClient As New System.Net.Sockets.TcpClient()
                            tcpClient.Connect(tvip, tvport)
                            Dim networkStream As NetworkStream = tcpClient.GetStream()
                            If networkStream.CanWrite Then
                                Dim Messagepart3 As String = ""
                                Dim ByteArrayOut() As Byte = StrToByteArray(MessagePart1)
                                networkStream.Write(ByteArrayOut, 0, ByteArrayOut.Length)
                                ByteArrayOut = StrToByteArray(MessagePart2)
                                networkStream.Write(ByteArrayOut, 0, ByteArrayOut.Length)
                                Dim argv As String() = Params.ToString.Split("|")
                                If Left(UCase(argv(0)),4) = "KEY_" Then
                                    Dim mp3 As String = Chr(0) & Chr(0) & Chr(0) & Chr(Len(Base64Encode(argv(0)))) & Chr(0) & Base64Encode(argv(0))
                                    MessagePart3 = Chr(0) & Chr(Len(tvappstring)) & Chr(0) & tvappstring & Chr(Len(mp3)) & Chr(0) & mp3
                                Else
                                    Dim mp3 As String = Chr(1) & Chr(0) & Chr(0) & Chr(Len(Base64Encode(argv(0)))) & Chr(0) & Base64Encode(argv(0))
                                    MessagePart3 = Chr(1) & Chr(Len(tvappstring)) & Chr(0) & tvappstring & Chr(Len(mp3)) & Chr(0) & mp3
                                End If
                                ByteArrayOut = StrToByteArray(MessagePart3)
                                networkStream.Write(ByteArrayOut, 0, ByteArrayOut.Length)
                                networkStream.Close()
                                tcpClient.Close()
                            End If
                        End If
                    End Sub
                
                    Private Function MessagePart1() As String
                        'Dim myip As String = hs.GetIPAddress ' Doesn't seem to be really used
                        Dim myip as String = "2.2.2.2"   'Set your HS Host IP address here
                        Dim messagepart1x As String = Chr(&H64) & Chr(0) & Chr(Len(Base64Encode(myip))) & Chr(0) & Base64Encode(myip) & Chr(Len(Base64Encode(mymac))) & Chr(0) & Base64Encode(mymac) & Chr(Len(Base64Encode(remotename))) & Chr(0) & Base64Encode(remotename)
                        Dim part1 As String = Chr(0) & Chr(Len(appstring)) & Chr(0) & appstring & Chr(Len(messagepart1x)) & Chr(0) & messagepart1x
                        Return part1
                    End Function
                
                    Private Function MessagePart2() As String
                        Dim messagepart2x As String = Chr(&HC8) & Chr(0)
                        Dim part2 As String = Chr(0) & Chr(Len(appstring)) & Chr(0) & appstring & Chr(Len(messagepart2x)) & Chr(0) & messagepart2x
                        Return part2
                    End Function
                
                    Private Function Base64Encode(ByVal InputString As String)
                        Dim byt As Byte() = System.Text.Encoding.UTF8.GetBytes(InputString)
                        Return Convert.ToBase64String(byt)
                    End Function
                
                    Private Function StrToByteArray(str As String) As Byte()
                	Dim ByteArray(Len(str)-1) as Byte
                	For n As Short = 0 To UBound(ByteArray)
                		ByteArray(n) = Asc(Mid(str,n + 1,1))
                	Next
                	Return ByteArray
                    End Function
                How to switch the TV on.
                As many have discovered there is no way to turn on most of the Sammy TVs using IP (their own iPhone app can't do it!). However, you can turn on many of them using a serial command via the ex-link port. There is a lot of chat about having to switch on Hotel Mode via the extended menus but that certainly wasn't necessary on my C8000. You can buy a Serial to 3.5mm cable with the correct pin-outs from Amazon. I actually have a custom 3.5mm to RJ45 cable at the TV end, then a standard CAT5 run to the wiring closet and a RJ45 to Serial cable at the HS server end. Thanks again drule for the custom cables

                The correct serial string is: 0x08 0x22 0x00 0x00 0x00 0x02 0xd4 I am sending this using the same universal IP/Serial plugin that I mentioned above. There are several more basic serial commands posted on various forums, but I am only using the Power On, preferring to use the much wider range of controls available over IP.

                That's about it. Thanks again to dcorsus for his plugin and drule/pjnewman for the script.
                cheeryfool

                Comment


                  #23
                  Originally posted by cheeryfool View Post
                  How to switch the TV on.
                  As many have discovered there is no way to turn on most of the Sammy TVs using IP (their own iPhone app can't do it!). However, you can turn on many of them using a serial command via the ex-link port. There is a lot of chat about having to switch on Hotel Mode via the extended menus but that certainly wasn't necessary on my C8000. You can buy a Serial to 3.5mm cable with the correct pin-outs from Amazon. I actually have a custom 3.5mm to RJ45 cable at the TV end, then a standard CAT5 run to the wiring closet and a RJ45 to Serial cable at the HS server end. Thanks again drule for the custom cables
                  Thanks cheeryfool for your posting. Isn't it a bummer that most devices don't have an implementation to turn them on, despite the fact that the IR port and Serial ports are active in standby mode. To add insult to injury, I have a Sony Network Media Player SMP-N200, which has a mode to "fast power up". As per their help, when set to on, the device comes on quicker but uses more power in standby mode. Upon investigation, I can see that the Ethernet port remains active, I can ping the device when powered down. However, its UPnP interface is down, it is not responding to WOL packets so what good is it doing (uurgghh).

                  The same Samsung Remote functions are added to my other plugin (DLNA Manager), the newer Samsung TVs do have a UPnP interface and through that some other basic functions like volume, contrast can be set and you would know what they are set to.

                  I wonder if anybody has used the message service that was built in, I guess in absence of a help file, it might be hard to figure out. What i couldn't figure out on my UNC8000 was how to pull up messages, delete them etc.

                  Cheers,

                  Dirk

                  Comment


                    #24
                    Originally posted by dcorsus View Post
                    Rasmus, give the new beta a try, if that still doesn't do it, turn superdebug on and email me in private the hs logfile.

                    Dirk
                    Just tested.
                    But it didn't change anything.
                    I've sent you the logfile. But it seems it doesn't se it at all.

                    Rasmus

                    Comment


                      #25
                      Originally posted by ghostrunner View Post
                      Just tested.
                      But it didn't change anything.
                      I've sent you the logfile. But it seems it doesn't se it at all.

                      Rasmus
                      Rasmus, the log you sent me doesn't show a bluray at all, so you either have not turned remote allowance on in the blu-ray settings, or it is not network connected or it is not DLNA capable. Did you android phone find it by itself or did you have to tell it what IP adress it has? Is does not respond to SSDP which is as basic DLNA as it gets. So check settings on that box, see if you can ping its IP address from the PC you run this plugin on, try to power cycle it (mine seem to get stuck on occasion and it only come out of it by physically removing the power).

                      What model number is the BR?

                      It does show an active connection to a Samsung TV

                      Dirk

                      Comment


                        #26
                        Originally posted by dcorsus View Post
                        Rasmus, the log you sent me doesn't show a bluray at all, so you either have not turned remote allowance on in the blu-ray settings, or it is not network connected or it is not DLNA capable. Did you android phone find it by itself or did you have to tell it what IP adress it has? Is does not respond to SSDP which is as basic DLNA as it gets. So check settings on that box, see if you can ping its IP address from the PC you run this plugin on, try to power cycle it (mine seem to get stuck on occasion and it only come out of it by physically removing the power).

                        What model number is the BR?

                        It does show an active connection to a Samsung TV

                        Dirk
                        Hey Dirk.

                        My android phone found it by itself.
                        I can ping it from the pc.
                        I have tried to power cycle it.
                        I have only found one setting for remote allowance and it's on.

                        The model is: HT-D6750

                        By the way it's a "Home Theater" system and not just a BlueRay player, but I still think it should be possible ?

                        And yep the tv is working fine

                        Rasmus

                        Comment


                          #27
                          Originally posted by ghostrunner View Post
                          Hey Dirk.

                          My android phone found it by itself.
                          I can ping it from the pc.
                          I have tried to power cycle it.
                          I have only found one setting for remote allowance and it's on.

                          The model is: HT-D6750

                          By the way it's a "Home Theater" system and not just a BlueRay player, but I still think it should be possible ?

                          And yep the tv is working fine

                          Rasmus
                          Rasmus, doing some googling right now, saw it advertized somewhere as DLNA all-share compliant so I'm a bit mystified as why UPNP doesn't discover it. You sure it was turned on when you did the discovery

                          If it is a home theater, you may be better off installing the DLNA-Manager, but if UPnP doesn't "see" it, neither will the DLNA plugin so we need to figure out why.

                          Do you by any chance have a Win7 machine on the same Lan? If so, does it show up under your network devices and/or show up in Windows Media Player (v12 required and right options set to discover/control other devices).

                          Dirk

                          Comment


                            #28
                            Hey

                            Just tried to other dlna apps (Skifta & iMediaShare).

                            They can't see the HT-D6750 either.

                            So it's only Samsung own app that can see it...

                            Comment


                              #29
                              Originally posted by ghostrunner View Post
                              Hey

                              Just tried to other dlna apps (Skifta & iMediaShare).

                              They can't see the HT-D6750 either.

                              So it's only Samsung own app that can see it...
                              They would still need some mechanism to "find" the device. Wonder what sort of broadcast mechanism they use.
                              Googling didn't show anything

                              Dirk

                              Comment


                                #30
                                Dirk
                                I finally had a chance to install and play with the Remote Plugin yesterday. After a couple of dumb missed steps (forgetting to turn the TV on!! / granting access to the new 'remote' via the TV UI) I see the 2 devices and a lot of buttons on Remote Service device.

                                I have a couple of questions:

                                1. I don't see a button for the "Internet @TV" menu. However, I am not sure which of the 'KEY_xxxx' commands brings this up anyway. Do you know? Perhaps KEY_ENTERTAINMENT or KEY_APP_LIST. I'll give it a shot from my plugin tonight to see if I can figure out which one it is.

                                2. When I go to add an event, I don't see the Samsung Remote in the 'Add Action' dropdown. Many other plugins show directly in this list and then you can choose the actual command (a list of buttons for this plugin). I also tried the generic 'Device Action' option and when I choose the Samsung Remote, it just gives me the On/Off commands.
                                Do you think that something didn't install correctly, or perhaps this is on the to-do or wish lists?

                                I know I can use the script that you provided (or the one that we built) but being able to directly call the commands from an event is definitely something that I would like to be able to do.

                                Many thanks
                                James 'Cheeryfool'
                                cheeryfool

                                Comment

                                Working...
                                X