Announcement

Collapse
No announcement yet.

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

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

    Originally posted by mikee123 View Post
    I am trying to control a HS3 device via iRule. I think that might be possible with this plugin, but I have no idea how to. If I could trigger a HS3 event that would help too, ideally I want to be able to turn a device on or off. I have looked but what I have found either I do not understand or it doesn't work. I found a json route on the irule forum, I tried it but it did not switch the device, and did not get any response on the irule forum.

    I am using iRule with Global Cache iTach and iTach flex.


    Mike. Yes you can definitely do this. You can also get feedback from HS3 to iRule. Problem is, I haven't used iRule in ages. Let me see what I can find and I'll see if I can reach 'drule' -the author - as I know he was and may still be using iRule with this plugin.
    cheeryfool

    Comment


      That would be great. I used to have feedback with Vera, so that would be a bonus but the simple on/off would already help a lot !

      Comment


        I have got the device control working from iRule. I had a problem with the gateway configuration, once corrected its working fine.
        At the moment I use a virtual switch to trigger a event from iRule. It works fine but it would be neater to trigger the event directly from iRule. I think that is possible, maybe someone knows how to do that ?
        I am using the json to control the devices, for example

        JSON?request=controldevicebyvalue&ref=283&value=100

        so I guess there might be a similar way to trigger events
        Last edited by mikee123; June 17, 2016, 02:55 AM.

        Comment


          Originally posted by mikee123 View Post
          I have got the device control working from iRule. I had a problem with the gateway configuration, once corrected its working fine.
          At the moment I use a virtual switch to trigger a event from iRule. It works fine but it would be neater to trigger the event directly from iRule. I think that is possible, maybe someone knows how to do that ?
          I am using the json to control the devices, for example

          JSON?request=controldevicebyvalue&ref=283&value=100

          so I guess there might be a similar way to trigger events
          All of the JSON syntax and commands are in the SDK here http://homeseer.com/support/homeseer..._with_json.htm so

          JSON?request=runevent&group=GROUPNAME&name=EVENTNAME

          if you want to run an event...

          Comment


            OK I have programmed this

            JSON?request=runevent&group=Test&name=Test2

            with the event group being Test, the event to launch Test2. I will see tonight if that works. I was looking at your link, and having never used json I got this question. If I wanted to get the status of a device with ref 100, I would change

            /JSON?request=getstatus&ref=##&location1=LOC1&location2=LOC2

            to

            /JSON?request=getstatus&ref=100 ?

            that would then get me a response as ON or OFF ?

            Comment


              Originally posted by mikee123 View Post
              OK I have programmed this

              JSON?request=runevent&group=Test&name=Test2

              with the event group being Test, the event to launch Test2. I will see tonight if that works. I was looking at your link, and having never used json I got this question. If I wanted to get the status of a device with ref 100, I would change

              /JSON?request=getstatus&ref=##&location1=LOC1&location2=LOC2

              to

              /JSON?request=getstatus&ref=100 ?

              that would then get me a response as ON or OFF ?
              Unfortunately it will not give you a simple on/off, it will give you that data but in and around the JSON return similar to what you see in the description section of the document. Depending on what you want to do with this data depends on how you need to parse it for the status, this for example is one from my lamps;

              Code:
              {"Name":"HomeSeer Devices","Version":"1.0","Devices":[{"ref":101,"name":"Desk Lamp","location":"Back Bedroom","location2":"","value":0,"status":"Off","device_type_string":"X10","last_change":"\/Date(1466114027058)\/","relationship":0,"hide_from_view":false,"associated_devices":[340],"device_type":{"Device_API":0,"Device_API_Description":"No API","Device_Type":4,"Device_Type_Description":"Type 4","Device_SubType":0,"Device_SubType_Description":""},"device_image":"","UserNote":"","UserAccess":"Any","status_image":"/images/HomeSeer/status/off.gif"}]}
              Now you can see the status is there but buried with the other stuff, if you did absolutely need a simple on/off return then it might be possible to write a very simple ASP page (someone can help with this) that would return the device status if you called it with a URL and passed in the device reference.

              Comment


                Ok it'll take me quite a while until I can possibly use it. I was thinking well ahead as this might be a way to provide status feedback for my devices in iRule. But even if it was a simple On/Off response I am not sure yet how to use it. So good to know for future reference. But that also means with this request I can get a lot of data, I just have to parse it for what I need.

                Comment


                  Newbi on this - Zee S2?

                  Howdy, a bit new to HomeSeer. I happen to have a HomeSeer Zee S2. Any chance this "plugin" can be used on Zee S2? If so, where to place the plugin, and where is the .ini file mentioned? Or is it created at start or something?

                  Comment


                    Originally posted by larhedse View Post
                    Howdy, a bit new to HomeSeer. I happen to have a HomeSeer Zee S2. Any chance this "plugin" can be used on Zee S2? If so, where to place the plugin, and where is the .ini file mentioned? Or is it created at start or something?
                    Hi. Yes this should work on the Zee S2, unless you've already reached your 5 plugin limit on the Zee.

                    You put the plug-in in the root Homeseer directory.

                    You don't need an ini file, it will create one automatically when you start configuring things.

                    One thing to note, direct serial connections are not supported in Unix, due to issues with HS3 and Mono. However, you can use a serial/IP server and then setup an IP connection to that, which will translate to serial to the end device.
                    cheeryfool

                    Comment


                      How very excellent, finally I figured it out all thanks to Your response. I got a bit mixed up with all directories and finally decided to test /usr/local/HomeSeer/ - and when I copied the file to that location it all just worked. Well I have not tested it yet - but at least I could activate it.

                      Very large thanks :-)

                      Comment


                        I am trying to locate the ini file that has the Monoprice HDMI switch. I am disgruntled Vera user evaluating Homeseer and I need to be able to control my HDMI switch as it is all located in a different room. Currently using a serial plugin in Eventghost to control the switch via serial and an iTach IP2SL box.

                        I have been using VSPE for years but noticed here that perhaps I should also send directly to the IP of my iTach box?

                        Any help would greatly help as I only have 11 days left in my trial. Most likely going to make the move anyway but it would nice to have this sorted b4 I make the leap.
                        Cheers!
                        Darren

                        Comment


                          Originally posted by WinoOutWest View Post
                          I am trying to locate the ini file that has the Monoprice HDMI switch. I am disgruntled Vera user evaluating Homeseer and I need to be able to control my HDMI switch as it is all located in a different room. Currently using a serial plugin in Eventghost to control the switch via serial and an iTach IP2SL box.

                          I have been using VSPE for years but noticed here that perhaps I should also send directly to the IP of my iTach box?

                          Any help would greatly help as I only have 11 days left in my trial. Most likely going to make the move anyway but it would nice to have this sorted b4 I make the leap.
                          Cheers!
                          Darren
                          Hey Darren

                          You don't need an ini file to get started with this. As soon as you start adding configs it will create the file to store them in. However, I have attached a partial file that includes the connection and some of the commands for the MonoPrice Matrix.

                          1. Yes, definitely setup a direct IP connection to your IP2SL.
                          2. Create drhsIpPlugIn.ini from the excerpt below and save it in the \HS3Root\Config directory
                          3. Disable/Re-enable the Plugin
                          4. Modify the IP/Port in the Connections tab to match your IP2SL

                          PHP Code:
                          [Settings]
                          open=checked
                          [Connections]
                          Monoprice HDMI Switch Control=Client,TCP,192.168.1.223,4000,,,0,,<N/A>
                          [
                          Commands]
                          Monoprice HMDI Switch A1=Binary,0x0 0xFF 0xD5 0x7B
                          Monoprice HMDI 
                          Switch A2=Binary,0x1 0xFE 0xD5 0x7B
                          Monoprice HMDI 
                          Switch A3=Binary,0x2 0xFD 0xD5 0x7B
                          Monoprice HMDI 
                          Switch A4=Binary,0x3 0xFC 0xD5 0x7B
                          Monoprice HMDI 
                          Switch B1=Binary,0x4 0xFB 0xD5 0x7B
                          Monoprice HMDI 
                          Switch B2=Binary,0x5 0xFA 0xD5 0x7B
                          Monoprice HMDI 
                          Switch B3=Binary,0x6 0xF9 0xD5 0x7B
                          Monoprice HMDI 
                          Switch B4=Binary,0x7 0xF8 0xD5 0x7B
                          Monoprice HMDI 
                          Switch C1=Binary,0x8 0xF7 0xD5 0x7B
                          Monoprice HMDI 
                          Switch C2=Binary,0x9 0xF6 0xD5 0x7B
                          Monoprice HMDI 
                          Switch C3=Binary,0xA 0xF5 0xD5 0x7B
                          Monoprice HMDI 
                          Switch C4=Binary,0xB 0xF4 0xD5 0x7B
                          Monoprice HMDI 
                          Switch D1=Binary,0xC 0xF3 0xD5 0x7B
                          Monoprice HMDI 
                          Switch D2=Binary,0xD 0xF2 0xD5 0x7B
                          Monoprice HMDI 
                          Switch D3=Binary,0xE 0xF1 0xD5 0x7B
                          Monoprice HMDI 
                          Switch D4=Binary,0xF 0xF0 0xD5 0x7B 
                          I currently only have the switch commands in this config, not the on/off memory etc, but I think those are posted on the MonoPrice website

                          cheers
                          James
                          cheeryfool

                          Comment


                            I also just noticed that the plugin seems to support http commands.
                            This would REALLY make my transition to HS easy if I can get it working. Is there a document etc on syntax and settings?

                            When I paste this into a browser it sends the command and does what I want it to do:
                            http://192.168.2.220/?hdmiPower

                            I've attached the connection and command I have setup to test this. It doesn't appear to be sending correctly when I use an event to run the command.
                            What am I missing?
                            Cheers!
                            Attached Files

                            Comment


                              Originally posted by cheeryfool View Post
                              Hey Darren

                              You don't need an ini file to get started with this. As soon as you start adding configs it will create the file to store them in. However, I have attached a partial file that includes the connection and some of the commands for the MonoPrice Matrix.

                              1. Yes, definitely setup a direct IP connection to your IP2SL.
                              2. Create drhsIpPlugIn.ini from the excerpt below and save it in the \HS3Root\Config directory
                              3. Disable/Re-enable the Plugin
                              4. Modify the IP/Port in the Connections tab to match your IP2SL

                              I currently only have the switch commands in this config, not the on/off memory etc, but I think those are posted on the MonoPrice website

                              cheers
                              James
                              Awesome!!
                              Thanks James - works like a charm now!

                              Comment


                                This plugin is AWESOME!
                                My wheels are turning: I am having issues with the BLOnkyo plugin as it is not sending the commands to my older Integra receivers that I am controlling via RS232 and an IP-->RS232 device and VSPE. I tested it with a script that I got and it works fine so I am wondering if anyone can help me get one command into this plugin and I will be able to figure out the rest. It will be waaay easier to control it from this plugin than creating a bunch of scripts.

                                here is the script that is currently working:
                                sub main()
                                Dim PortNumber
                                PortNumber=4
                                hs.OpenComPort PortNumber,"9600,n,8,1",1,"",""
                                hs.SendToComPort PortNumber, "!1PWR01" & vbcr
                                hs.closeComPort PortNumber
                                end sub

                                If I can bypass the VSPE and send directly to the IP-->RS232 device then even better!

                                Can anyone help me get this command created in this plugin?
                                Cheers!
                                Darren

                                Comment

                                Working...
                                X