Announcement

Collapse
No announcement yet.

IP / Serial Plugin for HS3 (by "drule") - Discussion Thread

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

    queued commands with timeout or required response!

    Hi,

    First off - your plugin rocks. It is at the heart of an HS3 + Alexa + irule control system.

    Now - here's where I need some guidance.
    - I have an obscure matrix amplifier (Xantech MX-88) that is controlled by an iTachIP2SL.
    - I can successfully send commands to it and receive them via your plugin.
    - For a variety of reasons, I must do this from script.
    - When the MX88 receives and executes a command, it responds with "OK"

    But it is very sensitive to timing.
    Right now, I am inserting a delay between every string I send to the unit.
    Code:
    Threading.Thread.Sleep(1500)
    But in order to ensure this works reliably I have to set it to a very high value.
    What would be much better is to say:
    1. Send STRING to Plugin...with required response STRING and a TIMEOUT Value. The plugin will queue any further commands/strings.
    2. If either the response string is received or the timeout is reached, unblock and allow the next string/command to be released


    Alternately, a Synchronous IP Call, with a timeout, that blocked my next lines of code until a response was received, or a timeout hit.

    Is this or anything close, doable?

    Comment


      Sharp TV working

      Originally posted by ppajko View Post
      Sharp Aquos 2015 model with IP control, I cannot get this to work through this plugin, when I try through putty raw tcp then it works.
      How should I configure everything? Thanks
      I am replying to a post that is 17 months old but I did not see a solution posted. I have this plug-in controlling my Sharp TV. I have attached the settings I am using to make it work.

      Be sure that all commands are 8 characters long before \r. So RCKY57 would be RCKY57 \r with 2 spaces before \r. POWR1 would need 3 spaces before \r. This is very important.

      The Netflix command did not work on my TV so I programmed it into Favorites 3 and use that command to activate Netflix.
      Attached Files

      Comment


        iRule Basic Setup Help

        It appears that I am doing something incorrect with my initial iRule setup. On my HS3 machine I have the drhsIpPlugIn set up to be a TCP host and entered the IP 0.0.0.0/0 for indiscriminate multiple connections on port 7777. When I start the connection the log shows that it is running with no errors.

        On my iPhone I have entered the IP of the HS3 machine as the Network Gateway on port 7777, but when I click on the Devices button and Add a Device, there are no devices listed to add.

        Hoping to get some assistance with this.

        Thanks
        Attached Files

        Comment


          Quick help GC100 serial connection

          Hello again - sorry but still learning... I am attempting to connect to my LG Tv's service port via a serial connection. Can anyone provide me with the basic steps to accomplish this using a GC100 serial interface. I appreciate your support and for help out this newbee...

          Comment


            Originally posted by sjz26 View Post
            Hello again - sorry but still learning... I am attempting to connect to my LG Tv's service port via a serial connection. Can anyone provide me with the basic steps to accomplish this using a GC100 serial interface. I appreciate your support and for help out this newbee...
            You need to start by creating a "Connection". In the connections tab, add an entry. Type = TCP, Host/Client = Client, IP address = the IP of your GC100, port = 4999 (if using the first serial port on the GC100, 5000 if using the second port), IR receive type = N/A, proxy and script should be empty, Persist shouldn't matter for a GC100 but commands might be a little quicker if it is set to on.

            Then go to the "Commands" tab and add entries for the specific commands you wish to send, e.g.., power on, power off, vol up, etc.. I'm not familiar with the LG commands, I have a Samsung myself, do you have a list of commands and if so, do you need help figuring out the correct format for the plugin?

            Once the plugin is configured, you can create events whose actions can send the commands to the GC100.

            -David

            Comment


              Originally posted by skavan View Post
              Hi,

              First off - your plugin rocks. It is at the heart of an HS3 + Alexa + irule control system.

              Now - here's where I need some guidance.
              - I have an obscure matrix amplifier (Xantech MX-88) that is controlled by an iTachIP2SL.
              - I can successfully send commands to it and receive them via your plugin.
              - For a variety of reasons, I must do this from script.
              - When the MX88 receives and executes a command, it responds with "OK"

              But it is very sensitive to timing.
              Right now, I am inserting a delay between every string I send to the unit.
              Code:
              Threading.Thread.Sleep(1500)
              But in order to ensure this works reliably I have to set it to a very high value.
              What would be much better is to say:
              1. Send STRING to Plugin...with required response STRING and a TIMEOUT Value. The plugin will queue any further commands/strings.
              2. If either the response string is received or the timeout is reached, unblock and allow the next string/command to be released


              Alternately, a Synchronous IP Call, with a timeout, that blocked my next lines of code until a response was received, or a timeout hit.

              Is this or anything close, doable?
              A synchronous call with timeout is a good idea and shouldn't difficult to implement. I assume you are using Ext_Send_Command and/or Ext_Send_Data from your script?

              I'll have a look at adding Ext_Send_Command_Sync and Ext_Send_Data_Sync as new features.

              -David

              Comment


                do these look correct? Ive seen some string alot longer....

                rand Description Command Port [Moxa] Terminator
                LG Power ON ka 01 01 4001 CR
                LG Power OFF ka 01 00 4001 CR
                LG Energy Saving - OFF jq 01 00 4001 CR

                Comment


                  Originally posted by sjz26 View Post
                  do these look correct? Ive seen some string alot longer....

                  rand Description Command Port [Moxa] Terminator
                  LG Power ON ka 01 01 4001 CR
                  LG Power OFF ka 01 00 4001 CR
                  LG Energy Saving - OFF jq 01 00 4001 CR
                  For Power ON, try a command in C-Escaped format "ka 01 01\n"

                  Comment


                    Originally posted by drule View Post
                    For Power ON, try a command in C-Escaped format "ka 01 01\n"
                    I forgot to say: you may need to go to the web interface of your GC100 and make sure the serial settings of the port match your TV's requirements. E.g. 9600-8-n-1, or whatever they may be.

                    -David

                    Comment


                      Hi Everyone...

                      I've read through this entire thread including the instruction PDF for configuring this to work with iRule and have had no luck in getting this to control any of my HS devices. I know I can create a device and control it through JSON, but that requires an HTTP gateway. This plugin uses a network gateway so what command do you use to control a HS device through this plugin using a network gateway?

                      Thanks!

                      Comment


                        Found the answer to my initial question in a different thread on this topic. I can now control an HS device from iRule. However I'm still unable to get feedback to work. I can see my event firing to send messages to iRule, but I get no visual indication in iRule that my device is on. For the most part, I don't care about % values. I just want to see the visual indicator that a light is on or off.

                        Comment


                          Thanks for the great plugin.

                          I was hoping you could help me with a scripting issue I'm having trying to control a Denon Receiver.
                          This image my receiver but my vb script doesn't. I'm using the same command 'TRXMUP\r' for the parm in my script.



                          PHP Code:
                          Sub Main(parm As String)
                              
                              
                          Dim cmd As String parm "\r"
                              
                          hs.PluginFunction("drhsIpPlugin""""Ext_Send_Command", New Object() {"Denon Receiver"cmd})
                              
                          Log("Attempting to pass command " cmd " to Denon Receiver")
                              
                          End Sub 
                          Attached Files
                          Don

                          Comment


                            bump

                            Anyone with a suggestion?
                            Don

                            Comment


                              Originally posted by wposner View Post
                              Found the answer to my initial question in a different thread on this topic. I can now control an HS device from iRule. However I'm still unable to get feedback to work. I can see my event firing to send messages to iRule, but I get no visual indication in iRule that my device is on. For the most part, I don't care about % values. I just want to see the visual indicator that a light is on or off.
                              Could you post your config or a link to the thread you used to set-up?

                              I can't get my iRule working either

                              Comment


                                Originally posted by donstephens View Post
                                Thanks for the great plugin.

                                I was hoping you could help me with a scripting issue I'm having trying to control a Denon Receiver.
                                This image my receiver but my vb script doesn't. I'm using the same command 'TRXMUP\r' for the parm in my script.



                                PHP Code:
                                Sub Main(parm As String)
                                    
                                    
                                Dim cmd As String parm "\r"
                                    
                                hs.PluginFunction("drhsIpPlugin""""Ext_Send_Command", New Object() {"Denon Receiver"cmd})
                                    
                                Log("Attempting to pass command " cmd " to Denon Receiver")
                                    
                                End Sub 
                                Hi, not sure if it will help, but I just noticed the format is different to what you are using. Try the C Escaped version.

                                Comment

                                Working...
                                X