Announcement

Collapse
No announcement yet.

"flakiness" following Ascii-Out from SG to HS

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    "flakiness" following Ascii-Out from SG to HS

    Code:
    6/22/2007 6:00:33 PM ~!~JDS StarGate DEBUG~!~gRbuffer ::  :: Net Reset<13><10>
    6/22/2007 6:00:33 PM ~!~JDS StarGate Comms~!~CurrentBuffer = Net Reset
    6/22/2007 6:00:33 PM ~!~JDS StarGate DEBUG~!~Unknown packet (CurrentBuffer) :  :: Net Reset<13><10>
    6/22/2007 6:00:35 PM ~!~JDS StarGate DEBUG~!~gRbuffer ::  :: ##0<13><10>
    6/22/2007 6:00:35 PM ~!~JDS StarGate Comms~!~CurrentBuffer = ##0
    6/22/2007 6:00:36 PM ~!~JDS StarGate DEBUG~!~gRbuffer ::  :: ##0<13><10>
    6/22/2007 6:00:36 PM ~!~JDS StarGate Comms~!~CurrentBuffer = ##0
    6/22/2007 6:00:37 PM ~!~JDS StarGate DEBUG~!~gRbuffer ::  :: ##0<13><10>##0<13><10>
    6/22/2007 6:00:37 PM ~!~JDS StarGate Comms~!~CurrentBuffer = ##0
    6/22/2007 6:00:37 PM ~!~JDS StarGate Comms~!~CurrentBuffer = ##0
    6/22/2007 6:00:37 PM ~!~JDS StarGate DEBUG~!~gRbuffer ::  :: !!06/220648552605<13><10>!!06/22064855200e<13><10>!!06/220648552110<13><10>!
    6/22/2007 6:00:37 PM ~!~JDS StarGate DEBUG~!~gRbuffer ::  :: !!06/220648552605<13><10>!!06/22064855200e<13><10>!!06/220648552110<13><10>!!06/220648553104<13><10>!!06/220648553004<13><10>!!06/22064855
    [highlight]6/22/2007 6:00:37 PM ~!~JDS StarGate DEBUG~!~gRbuffer ::  :: !!06/220648552605<13><10>!!06/22064855200e<13><10>!!06/220648552110<13><10>!!06/220648553104<13><10>!!06/220648553004<13><10>!!06/220648553104<13><10>HVAC Setpoints Start<13>!!06/220648554000<13><10>[/highlight]
    6/22/2007 6:00:37 PM ~!~JDS StarGate Comms~!~CurrentBuffer = !!06/220648552605
    6/22/2007 6:00:37 PM ~!~JDS StarGate Comms~!~Timer event :: 605
    6/22/2007 6:00:37 PM ~!~JDS StarGate Comms~!~Timer event :: 605
    6/22/2007 6:00:37 PM ~!~JDS StarGate Comms~!~CurrentBuffer = !!06/22064855200e
    6/22/2007 6:00:37 PM ~!~JDS StarGate Comms~!~Timer event :: 00e
    6/22/2007 6:00:37 PM ~!~JDS StarGate Comms~!~Timer event :: 00e
    6/22/2007 6:00:37 PM ~!~JDS StarGate Comms~!~CurrentBuffer = !!06/220648552110
    6/22/2007 6:00:37 PM ~!~JDS StarGate Comms~!~Timer event :: 110
    6/22/2007 6:00:37 PM ~!~JDS StarGate Comms~!~Timer event :: 110
    6/22/2007 6:00:37 PM ~!~JDS StarGate~!~Load timer $6 (JDS Every Hour) with 3600
    6/22/2007 6:00:37 PM ~!~Info~!~Delayed Trigger Event Removed: JDS Timer 6 (delayed event)
    6/22/2007 6:00:37 PM ~!~JDS StarGate Comms~!~CurrentBuffer = !!06/220648553104
    6/22/2007 6:00:37 PM ~!~JDS StarGate Comms~!~Flag event :: 104 -- Set flag ^5
    6/22/2007 6:00:37 PM ~!~JDS StarGate~!~Flag ^5 (JDS HVAC_Setpoint) Changed to ON
    6/22/2007 6:00:37 PM ~!~JDS StarGate Comms~!~CurrentBuffer = !!06/220648553004
    6/22/2007 6:00:37 PM ~!~JDS StarGate Comms~!~Flag event :: 004 -- Clear flag ^5
    6/22/2007 6:00:37 PM ~!~JDS StarGate~!~Flag ^5 (JDS HVAC_Setpoint) Changed to OFF
    6/22/2007 6:00:37 PM ~!~JDS StarGate Comms~!~CurrentBuffer = !!06/220648553104
    6/22/2007 6:00:37 PM ~!~JDS StarGate Comms~!~Flag event :: 104 -- Set flag ^5
    6/22/2007 6:00:37 PM ~!~JDS StarGate~!~Flag ^5 (JDS HVAC_Setpoint) Changed to ON
    6/22/2007 6:00:37 PM ~!~JDS StarGate Comms~!~CurrentBuffer = HVAC Setpoints Start
    [highlight]6/22/2007 6:00:37 PM ~!~JDS StarGate DEBUG~!~Unknown packet (CurrentBuffer) :  :: HVAC Setpoints Start<13><10>[/highlight]
    6/22/2007 6:00:37 PM ~!~JDS StarGate DEBUG~!~gRbuffer ::  :: !!06/220648554107<13><10>!!06/220648554000<13><10>!!06/22064855410c<13><10>!!06/220648554000<13><10>!!06/220648554111<13><10>!!06/220648554000<13><10>!!06/220648554116<13><10>HVAC Change Mode to OFF<13>!!06/220648554000<13><10>!!06/220648554106<13><10>
    6/22/2007 6:00:37 PM ~!~JDS StarGate Comms~!~CurrentBuffer = !!06/220648554107
    6/22/2007 6:00:37 PM ~!~JDS StarGate Comms~!~Variable event :: 107
    6/22/2007 6:00:37 PM ~!~JDS StarGate~!~Load variable ]8 (JDS HVAC_Zone1_Fan) with 3600
    6/22/2007 6:00:37 PM ~!~Info~!~Event Trigger "Zone 1 Fan Change"
    6/22/2007 6:00:37 PM ~!~Info~!~Running script in background: hvac.vb("Main","1-Fan")
    6/22/2007 6:00:38 PM ~!~JDS StarGate Comms~!~Variable Load(1) :: ]8 (3600)
    6/22/2007 6:00:38 PM ~!~JDS StarGate Comms~!~CurrentBuffer = !!06/220648554000
    6/22/2007 6:00:38 PM ~!~JDS StarGate Comms~!~Variable event :: 000
    6/22/2007 6:00:38 PM ~!~JDS StarGate Comms~!~Variable Load(0) :: (0)
    6/22/2007 6:00:38 PM ~!~JDS StarGate Comms~!~CurrentBuffer = !!06/22064855410c
    6/22/2007 6:00:38 PM ~!~JDS StarGate Comms~!~Variable event :: 10c
    6/22/2007 6:00:38 PM ~!~JDS StarGate~!~Load variable ]13 (JDS HVAC_Zone2_Fan) with 0
    6/22/2007 6:00:38 PM ~!~JDS StarGate Comms~!~Variable Load(1) :: ]13 (0)
    6/22/2007 6:00:38 PM ~!~JDS StarGate Comms~!~CurrentBuffer = !!06/220648554000
    6/22/2007 6:00:38 PM ~!~JDS StarGate Comms~!~Variable event :: 000
    6/22/2007 6:00:38 PM ~!~JDS StarGate Comms~!~Variable Load(0) :: (0)
    6/22/2007 6:00:38 PM ~!~JDS StarGate Comms~!~CurrentBuffer = !!06/220648554111
    6/22/2007 6:00:38 PM ~!~JDS StarGate Comms~!~Variable event :: 111
    6/22/2007 6:00:38 PM ~!~JDS StarGate~!~Load variable ]18 (JDS HVAC_Zone3_Fan) with 0
    6/22/2007 6:00:38 PM ~!~JDS StarGate Comms~!~Variable Load(1) :: ]18 (0)
    6/22/2007 6:00:38 PM ~!~JDS StarGate Comms~!~CurrentBuffer = !!06/220648554000
    6/22/2007 6:00:38 PM ~!~JDS StarGate Comms~!~Variable event :: 000
    6/22/2007 6:00:38 PM ~!~JDS StarGate Comms~!~Variable Load(0) :: (0)
    6/22/2007 6:00:38 PM ~!~JDS StarGate Comms~!~CurrentBuffer = !!06/220648554116
    6/22/2007 6:00:38 PM ~!~JDS StarGate Comms~!~Variable event :: 116
    6/22/2007 6:00:38 PM ~!~JDS StarGate~!~Load variable ]23 (JDS HVAC_Zone4_Fan) with 0
    6/22/2007 6:00:38 PM ~!~JDS StarGate Comms~!~Variable Load(1) :: ]23 (0)
    6/22/2007 6:00:38 PM ~!~JDS StarGate Comms~!~CurrentBuffer = HVAC Change Mode to OFF
    6/22/2007 6:00:38 PM ~!~JDS StarGate DEBUG~!~Unknown packet (CurrentBuffer) :  :: HVAC Change Mode to OFF<13><10>
    6/22/2007 6:00:41 PM ~!~JDS StarGate DEBUG~!~gRbuffer ::  :: !!06/22064859a050<13><10>
    6/22/2007 6:00:41 PM ~!~JDS StarGate Comms~!~CurrentBuffer = !!06/22064859a050
    6/22/2007 6:00:41 PM ~!~JDS StarGate Comms~!~Digital Lo event :: 050
    6/22/2007 6:00:41 PM ~!~JDS StarGate~!~Digital #7 (JDS Great Motion) Changed to ON
    6/22/2007 6:00:43 PM ~!~JDS StarGate DEBUG~!~gRbuffer ::  :: !!06/220648614000<13><10>!!06/22064861410b<13><10>
    6/22/2007 6:00:43 PM ~!~JDS StarGate Comms~!~CurrentBuffer = !!06/220648614000
    6/22/2007 6:00:43 PM ~!~JDS StarGate Comms~!~Variable event :: 000
    6/22/2007 6:00:43 PM ~!~JDS StarGate Comms~!~Variable Load(0) :: (0)
    6/22/2007 6:00:43 PM ~!~JDS StarGate Comms~!~CurrentBuffer = !!06/22064861410b
    6/22/2007 6:00:43 PM ~!~JDS StarGate Comms~!~Variable event :: 10b
    6/22/2007 6:00:43 PM ~!~JDS StarGate~!~Load variable ]12 (JDS HVAC_Zone2_Mode) with 0
    6/22/2007 6:00:43 PM ~!~JDS StarGate Comms~!~Variable Load(1) :: ]12 (0)
    6/22/2007 6:00:45 PM ~!~JDS StarGate DEBUG~!~gRbuffer ::  :: !!06/22064863a010<13><10>
    6/22/2007 6:00:45 PM ~!~JDS StarGate Comms~!~CurrentBuffer = !!06/22064863a010
    6/22/2007 6:00:45 PM ~!~JDS StarGate Comms~!~Digital Lo event :: 010
    6/22/2007 6:00:45 PM ~!~JDS StarGate~!~Digital #7 (JDS Great Motion) Changed to OFF
    6/22/2007 6:00:47 PM ~!~JDS StarGate DEBUG~!~gRbuffer ::  :: !!06/220648653004<13><10>HVAC Setpoints Finish<13>
    [highlight]6/22/2007 6:00:48 PM ~!~JDS StarGate DEBUG~!~gRbuffer ::  :: !!06/220648653004<13><10>HVAC Setpoints Finish<13>!!06/220648664000<13><10>!!06/220648664110<13><10>[/highlight]
    6/22/2007 6:00:48 PM ~!~JDS StarGate Comms~!~CurrentBuffer = !!06/220648653004
    6/22/2007 6:00:48 PM ~!~JDS StarGate Comms~!~Flag event :: 004 -- Clear flag ^5
    6/22/2007 6:00:48 PM ~!~JDS StarGate~!~Flag ^5 (JDS HVAC_Setpoint) Changed to OFF
    6/22/2007 6:00:48 PM ~!~JDS StarGate Comms~!~CurrentBuffer = HVAC Setpoints Finish
    [highlight]6/22/2007 6:00:48 PM ~!~JDS StarGate DEBUG~!~Unknown packet (CurrentBuffer) :  :: HVAC Setpoints Finish<13><10>[/highlight]
    6/22/2007 6:00:52 PM ~!~JDS StarGate DEBUG~!~gRbuffer ::  :: !!06/2206
    6/22/2007 6:00:53 PM ~!~JDS StarGate DEBUG~!~gRbuffer ::  :: !!06/220648714000<13><10>!!06/220648714115<13><10>
    6/22/2007 6:00:53 PM ~!~JDS StarGate Comms~!~CurrentBuffer = !!06/220648714000
    6/22/2007 6:00:53 PM ~!~JDS StarGate Comms~!~Variable event :: 000
    6/22/2007 6:00:53 PM ~!~JDS StarGate Comms~!~Variable Load(0) :: (0)
    6/22/2007 6:00:53 PM ~!~JDS StarGate Comms~!~CurrentBuffer = !!06/220648714115
    6/22/2007 6:00:53 PM ~!~JDS StarGate Comms~!~Variable event :: 115
    6/22/2007 6:00:53 PM ~!~JDS StarGate~!~Load variable ]22 (JDS HVAC_Zone4_Mode) with 0
    6/22/2007 6:00:53 PM ~!~JDS StarGate Comms~!~Variable Load(1) :: ]22 (0)

    #2
    Follow-Up

    p.s. I just found HSPI_STARGATE 2.1.2718.18006 that RJ posted on June 11th and repeated my tests and got the same results. I also opened a helpdesk ticket to ensure RJ will see this.

    Comment


      #3
      Bill,
      Where are you sending your ASCII strings? Are they explicitly directed at the com port that is connected to HS? Do they have $$ or && leading characters? Could you use the SG Message Log instead as a work around?
      Mike____________________________________________________________ __________________
      HS3 Pro Edition 3.0.0.548, NUC i3

      HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

      Comment


        #4
        Originally posted by billschalck View Post
        I was experiencing some "flakiness" ... (I have HS & WinEVM both running on different com ports)
        I'm not saavy enough about ASCII to help with the problem, but the above line caught my eye. From Day 1, this plugin has shown "flaky" behavior when running WinEVM on one SG COM port and HS on another. I could never get the two to run together without some kind of problem - mostly missed signals. I always assumed it had something to do with the occasional inability of SG to manage the timing between the two COM ports. I put HS on SG's COM1 and haven't had a problem since. I'm guessing that HS works better on COM1 because COM1 has some kind of priority in SG (presumably the reason that WinEVM must be on COM1).

        Mark
        Mark

        Comment


          #5
          I have discussed this problem with RJ. He recommended a set of prefixes for my ASCII messages that would not cause the plug-in to disregard the whole string received from Stargate as a garbage packet. I've attached our conversation below.

          ------------------------------------------------------------------
          Hi Tim-

          The reason that we clear the buffer here is because this can sometimes contain ACK data, from reading X10 status, etc.

          There are some “Prefixes” you can use in an ASCII-out to get the plugin to recognize this:
          ElseIf InStr(1, CurrentBuffer, "&&") <> 0 Then
          ' DOS shell event
          ExecDOS(CurrentBuffer)
          ElseIf InStr(1, CurrentBuffer, "$$") <> 0 Then
          ' HomeSeer script event
          ExecScript(CurrentBuffer)
          ElseIf InStr(1, CurrentBuffer, "@@") <> 0 Then
          ' HomeSeer audio play event
          ExecMedia(CurrentBuffer)
          ElseIf InStr(1, CurrentBuffer, ">>") <> 0 Then
          ' ASCII out string
          SaveAscii(CurrentBuffer)
          That is straight out of the Com code, so perhaps “>>TAL25” would be a better solution.

          Best Regards,

          RJ Walsh
          HomeSeer Technologies, LLC

          From: Tim Lacey
          Sent: Monday, October 16, 2006 5:05 PM
          To: RJ Walsh
          Cc: Tim & Kathy Lacey
          Subject: Homeseer Plug-in Stargate Receive Error - missing commands due to random ASCII

          RJ, recently I went in and added "ascii send" commands in a bunch of events in my stargate schedule. It just sends out strings to Homeseer that indicate which event number is running. An example of a string is "TAL25". It follows them all with a [cr] character.

          Anyway, when Homeseer gets it all piled up in the buffer, it chokes on the unknown information and discards the rest. I had expected it to chop it off at the [cr] and interpret the rest.

          I can easily fix this by removing those ascii out strings, but it seems like the plug-in shouldn't get fouled up by them and should just skip to the next line in the buffer.

          Thanks,

          Tim

          10/16/2006 1:53:44 PM ~!~JDS StarGate Comms~!~CurrentBuffer = !!10/160500013138
          10/16/2006 1:53:44 PM ~!~JDS StarGate Comms~!~Flag event :: 138 -- Set flag \57
          10/16/2006 1:53:44 PM ~!~JDS StarGate~!~Flag \57 (JDS Keypad Open Gate) Changed to ON

          10/16/2006 1:53:44 PM ~!~JDS StarGate DEBUG~!~gRbuffer :: :: TAL25<13>!!10/160500013038<13><10>!!10/160500013105<13><10>!!10/160500014001<13><10>!!10/160500014
          10/16/2006 1:53:45 PM ~!~JDS StarGate DEBUG~!~gRbuffer :: :: TAL25<13>!!10/160500013038<13><10>!!10/160500013105<13><10>!!10/160500014001<13><10>!!10/160500014107<13><10>!!10/160500014008<13><10>!!10/160500014108<13><10>
          10/16/2006 1:53:45 PM ~!~JDS StarGate Comms~!~CurrentBuffer = TAL25
          10/16/2006 1:53:45 PM ~!~JDS StarGate DEBUG~!~Unknown packet (gRbuffer) : :: !!10/160500013038<13><10>!!10/160500013105<13><10>!!10/160500014001<13><10>!!10/160500014107<13><10>!!10/160500014008<13><10>!!10/160500014108<13><10>
          10/16/2006 1:53:45 PM ~!~JDS StarGate DEBUG~!~Unknown packet (strCurrentBuffer) : :: !!10/160500013038<13><10>!!10/160500013105<13><10>!!10/160500014001<13><10>!!10/160500014107<13><10>!!10/160500014008<13><10>!!10/160500014108<13><10>

          10/16/2006 1:53:45 PM ~!~JDS StarGate DEBUG~!~gRbuffer :: :: TAL21<13>!!10/160500023005<13><10>!!10/160500023127<13><10>!!10/16050002400b<13><10>!!10/16050002415b<13><10>
          10/16/2006 1:53:45 PM ~!~JDS StarGate Comms~!~CurrentBuffer = TAL21
          10/16/2006 1:53:45 PM ~!~JDS StarGate DEBUG~!~Unknown packet (gRbuffer) : :: !!10/160500023005<13><10>!!10/160500023127<13><10>!!10/16050002400b<13><10>!!10/16050002415b<13><10>
          10/16/2006 1:53:45 PM ~!~JDS StarGate DEBUG~!~Unknown packet (strCurrentBuffer) : :: !!10/160500023005<13><10>!!10/160500023127<13><10>!!10/16050002400b<13><10>!!10/16050002415b<13><10>

          10/16/2006 1:53:46 PM ~!~JDS StarGate DEBUG~!~gRbuffer :: :: !!10/1605000208ba<13><10>
          10/16/2006 1:53:46 PM ~!~JDS StarGate Comms~!~CurrentBuffer = !!10/1605000208ba
          10/16/2006 1:53:46 PM ~!~JDS StarGate DEBUG~!~gRbuffer :: :: !!10/16050003094a<13><10>!!10/160500032605<13><10>!!10/160500032000<13><10>!!10/16050003210c<13><10>TAL23<13>TAL23B<13>
          10/16/2006 1:53:47 PM ~!~JDS StarGate DEBUG~!~gRbuffer :: :: !!10/16050003094a<13><10>!!10/160500032605<13><10>!!10/160500032000<13><10>!!10/16050003210c<13><10>TAL23<13>TAL23B<13>!!10/16050004089e<13><10>
          10/16/2006 1:53:47 PM ~!~JDS StarGate Comms~!~CurrentBuffer = !!10/16050003094a
          10/16/2006 1:53:47 PM ~!~JDS StarGate Comms~!~X10 address :: G8
          10/16/2006 1:53:47 PM ~!~JDS StarGate Comms~!~X10 command :: 2
          10/16/2006 1:53:47 PM ~!~JDS StarGate Comms~!~X10 receive
          10/16/2006 1:53:47 PM ~!~X10 Received~!~G8 ( Outside Gate Outlet) G On
          10/16/2006 1:53:47 PM ~!~JDS StarGate Comms~!~CurrentBuffer = !!10/160500032605
          Last edited by timlacey; June 23, 2007, 10:25 AM.

          Comment


            #6
            Thanks, I thought that might be the answer I got back from this question. I guess I understand the concept of having logic in the program of "if you get confused, clear everything and start over", but I would think there would be a more elegant way of handling this. I wonder how many people are using Ascii-Out without a prefix and wondering why their SG-HS interface seems "flaky"

            Comment


              #7
              Hi Bill-

              I see the problem you are having here. Basically the idea from my side is that If there is a bad packet, clear the buffer.

              There are a few reasons for doing this. First, data received in this fashion is often ack data, as a result of polling. That gets processed all together, so it needs to clear the buffer. I wasn't the original author of this plugin, but he put these "prefixes" in here to ensure just this type of thing wouldn't happen. Changing the plugin here might break lots of the Ack functionality, so I would recomend changing your ASCII outs to use the prefixes mentioned earlier.
              Last edited by RJ; June 28, 2007, 09:02 AM.
              -RJ (HomeSeer Tech)

              Comment


                #8
                I've done that and everything works perfectly with the >> prefix on the Ascii-Out. Everyone that uses SG and HS need to know that they need to do this or their SG and HS will not stay synchronized and events in HS may not fire as expected. I saw the documentation that said that Ascii-Out could have prefixes, but nothing warned that not having some prefix would cause havoc.

                If you come up with some way to handle this more gracefully in the future it would be great, but I agree that you don't want to break the plugin. If you can't fix the problem, then a warning in the documentation would be a step in the right direction. We know that everyone reads the documentation, right!

                Comment


                  #9
                  Hi Bill-

                  Agreed, it will be reflected in the next update.
                  -RJ (HomeSeer Tech)

                  Comment

                  Working...
                  X