Announcement

Collapse
No announcement yet.

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

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

    Hi David,

    Did you get my PM ?

    Best regards,
    Fischi

    Comment


      New version posted here

      Fixes a bug that was causing the plugin to attempt to read data from a tcp host connection after the remote client had closed the connection.
      cheeryfool

      Comment


        Originally posted by Fischi View Post
        Hi David,

        Did you get my PM ?

        Best regards,
        Fischi
        I've just emailed you something to try.

        Comment


          eth484 inputs are working fine.
          But I also want to operate the relay with an device.
          So I created an device with 2 script buttons.
          I assume I have to add a new connection for the eth484 and make it a client? (eth484_1_R)

          Then in the script on an ON command from the device it is executing this:
          hs.PluginFunction("drhsIpPlugin", "", "Ext_Send_Data", New Object() {"eth484_1_R", "0x20 0x01", "Binary"})
          But the relay does not go ON.
          What am I doing wrong?

          Found the problem. Had to add the time for pulsed output, so 0x20 0x01 0x00 is the right code to set the relay.
          Last edited by peterpc; October 27, 2015, 04:17 PM.
          Peter

          http://ohh.pcgsm.nl

          Comment


            Originally posted by drule View Post
            Now there's an interesting question! The very early version of this plugin was a simple tcp host that listened for strings. I wrote it for the purpose of being able to send "commands" from iRule into HS but tried to keep it generic enough so that it might be useful for other things too.

            Initially I was using it to send strings such as "iRule00" & "iRule01" to HS, which would then trigger events. That event might have multiple actions, eg., turn the TV on, dim the lights, change the input on my HDMI switch, etc.. I'm a big Insteon user so I would probably use the term "scene" to describe my HS events.

            At first, I had HS control everything. I view it as a Rosetta Stone of home automation. I didn't use iRule to change channel on the TV for instance, because HS could already do that for me and why configure something twice? However, over time I keep changing my mind back and forth on that one :-) iRule is better at somethings than HS so why not have it do them? So what I've ended up with is a mishmash, an ever changing mishmash. For instance, on my main TV I have a Sonos playbar. iRule's Sonos plugin isn't to my liking but dcorsus's Sonos plugin for HS is superb. Therefore I have an iRule button than sends a string to HS, which triggers an event to control the Sonos volume via dorcus's plugin.

            As far sending stuff back to iRule from HS, my initial thought was to use an HS event triggered by say a light switch changing dim level, to send data to an iRule feedback construct. Unfortunately, I haven't had the time to fully implement it in my own iRule setup and consequently I suspect that there's a bunch of fine-tuning required that I haven't yet seen. I welcome other people's thoughts and observations on how this can be improved.

            So, sorry but I haven't really answered your question about a recommended approach!

            -David
            Good news...
            Have Created a Device & Feedbacks in iRule and it's working well with your terrific plugin and Homeseer. Lights switching on off and dimming, SONOS messages flying around! It's good!

            One little question...right now, to parse inbound messages, I have created a script which I have attached to the connection. I think, for cleanliness, I'd rather attach a script to the "Received Trigger" event, but it demands a "String Received" -- and since I don't know what the string received will be...it doesn't work! Is there a wildcard one can enter into this field (I tried *, - doesnt work!). Alternately, would you consider adding a trigger (say, Connection Message Trigger) that didn't need a "String Received" parameter, and passed the same array of parameters into the params object as you do when we run a script attached to a connection?

            Not that big a deal I suppose, but would be cool.

            Attached is an iRule screenshot!
            Attached Files

            Comment


              Originally posted by skavan View Post
              Good news...
              Have Created a Device & Feedbacks in iRule and it's working well with your terrific plugin and Homeseer. Lights switching on off and dimming, SONOS messages flying around! It's good!

              One little question...right now, to parse inbound messages, I have created a script which I have attached to the connection. I think, for cleanliness, I'd rather attach a script to the "Received Trigger" event, but it demands a "String Received" -- and since I don't know what the string received will be...it doesn't work! Is there a wildcard one can enter into this field (I tried *, - doesnt work!). Alternately, would you consider adding a trigger (say, Connection Message Trigger) that didn't need a "String Received" parameter, and passed the same array of parameters into the params object as you do when we run a script attached to a connection?

              Not that big a deal I suppose, but would be cool.

              Attached is an iRule screenshot!
              That is a very nice iRule layout. Far better than anything I have ever built! Congrats
              cheeryfool

              Comment


                Originally posted by cheeryfool View Post
                That is a very nice iRule layout. Far better than anything I have ever built! Congrats
                Thanks...what I lack in homeseer smarts, I make up for in Photoshop!

                Comment


                  Originally posted by peterpc View Post
                  Found the problem. Had to add the time for pulsed output, so 0x20 0x01 0x00 is the right code to set the relay.
                  Great, glad you got it working :-)

                  -David

                  Comment


                    Originally posted by skavan View Post
                    One little question...right now, to parse inbound messages, I have created a script which I have attached to the connection. I think, for cleanliness, I'd rather attach a script to the "Received Trigger" event, but it demands a "String Received" -- and since I don't know what the string received will be...it doesn't work! Is there a wildcard one can enter into this field (I tried *, - doesnt work!). Alternately, would you consider adding a trigger (say, Connection Message Trigger) that didn't need a "String Received" parameter, and passed the same array of parameters into the params object as you do when we run a script attached to a connection?

                    Not that big a deal I suppose, but would be cool.
                    A very nice iRule layout indeed.

                    OK, I've added a Connection Message Trigger as you suggested, to trigger an event whenever data is received, regardless of content. I've also added a corresponding "send data to script" action, that will send the last data received by a connection to the specified script with the same parameter object format as a pass-thru script. The two can be used independently or together.

                    PM me your email address and I'll send you the new version to test before it gets posted on here.

                    Cheers
                    -David

                    Comment


                      Originally posted by drule View Post
                      A very nice iRule layout indeed.

                      OK, I've added a Connection Message Trigger as you suggested, to trigger an event whenever data is received, regardless of content. I've also added a corresponding "send data to script" action, that will send the last data received by a connection to the specified script with the same parameter object format as a pass-thru script. The two can be used independently or together.

                      PM me your email address and I'll send you the new version to test before it gets posted on here.

                      Cheers
                      -David
                      very cool. will do and thanks.

                      s.

                      Comment


                        Hi David,
                        I've just seen that you are online.
                        Did you get my latest PM ?

                        Regards,
                        Fischi

                        Comment


                          Originally posted by Fischi View Post
                          Hi David,
                          I've just seen that you are online.
                          Did you get my latest PM ?

                          Regards,
                          Fischi
                          Just catching up after a few days away. You're next on my list! ;-)

                          Comment


                            I really wanna try this and see if I can send serial commands from my URC remotes to homeseer. It looks like the INI file is missing from the zip but the EXE file is there...tks
                            HS4Pro Win10 | Fire Tablet touchscreen client, Android Phones and Tablets | Jon00 | Smartthings | Philips Hue | Trane | Caseta | Nanoleaf | Ring | August | Evolve | Aladdin | Amazon Alexa/IFTT

                            Comment


                              Originally posted by Mario23 View Post
                              I really wanna try this and see if I can send serial commands from my URC remotes to homeseer. It looks like the INI file is missing from the zip but the EXE file is there...tks
                              The INI file will generate when you create your connections and commands. I used to include an old version of mine along with the EXE, but stopped doing that. I can send you a version if you want to see how it would look with my config, but give it a shot setting things up anyway.
                              cheeryfool

                              Comment


                                Ok I'll check it out...thanks
                                HS4Pro Win10 | Fire Tablet touchscreen client, Android Phones and Tablets | Jon00 | Smartthings | Philips Hue | Trane | Caseta | Nanoleaf | Ring | August | Evolve | Aladdin | Amazon Alexa/IFTT

                                Comment

                                Working...
                                X