Announcement

Collapse
No announcement yet.

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

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

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

    I have just posted the latest HS3 version of drule's IP/Serial Plugin for HS3 here.

    Please use this thread for discussion, the other one will be reserved for updates and further instructions over time.
    cheeryfool

  • #2
    What does this plugin do?
    Hector
    ____________________________________
    Win.2003 OS, HS3
    BLDSC,BLstat,BLRadar,BLRamdom,BLOccupied
    BLups,BLrain8,HSTouch,Ultrajones Weatherbug,
    MyTrigger,ACRF2,W800,Zwave
    AP800,Honeywell Stat

    Comment


    • #3
      Originally posted by Rotech View Post
      What does this plugin do?
      Here are some examples:

      Send (or receive) IP (or serial or IR) commands (or status) to (or from) your TV, projector, receiver, Bluray player, HDMI Matrix, IRule etc etc

      The simplest scenario is adding commands in the config and driving them via an outbound connection in an event. e.g send "VolUp" to your receiver via IP connection 192.168.x.x:xxxx.

      Much more complex scenarios are possible. e.g. Receive "VolUp" text over IP connection from iRule running on an iOS device and pass this directly through to an outbound connection to your receiver.

      Sending IR commands to a GC or IRTrans device should be possible too though I haven't tested that yet with the HS3 version.

      Most of the HS2 functionality is carried over in this version with some tweaks and enhancements. See the HS2 instruction and discussion threads for more back ground

      Hope to have more HS3 docs up soon-ish with drule's assistance
      cheeryfool

      Comment


      • #4
        Sending IR commands to IRTrans LAN unit

        I have also just tested sending IR commands to an IRTrans Lan unit.

        1. Set up an IP connection to the IRTrans - see attachment 1
        2. Set up a IR Command - see attachment 2
        3. Test with an event
        Attached Files
        cheeryfool

        Comment


        • #5
          Originally posted by cheeryfool View Post
          Here are some examples:

          Send (or receive) IP (or serial or IR) commands (or status) to (or from) your TV, projector, receiver, Bluray player, HDMI Matrix, IRule etc etc

          The simplest scenario is adding commands in the config and driving them via an outbound connection in an event. e.g send "VolUp" to your receiver via IP connection 192.168.x.x:xxxx.

          Much more complex scenarios are possible. e.g. Receive "VolUp" text over IP connection from iRule running on an iOS device and pass this directly through to an outbound connection to your receiver.

          Sending IR commands to a GC or IRTrans device should be possible too though I haven't tested that yet with the HS3 version.

          Most of the HS2 functionality is carried over in this version with some tweaks and enhancements. See the HS2 instruction and discussion threads for more back ground

          Hope to have more HS3 docs up soon-ish with drule's assistance
          Thanks cheeryfool! Some examples of what I use the plugin for are:
          1. Send IR commands to a GC-100-18
          2. Control a Shinybow HDMI Matrix Switch
          3. Turn a Samsung TV on/off
          4. Receive IR commands from a GC-IRE
          5. Interact with iRule app on an iPad
          I'm sure there are many more uses. When I created the original HS2 plugin I saw it as being a 'generic' plugin for control of devices over TCP, UDP and/or Serial. If there's already a plugin out there for your particular device, you're almost certainly better of using that. But if you have some unusual piece of kit and want to be able to do some basic control of it from HS, hopefully this plugin will help.

          Comment


          • #6
            Drule can you give some examples of how you are setting the plug in up for the gc-ire

            Thanks ken
            HSPRO,HS3PRO, BLsecurity, , MCSxap, HSTouch Android, UltraGCIR, CM15a, USBUIRT, BLUSBUIRT, WIFIRGB, BLAB8SS, BLcontrol, BLGData, BLLAN,BLOccupied, BLRadar, BLVolume, iTunesDAAP, UltraGCIR3, Airplayspeak, BLalarm, BLbackup, BLLED, BLrandom, BLReminders, BLRF, BL Speech, Hyperion, IFTTT, KINECT, XBMC, MCSprinkers PRO, PHLocation, ULtrapioneer, Ultralog, ultraweatherbug, Z,troller, GC-100, GC WIFICC, GC-WIFI SERIAL, Nitrogen logic depth camera controllers,

            Comment


            • #7
              Originally posted by kenrad View Post
              Drule can you give some examples of how you are setting the plug in up for the gc-ire

              Thanks ken
              My GC-IRE's are connected to a serial server accessed over TCP. However, this should work just fine with them attached directly to a serial port. I send all the received text from the GC-IRE to a pass-thru script. It's the script that then does the 'smarts.'

              Click image for larger version

