Announcement

Collapse
No announcement yet.

On Cold Boot CommThread Error trying to connect to stargate.

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

    On Cold Boot CommThread Error trying to connect to stargate.

    Whenever I boot my homeseer machine from cold off, I get a commerror trying to connect to Stargate and it doesn't matter what port it is on. I have motherboard comms, pci comms and usb comms and it does it on all. If I exit homeseer and then restart it works just fine.


    Code:
    HomeSeer Product: HSPRO
    
    HomeSeer Version: 2.3.0.137
    
    Operating System: XP Pro
    
    Problem: 10/28/2009 8:10:45 PM
    Safe handle has been closed
    HomeSeer version: 2.3.0.137
    Source: System
    Target: Boolean GetOverlappedResult(Microsoft.Win32.SafeHandles.SafeFileHandle, System.Threading.NativeOverlapped*, Int32 ByRef, Boolean)
    Stack trace:
    at Microsoft.Win32.UnsafeNativeMethods.GetOverlappedResult(SafeFileHandle hFile, NativeOverlapped* lpOverlapped, Int32& lpNumberOfBytesTransferred, Boolean bWait)
    at System.IO.Ports.SerialStream.EventLoopRunner.WaitForCommEvent()
    at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
    at System.Threading.ExecutionContext.runTryCode(Object userData)
    at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Threading.ThreadHelper.ThreadStart()
    
    Please specify what you were doing at the time of this error:

    #2
    Are you starting HS manually or immediately after boot (eg., shortcut in Start folder)? Does a delay in starting HS help?
    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


      #3
      I have tried it both ways using startup delayer and I still get the issue. The way I found around it was to monitor the log and restart homeseer.

      Comment


        #4
        I have a problem with connecting to Stargate when running Homeseer the first time. I always run WinEVM and then close it before starting Homeseer the first time. A nuisance, so I'd love this problem to get figured out.

        I've never gotten an error screen, though. It just produces about 1000 lines of error messages and then usually finally connects to the Stargate. I've been running WinEVM first for so long that I don't even remember what the errors were, but if it's helpful, I could do it and post my log here.

        Tim

        Comment


          #5
          I just added a log monitor and when it sees that it isn't communicating it restarts homeseer.

          Comment


            #6
            Guys,
            Rich just uploaded a new Stargate plugin to the updater. Can you try this one.
            💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

            Comment


              #7
              I just installed the update from the updater, and I thought I'd test my problem of starting Homeseer after a Windows restart.

              It indeed had the same problem it always has, so perhaps I can report it here and we can figure out what the problem is.

              When I start Homeseer, these lines appear in the log relevant to Stargate:

              12/10/2009 9:05:17 PM ~!~Plug-In~!~Found plug-in: JDS StarGate, version: 2.2.0.1

              12/10/2009 9:05:18 PM ~!~Startup~!~Initializing Plug-Ins
              12/10/2009 9:05:18 PM ~!~Plug-In~!~Initializing Plug-in: JDS StarGate on COM port 4
              12/10/2009 9:05:18 PM ~!~JDS StarGate~!~Initializing Global Settings
              12/10/2009 9:05:18 PM ~!~System~!~Current debug events set:
              12/10/2009 9:05:18 PM ~!~JDS StarGate~!~Attempting contact with JDS hardware
              12/10/2009 9:05:44 PM ~!~JDS StarGate~!~Error in global Init/Comms: Unknown hardware: ATAT S0=10 Q0 V1 X4 &W0 &Y0
              !!12/10075945S01020101
              12/10/2009 9:05:44 PM ~!~JDS StarGate~!~Done Initializing Global Settings

              First of all, it didn't find the Stargate with a valid. second, it took nearly 30 seconds before reporting the error string. third, it then took Homeseer an awful long time to start up, and reported constantly that scripts were taking too long to complete and asking me if I wanted to continue them.

              I also noticed the following items in the log during startup (a bit later on):

              12/10/2009 9:06:20 PM ~!~Plug-In~!~Initializing X10 Plug-in: JDS StarGate On COM Port 4
              12/10/2009 9:06:20 PM ~!~Plug-In~!~Initializing Plug-in: JDS StarGate
              12/10/2009 9:06:20 PM ~!~JDS StarGate~!~Initializing Global Settings
              12/10/2009 9:06:21 PM ~!~ISY Insteon~!~COMM: Connecting to 192.168.1.117
              12/10/2009 9:06:22 PM ~!~System~!~Current debug events set:
              12/10/2009 9:06:22 PM ~!~Media Player~!~MPAppThreadProc start
              12/10/2009 9:06:22 PM ~!~Media Player~!~Loading library in the background, this could take a few minutes...
              12/10/2009 9:06:22 PM ~!~JDS StarGate~!~Error in OpenPort, Access to the port 'COM4' is denied.
              12/10/2009 9:06:22 PM ~!~JDS StarGate~!~Attempting contact with JDS hardware

              And then over a minute later:

              12/10/2009 9:07:26 PM ~!~JDS StarGate~!~No response from JDS hardware
              12/10/2009 9:07:26 PM ~!~JDS StarGate~!~Error in global Init/Comms: No response
              12/10/2009 9:07:26 PM ~!~JDS StarGate~!~Done Initializing Global Settings
              12/10/2009 9:07:26 PM ~!~Plug-In~!~Finished initializing X10 interface JDS StarGate
              12/10/2009 9:07:26 PM ~!~Plug-In~!~Initializing Infrared interface JDS StarGate on COM 4
              12/10/2009 9:07:26 PM ~!~JDS StarGate~!~Initializing Global Settings
              12/10/2009 9:07:26 PM ~!~System~!~Current debug events set:
              12/10/2009 9:07:26 PM ~!~JDS StarGate~!~Error in OpenPort, Access to the port 'COM4' is denied.
              12/10/2009 9:07:27 PM ~!~JDS StarGate~!~Attempting contact with JDS hardware
              12/10/2009 9:07:41 PM ~!~ISY Insteon~!~EVNT: Laundry/Main now at 255
              12/10/2009 9:07:49 PM ~!~ISY Insteon~!~EVNT: My Programs/Fans HVAC/Insteon/FH Breezes Refresh now at False
              12/10/2009 9:07:49 PM ~!~ISY Insteon~!~MAIN: Update Insteon Insteon FH Breezes Refresh to False
              12/10/2009 9:08:19 PM ~!~ISY Insteon~!~EVNT: Master Bathroom/North Soffit now at 255
              12/10/2009 9:08:30 PM ~!~JDS StarGate~!~No response from JDS hardware
              12/10/2009 9:08:30 PM ~!~JDS StarGate~!~Error in global Init/Comms: No response
              12/10/2009 9:08:30 PM ~!~JDS StarGate~!~Done Initializing Global Settings

              So I shut down homeseer and restarted it. Then it all worked fine, like always:

              12/10/2009 9:13:00 PM ~!~Startup~!~Initializing Plug-Ins
              12/10/2009 9:13:00 PM ~!~Plug-In~!~Initializing Plug-in: JDS StarGate on COM port 4
              12/10/2009 9:13:00 PM ~!~JDS StarGate~!~Initializing Global Settings
              12/10/2009 9:13:00 PM ~!~System~!~Current debug events set:
              12/10/2009 9:13:00 PM ~!~JDS StarGate~!~Attempting contact with JDS hardware
              12/10/2009 9:13:00 PM ~!~JDS StarGate~!~Found hardware type: JDS StarGate IP
              12/10/2009 9:13:01 PM ~!~JDS StarGate~!~Done Initializing Global Settings
              12/10/2009 9:13:01 PM ~!~Plug-In~!~Finished initializing plug-in JDS StarGate


              The odd thing is that i've worked around this problem by always opening the WinEVM program that connects to Stargate after booting up the computer. Then, and only then, do I start Homeseer. If I don't first open WinEVM, then Homeseer behaves as in the first set of log samples above. Why is Homeseer having trouble being the first program to open COM4? Clearly it doesn't have trouble once it has been restarted.

              Tim

              Comment


                #8
                If I just to a normal windows restart mine seems to startup fine "most" of the time. If I shut down the pc and then turn it back on it always fails with Error in global Init/Comms: No response and gets stuck for a long period. To work around I have a log watcher looking for that error and to restart homeseer when it sees it.

                Also the other day I had a homeseer failure and got this message:

                Code:
                12/10/2009 3:22:09 AM
                Safe handle has been closed
                HomeSeer version: 2.3.0.137
                Source: System
                Target: Boolean GetOverlappedResult(Microsoft.Win32.SafeHandles.SafeFileHandle, System.Threading.NativeOverlapped*, Int32 ByRef, Boolean)
                Stack trace: 
                   at Microsoft.Win32.UnsafeNativeMethods.GetOverlappedResult(SafeFileHandle hFile, NativeOverlapped* lpOverlapped, Int32& lpNumberOfBytesTransferred, Boolean bWait)
                   at System.IO.Ports.SerialStream.EventLoopRunner.WaitForCommEvent()
                   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
                   at System.Threading.ExecutionContext.runTryCode(Object userData)
                   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
                   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
                   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
                   at System.Threading.ThreadHelper.ThreadStart()
                
                Please specify what you were doing at the time of this error:

                Comment


                  #9
                  Originally posted by timlacey View Post
                  . . .The odd thing is that i've worked around this problem by always opening the WinEVM program that connects to Stargate after booting up the computer. Then, and only then, do I start Homeseer. If I don't first open WinEVM, then Homeseer behaves as in the first set of log samples above. Why is Homeseer having trouble being the first program to open COM4? Clearly it doesn't have trouble once it has been restarted. Tim
                  Tim,
                  I also see a similar problem, but only on occasion. I also find that if I start WinEVM first I can avoid the problem entirely, but I have to be sure that serial splitter is initialized first. Have you found a way to automatically start WinEVM on reboot with a short delay? All the delayed start programs I've tried choke on a 16 bit application.
                  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


                    #10
                    I'm not using the serial splitter, although I suppose I could. I have used it before without too much trouble. Otherwise, even if I could start up WinEVM automatically, which I should be able to so with a startup batch file easily enough, I couldn't then close WinEVM and open Homeseer.

                    I am planning to upgrade to Windows 7 and a more capable Homeseer machine (that could run a few simple other programs as well), and I rarely use WinEVM, so first i've got to figure out how to deal with that issue. perhaps I keep an old XP laptop around just for running WinEVM now and then. . . but then I could never run Serial Splitter since I hear WinEVM and Windows 7 are not happy together.

                    Another problem for another day. . . . for now, I'll continue to do my WinEVM trick - I just figured it's probably something simple in the way the plug-in is initializing the COM port and someone might see an easy fix.

                    mattdb - hopefully homeseer tech could look for the problem in the plug-in and fix it - I suspect my problem is related to yours, although mine has never caused a Homeseer crash. Or maybe I've never let it run long enough without restarting to fix things . . . .

                    Mike, can't you simply create a batch file that runs WinEVM and place the batch file in the startup folder of the start menu? There may be options you can pass to make sure it runs in 16 bit compatibility mode. Or you can create a shortcut that includes the compatibility mode option set, then call the shortcut from your batch file. It seems like that should work fine. . . .

                    Tim

                    Comment


                      #11
                      Originally posted by timlacey View Post
                      . . . but then I could never run Serial Splitter since I hear WinEVM and Windows 7 are not happy together.
                      I thought it was just the x64 version of Windows 7 that was a problem - that the 32-bit version did not have a conflict. But, as is often the case, I could simply be misinformed.

                      Mike, can't you simply create a batch file that runs WinEVM and place the batch file in the startup folder of the start menu? There may be options you can pass to make sure it runs in 16 bit compatibility mode. Or you can create a shortcut that includes the compatibility mode option set, then call the shortcut from your batch file. It seems like that should work fine. . . .

                      Tim
                      That's what I thought too, but I have not been able to get it to work. As soon as I try to delay the start of WinEVM, I get an error. (I haven't tried it for some time now, so I don't recall the specific wording.) If I just put a shortcut to WinEVM in the Start folder, that works, but sometimes WinEVM starts before SerialSplitter has initialized and cannot open the comm port.
                      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

                      Working...
                      X