Announcement

Collapse
No announcement yet.

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

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

    Found the problem by an incident, while testing Lutron RadioRA plug in.
    A properly issued and terminated command to Lutron by RadioRa plug-in pushed out a full buffer of previous serial Drule plug-in tests that have been received but not properly terminated obviously. The strings included \n \r that I have put in. Obviously I have to play with the termination characters. Not resolved yet but have an idea.

    Comment


      Easy to mistake these. If REGGS is right then you’ll want to suffix with \r\n not the opposite. Also potentially without space unless the plugin needs it as part of formatting. I am stepping in the middle here and might be wrong... But many hours of rs232 about head pounding on the wall... If these are reversed then it would be logical to not work. If this is it, then Dave plugin is not at fault....

      ‘Each command is made up of fields, separated by commas, and terminated with a carriage return (ASCII dec 13/hex 0D) and a line feed (ASCII dec 10/hex 0A).”

      Don’t you just hate when computers do exactly as we say rather than what we want....

      Ps: you’ll also want to make sure to flush the buffer otherwise it will misinterpret the communication. To your point in the last post when it spat out all of the unrecognized commands because the terminator string was inversed when sent.
      Last edited by Krumpy; November 17, 2017, 07:31 PM.
      HomeSeer 2, HomeSeer 3, Allonis myServer, Amazon Alexa Dots, ELK M1G, ISY 994i, HomeKit, BlueIris, and 6 "4k" Cameras using NVR, and integration between all of these systems. Home Automation since 1980.

      Comment


        Exactly. That's why you are SeerMaster and I'm only SeerDeluxe and if you ask me I should be demoted to a simple Seer for this incident.

        RISquare

        Comment


          Originally posted by risquare View Post
          Exactly. That's why you are SeerMaster and I'm only SeerDeluxe and if you ask me I should be demoted to a simple Seer for this incident.

          RISquare
          Is it working now then? I'm intrigued.
          I would definitely do a Google for the protocol docs, there's a ton of command info in there.

          Sent from my SM-G935F using Tapatalk

          Comment


            I think so. In the end the “cr lf” were reversed as it is supposed to be crlf and not lfcr. Depending on circumstances, it may have inadvertently been defined to have a space between cr and the lf which won’t work either. And when he posted that the devices actually buffered the data sent until it received a proper crlf terminator, I jumped to the conclusion that the buffer had to be flushed before giving it a proper test otherwise it would keep concatinating the data sent and not recognized by the receiving device.

            In other word, multiple compounding issues most of which had nothing to do with Dave’s plugin. All of which is why I give Dave so much kudos for designing, writing, and supporting a free plugin like this. It’s not easy to write a plugin that attempts to act like a Swiss Army knife in these scenarios.

            In the end I am glad that we all put our heads together to make it work. We all learned something from this. With patience, teamwork, and collaboration anything can be solved.
            HomeSeer 2, HomeSeer 3, Allonis myServer, Amazon Alexa Dots, ELK M1G, ISY 994i, HomeKit, BlueIris, and 6 "4k" Cameras using NVR, and integration between all of these systems. Home Automation since 1980.

            Comment


              Originally posted by Krumpy View Post
              I think so. In the end the “cr lf” were reversed as it is supposed to be crlf and not lfcr. Depending on circumstances, it may have inadvertently been defined to have a space between cr and the lf which won’t work either. And when he posted that the devices actually buffered the data sent until it received a proper crlf terminator, I jumped to the conclusion that the buffer had to be flushed before giving it a proper test otherwise it would keep concatinating the data sent and not recognized by the receiving device.

              In other word, multiple compounding issues most of which had nothing to do with Dave’s plugin. All of which is why I give Dave so much kudos for designing, writing, and supporting a free plugin like this. It’s not easy to write a plugin that attempts to act like a Swiss Army knife in these scenarios.

              In the end I am glad that we all put our heads together to make it work. We all learned something from this. With patience, teamwork, and collaboration anything can be solved.
              Well said!
              Last edited by reggs11; November 18, 2017, 06:55 AM.

              Comment


                Originally posted by reggs11 View Post
                Is it working now then? I'm intrigued.
                I would definitely do a Google for the protocol docs, there's a ton of command info in there.

                Sent from my SM-G935F using Tapatalk
                Yes. It is working. Appreciate the comments and cooperation by all. Likewise I do appreciate the work David put behind this very useful plug-in. Feedback from this experience.

                1. A footnote (or help link) would be nice in the setup explaining the use of invisible characters such as LF and CR.
                2. A record in HS3 log of the activity would be nice as well. A prompt of missing termination even better. Example

                Drule Plug-in This was sent xxxxxx to connection yyyyyy . Warning no termination characters were found.

                3. I noticed that the plug-in indicates "successful connection" (green check mark in the setup menu) to non existing com ports.

                Thanks again for the valuable feedback and cooperation.

                RISquare

                Comment


                  HomeSeer 2, HomeSeer 3, Allonis myServer, Amazon Alexa Dots, ELK M1G, ISY 994i, HomeKit, BlueIris, and 6 "4k" Cameras using NVR, and integration between all of these systems. Home Automation since 1980.

                  Comment


                    Originally posted by Krumpy View Post

                    These guys actually played nice in terms of their protocol. I hate to even say that it was based on basic serial data communications. They could have chosen a much more complex set of command sequencing.
                    Keep in mind that Lutron RadioRA (original without suffix 2) that I'm using is 20+ years old technology. Unfortunately one can't replace all light switches throughout the house every time the technology makes a move forward, which is quite often nowadays.

                    RISquare

                    Comment


                      Originally posted by risquare View Post
                      Keep in mind that Lutron RadioRA (original without suffix 2) that I'm using is 20+ years old technology. Unfortunately one can't replace all light switches throughout the house every time the technology makes a move forward, which is quite often nowadays.

                      RISquare
                      Glad it's working for you now. I will add some extra output to the log when I put out the next release.

                      -David

                      Comment


                        Triggers problem

                        None of the 4 possible triggers works for me.
                        The first drop-down box "connection" doesn't show any choices when trying to setup a trigger.
                        Checked the connection setup three times. It is properly set and actually does send real data over when in "action" mode. No red ink in the log. To the contrary there is positive statement about establishing the connection.

                        Nov-22 12:19:15 PM drhsIpPlugIn Starting serial client for Lutron on COM6

                        I also restarted HS3 just in case. No luck.

                        What's wrong this time? Pls. help.

                        Thanks,

                        RISquare

                        Comment


                          Originally posted by risquare View Post
                          None of the 4 possible triggers works for me.
                          The first drop-down box "connection" doesn't show any choices when trying to setup a trigger.
                          Checked the connection setup three times. It is properly set and actually does send real data over when in "action" mode. No red ink in the log. To the contrary there is positive statement about establishing the connection.

                          Nov-22 12:19:15 PM drhsIpPlugIn Starting serial client for Lutron on COM6

                          I also restarted HS3 just in case. No luck.

                          What's wrong this time? Pls. help.

                          Thanks,

                          RISquare
                          What are you trying to trigger on? I'll see if I can repro it here.

                          Comment


                            Well, I'd like to use any and all of the 4 available triggers.
                            However if I need to point to the most important one for me at this time it is the

                            "Received Triggers"

                            For example if I send out over Serial connection port 6

                            OUT -->> SDL,8,80,S1

                            and if receive this in response

                            IN <-- Dimmer,8,ON

                            than I want to trigger event xx

                            if I receive

                            IN<-- ERROR, Unit not responding

                            than I want to trigger event xy


                            Thanks,

                            RISquare

                            Comment


                              Originally posted by risquare View Post
                              Well, I'd like to use any and all of the 4 available triggers.
                              However if I need to point to the most important one for me at this time it is the

                              "Received Triggers"

                              For example if I send out over Serial connection port 6

                              OUT -->> SDL,8,80,S1

                              and if receive this in response

                              IN <-- Dimmer,8,ON

                              than I want to trigger event xx

                              if I receive

                              IN<-- ERROR, Unit not responding

                              than I want to trigger event xy


                              Thanks,

                              RISquare
                              It could be that the response contains some additional (non-printable) characters as a terminator. Best way to test for this is to use RealTerm to send and receive a few commands. Make sure you set the display mode to Hex so that we can see any extra bytes that might be arriving.

                              https://sourceforge.net/projects/realterm/

                              Click image for larger version

Name:	Screen Shot 2017-11-23 at 9.52.06 AM.png
Views:	1
Size:	32.3 KB
ID:	1193200

                              Comment


                                I can't get to the "response" part at all. I can't setup any trigger because it doesn't show any "connection" to select. The connection drop down box is empty. None to choose from. At the same time I do have an active serial connection com6 that shows in the setup and does work.

                                RISquare

                                Comment

                                Working...
                                X