Name:	ipplugin-gcire01.jpg
Views:	1
Size:	55.2 KB
ID:	1174567

              My pass-thru script iterates through the strings received and matches them with a case statement
              Code:
              'N.B. send 'tc\n' to your GC-IRE before using this script.
              
              Sub Main(Param As Object)
                  Dim Params() As String = Split(Param.ToString, Chr(0))
              	' Param(0) is the name of the plugin's connector
              	' Param(1) is the ip address of the remote end
              	' Param(2) is the data received
                  Dim SplitString() As String = Split(Params(2), Chr(13))
                  For i As Integer = 0 To UBound(SplitString)
                      Select Case SplitString(i)
                          Case "GC-IRE XXXXXXXX"
                              ' Do stuff
                              Exit For
                          Case "GC-IRE YYYYYYYY"
                              ' Do other stuff
                              Exit For
                          Case Else
                              hs.WriteLog("NF", "I don't know what to do with: " & SplitString(i))
                      End Select            
                  Next
              End Sub
              My full script is attached. It's a bit of a messy, work in progress right now! It reads strings from the GC-IRE, compares them to known good codes for a DirecTV STB (+/- 20%) and sends the equivalent SHEF command to the STB via http.

              -David

              Comment


              • #8
                How is it possible to only trigger byte 3 in a 5 byte string?

                Comment


                • #9
                  Originally posted by redleg View Post
                  How is it possible to only trigger byte 3 in a 5 byte string?
                  Can you give an example of what you're trying to trigger on?

                  -David

                  Comment


                  • #10
                    Originally posted by drule View Post
                    Can you give an example of what you're trying to trigger on?

                    -David
                    For example, 0D 11 22 33 44 0D 0A The information that is important to me, byte 4 (33) The other bytes may vary.

                    Another example is with ASCII, 2014-08-12 13:30 test 123 This string "123 test" required information where I want to trigger.

                    sorry for my bad english.

                    Comment


                    • #11
                      Originally posted by redleg View Post
                      For example, 0D 11 22 33 44 0D 0A The information that is important to me, byte 4 (33) The other bytes may vary.

                      Another example is with ASCII, 2014-08-12 13:30 test 123 This string "123 test" required information where I want to trigger.

                      sorry for my bad english.
                      I get it. What you need is a pass-thru script which would look something like:
                      Code:
                      Sub Main(Param As Object)
                          Dim Params() As String = Split(Param.ToString, Chr(0))
                      	' Param(0) is the name of the plugin's connector
                      	' Param(1) is the ip address of the remote end
                      	' Param(2) is the data received
                          Dim SplitString() As String = Split(Params(2), " ")
                          If SplitString(3) = "33" Then
                              hs.TriggerEvent("YourEventName")
                          End If
                      End Sub

                      Comment


                      • #12
                        Originally posted by drule View Post
                        I get it. What you need is a pass-thru script which would look something like:
                        Code:
                        Sub Main(Param As Object)
                            Dim Params() As String = Split(Param.ToString, Chr(0))
                        	' Param(0) is the name of the plugin's connector
                        	' Param(1) is the ip address of the remote end
                        	' Param(2) is the data received
                            Dim SplitString() As String = Split(Params(2), " ")
                            If SplitString(3) = "33" Then
                                hs.TriggerEvent("YourEventName")
                            End If
                        End Sub
                        Thnx!

                        I still get an error with the script. I will continue tomorrow with test. maybe you have another sample for me?

                        I'm going to sleep now

                        Comment


                        • #13
                          GC-100 Confirmed

                          I can confirm that I can use drhsIpPlugIn to control a Panasonic TV through its RS-232C interface attached to a GC-100 serial module.

                          I am not having any luck with local serial ports however.

                          Comment


                          • #14
                            Originally posted by Tim.Kieschnick View Post
                            I can confirm that I can use drhsIpPlugIn to control a Panasonic TV through its RS-232C interface attached to a GC-100 serial module.



                            I am not having any luck with local serial ports however.

                            Hi Tim

                            Can you tell us a bit more about your setup?

                            Just in case you are trying this on Linux, there is a known serial port issue (unrelated to this plugin).

                            If you are in Windows, you should see your local serial ports show up in the Serial Ports tab automatically. Set the port parameters for the device you want to control if they are not the common 9600,8,none,1

                            To use them, choose Serial type in the Connections tab and put the serial port number in the address field. Leave the port field blank

                            Otherwise, usage is the same as for IP connections

                            Cheers
                            cheeryfool

                            Comment


                            • #15
                              Originally posted by Tim.Kieschnick View Post
                              I can confirm that I can use drhsIpPlugIn to control a Panasonic TV through its RS-232C interface attached to a GC-100 serial module.

                              I am not having any luck with local serial ports however.
                              Hi Tim,
                              Are you running Homeseer under Windows or Linux? If Linux, then I'm afraid there are problems with accessing local serial ports though Mono. If Windows, then you have likely found a bug! Let me know and I will take a look and see what I can do.

                              -David

                              Comment

                              Working...
                              X