Announcement

Collapse
No announcement yet.

Restarting Homeseer

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

    #46
    I'm currently at a loss as to why this is happening. From your description it easily pinpoints the area of code that is causing it, however there is nothing wrong with what has been written.

    The file it cannot find is HomeSeer.exe which clearly is there!

    Because this sometimes works and not at other times, all I can think is that it is a timing error. I'll try and compile a new version over the weekend with a time delay between when HS shuts down and restarts.
    Jon

    Comment


      #47
      Thanks.

      Your suggestion may help. I have had it work sometimes and other times not. I have no rhyme or reason why. I have an event that uses your other programt to shutdown programs such as iexplorer if it's up before it attempts the restart.

      I run this restart at 3:45am. If Time Warner has the web connect unavailable at that time (dns change, whatever), could it have any affect?

      Look forward to trying it. I really can't think of anything else. I have attempted to run the event manually while at home in the evening and it seems to work fine then. I just am not sitting there at 3:45am. There's really no system activity at that time either. It's the gnomes I guess.

      Comment


        #48
        Steve,

        Your comment about shutting down other programs may be key here.

        Could you give me a step by step of what you do at this time?

        If you are just restarting Homeseer, why are you closing these other programs as well?
        Jon

        Comment


          #49
          I think I have an idea. I am wondering if my backerupp.exe is running a little too close to the restart. I started backerupp.exe and while it was running I ran my jonrestart event. I got my error! This was the first time I could reproduce the error. I wasn't thinking that your app shutdown program was the problem. I think my scheduling put it at risk (current theory anyway).
          I will tonight try backerupp at 2am and then restart at 3:30am giving ample time in between.


          I first shut down other apps using your program with the following ini;
          [App1]
          AppProcessName = "msimn"
          AppPath="|"
          AppClose = 1
          AppCloseWaitTime = 5
          AppForce = 1
          AppForceWaitTime = 5
          AppRestart = 0
          AppRestartDelay = 0
          RestartPC = 0
          AppPriority = 0
          EventRunning = ""
          EventNotRunning = ""
          Logging = 1

          [App2]
          AppProcessName = "notepad"
          AppPath="|"
          Parameters = ""
          AppClose = 1
          AppCloseWaitTime = 5
          AppForce = 1
          AppForceWaitTime = 5
          AppRestart = 0
          AppRestartDelay = 0
          RestartPC = 0
          AppPriority = 0
          EventRunning = ""
          EventNotRunning = ""
          Logging = 1

          [App3]
          AppProcessName = "iexplore"
          AppPath = "|"
          Parameters = ""
          AppClose = 1
          AppCloseWaitTime = 5
          AppForce = 1
          AppForceWaitTime = 7
          AppRestart = 0
          AppRestartDelay = 0
          RestartPC = 0
          AppPriority = 0
          EventRunning = ""
          EventNotRunning = ""
          Logging = 1

          Comment


            #50
            OK, I'll wait until you have done your tests!
            Jon

            Comment


              #51
              HS was up and running this morning!

              It may be that the back ups were running just too close to the restart. Since I could reproduce the problem, that may be it. Have to see if I get a clean week.

              If this proves out, I may add a flag to the restart job so restart won't run unless the flag (device) is off to avoid future collisions.

              Comment


                #52
                That's promising! Let me know the outcome!
                Jon

                Comment


                  #53
                  Well it ran fine for 5 days straight. Then, 3 days in a row same error. So I reoriented the Backerupp to occur at 3:30am and the restart to occur at 3:00am. So it should be restarted before so it can't possibly hit it.
                  Happened again this morning. Got the following:



                  =================

                  ************** Exception Text **************
                  System.ComponentModel.Win32Exception: The system cannot find the file specified
                  at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessSt artInfo startInfo)
                  at System.Diagnostics.Process.Start()
                  at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
                  at System.Diagnostics.Process.Start(String fileName)
                  at WindowsApplication2.Form1.Form1_Load(Object sender, EventArgs e)
                  at System.EventHandler.Invoke(Object sender, EventArgs e)
                  at System.Windows.Forms.Form.OnLoad(EventArgs e)
                  at System.Windows.Forms.Form.OnCreateControl()
                  at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
                  at System.Windows.Forms.Control.CreateControl()
                  at System.Windows.Forms.Control.WmShowWindow(Message& m)
                  at System.Windows.Forms.Control.WndProc(Message& m)
                  at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
                  at System.Windows.Forms.ContainerControl.WndProc(Message& m)
                  at System.Windows.Forms.Form.WmShowWindow(Message& m)
                  at System.Windows.Forms.Form.WndProc(Message& m)
                  at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(M essage& m)
                  at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Mes sage& m)
                  at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


                  ************** Loaded Assemblies **************
                  mscorlib
                  Assembly Version: 2.0.0.0
                  Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
                  CodeBase: file:///C:/windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
                  ----------------------------------------
                  Jon00RestartHS
                  Assembly Version: 1.0.0.0
                  Win32 Version: 1.0.0.0
                  CodeBase: file:///C:/Program%20Files/HomeSeer%202/Jon00RestartHS.exe
                  ----------------------------------------
                  Microsoft.VisualBasic
                  Assembly Version: 8.0.0.0
                  Win32 Version: 8.0.50727.1433 (REDBITS.050727-1400)
                  CodeBase: file:///C:/windows/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
                  ----------------------------------------
                  System.Windows.Forms
                  Assembly Version: 2.0.0.0
                  Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
                  CodeBase: file:///C:/windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
                  ----------------------------------------
                  System
                  Assembly Version: 2.0.0.0
                  Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
                  CodeBase: file:///C:/windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
                  ----------------------------------------
                  System.Drawing
                  Assembly Version: 2.0.0.0
                  Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
                  CodeBase: file:///C:/windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
                  ----------------------------------------
                  System.Runtime.Remoting
                  Assembly Version: 2.0.0.0
                  Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
                  CodeBase: file:///C:/windows/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
                  ----------------------------------------

                  ************** JIT Debugging **************
                  To enable just-in-time (JIT) debugging, the .config file for this
                  application or computer (machine.config) must have the
                  jitDebugging value set in the system.windows.forms section.
                  The application must also be compiled with debugging
                  enabled.

                  For example:

                  <configuration>
                  <system.windows.forms jitDebugging="true" />
                  </configuration>

                  When JIT debugging is enabled, any unhandled exception
                  will be sent to the JIT debugger registered on the computer
                  rather than be handled by this dialog box.

                  Comment


                    #54
                    Steve,

                    I'm currently at a loss. This is obviously specific to your setup but there is nothing much more I can do. As I said before, it's looking for Homeseer.exe but cannot find it. I just do not know why.
                    Jon

                    Comment


                      #55
                      I wish it told me 'what' was looking for Homeseer and then maybe I could find something.

                      Comment


                        #56
                        It's my exe that cannot find Homeseer.exe to restart it. It's odd that this works sporadically and that you are the only one experiencing this.
                        Jon

                        Comment


                          #57
                          Originally posted by jon00 View Post
                          It's my exe that cannot find Homeseer.exe
                          Yeah this is weird. Any log files I can send you?

                          I just tried it and it failed same way just now.

                          Comment


                            #58
                            I grabbed the final log. Here's what's in it but nothing weird.

                            =========================================


                            8/1/2008 6:24:08 PM ~!~Database Item~!~Saving Event Homeseer Application Only Restart
                            8/1/2008 6:24:30 PM ~!~Info~!~Event Trigger "Homeseer Application Only Restart Nightly"
                            8/1/2008 6:24:36 PM ~!~Info~!~Speak ():Attempting nightly restart of Home Seer application
                            8/1/2008 6:24:40 PM ~!~Info~!~Event Trigger "Thermostat Set Fan Auto (delayed event)-1"
                            8/1/2008 6:24:40 PM ~!~Info~!~Event Trigger "Thermostat Set Fan Auto"
                            8/1/2008 6:24:40 PM ~!~Info~!~Deleting event after run: "Delayed Actions Thermostat Set Fan Auto (delayed event)-1"
                            8/1/2008 6:24:40 PM ~!~Info~!~Event Trigger "Thermostat Set Fan Auto (delayed event)-2"
                            8/1/2008 6:24:40 PM ~!~Info~!~Event Trigger "Thermostat Set Fan Auto"
                            8/1/2008 6:24:40 PM ~!~Info~!~Deleting event after run: "Delayed Actions Thermostat Set Fan Auto (delayed event)-2"
                            8/1/2008 6:24:40 PM ~!~Info~!~Event Trigger "Thermostat Set Fan Auto (delayed event)-3"
                            8/1/2008 6:24:40 PM ~!~Info~!~Event Trigger "Thermostat Set Fan Auto"
                            8/1/2008 6:24:40 PM ~!~Info~!~Deleting event after run: "Delayed Actions Thermostat Set Fan Auto (delayed event)-3"
                            8/1/2008 6:24:40 PM ~!~Info~!~Event Trigger "Homeseer Application Only Restart"
                            8/1/2008 6:24:41 PM ~!~Info~!~Event Trigger "Thermostat Set Fan Auto (delayed event)-4"
                            8/1/2008 6:24:41 PM ~!~Info~!~Event Trigger "Thermostat Set Fan Auto"
                            8/1/2008 6:24:41 PM ~!~Info~!~Deleting event after run: "Delayed Actions Thermostat Set Fan Auto (delayed event)-4"
                            8/1/2008 6:24:42 PM ~!~Info~!~Event Trigger "Thermostat Set Fan Auto (delayed event)-5"
                            8/1/2008 6:24:42 PM ~!~Info~!~Event Trigger "Thermostat Set Fan Auto"
                            8/1/2008 6:24:42 PM ~!~Info~!~Deleting event after run: "Delayed Actions Thermostat Set Fan Auto (delayed event)-5"
                            8/1/2008 6:24:42 PM ~!~Info~!~Event Trigger "Thermostat Set Fan Auto (delayed event)-6"
                            8/1/2008 6:24:42 PM ~!~Info~!~Event Trigger "Thermostat Set Fan Auto"
                            8/1/2008 6:24:42 PM ~!~Info~!~Deleting event after run: "Delayed Actions Thermostat Set Fan Auto (delayed event)-6"
                            8/1/2008 6:24:43 PM ~!~Info~!~Event Trigger "Thermostat Set Fan Auto (delayed event)-7"
                            8/1/2008 6:24:43 PM ~!~Info~!~Event Trigger "Thermostat Set Fan Auto"
                            8/1/2008 6:24:43 PM ~!~Info~!~Deleting event after run: "Delayed Actions Thermostat Set Fan Auto (delayed event)-7"
                            8/1/2008 6:24:43 PM ~!~Info~!~Event Trigger "Thermostat Set Fan Auto (delayed event)-8"
                            8/1/2008 6:24:43 PM ~!~Info~!~Event Trigger "Thermostat Set Fan Auto"
                            8/1/2008 6:24:43 PM ~!~Info~!~Deleting event after run: "Delayed Actions Thermostat Set Fan Auto (delayed event)-8"
                            8/1/2008 6:24:44 PM ~!~Info~!~Event Trigger "Thermostat Set Fan Auto (delayed event)-9"
                            8/1/2008 6:24:44 PM ~!~Info~!~Event Trigger "Thermostat Set Fan Auto"
                            8/1/2008 6:24:44 PM ~!~Info~!~Deleting event after run: "Delayed Actions Thermostat Set Fan Auto (delayed event)-9"
                            8/1/2008 6:24:44 PM ~!~Info~!~Event Trigger "Thermostat Set Fan Auto (delayed event)-10"
                            8/1/2008 6:24:44 PM ~!~Info~!~Event Trigger "Thermostat Set Fan Auto"
                            8/1/2008 6:24:44 PM ~!~Info~!~Deleting event after run: "Delayed Actions Thermostat Set Fan Auto (delayed event)-10"
                            8/1/2008 6:24:45 PM ~!~Info~!~Event Trigger "Thermostat Set Fan Auto (delayed event)-11"
                            8/1/2008 6:24:45 PM ~!~Info~!~Event Trigger "Thermostat Set Fan Auto"
                            8/1/2008 6:24:45 PM ~!~Info~!~Deleting event after run: "Delayed Actions Thermostat Set Fan Auto (delayed event)-11"
                            8/1/2008 6:24:46 PM ~!~Info~!~Event Trigger "Thermostat Set Fan Auto (delayed event)"
                            8/1/2008 6:24:46 PM ~!~Info~!~Event Trigger "Thermostat Set Fan Auto"
                            8/1/2008 6:24:46 PM ~!~Info~!~Deleting event after run: "Delayed Actions Thermostat Set Fan Auto (delayed event)"
                            8/1/2008 6:24:47 PM ~!~Info~!~Speak ():Attempting to shut down ancillary applications
                            8/1/2008 6:24:50 PM ~!~Info~!~Running script and waiting: Jon00AppControl.vben("main","1;2;3")
                            8/1/2008 6:24:50 PM ~!~Jon00_AppCntl~!~The process msimn is not running!
                            8/1/2008 6:24:50 PM ~!~Jon00_AppCntl~!~The process notepad is not running!
                            8/1/2008 6:24:50 PM ~!~Jon00_AppCntl~!~The process iexplore is not running!
                            8/1/2008 6:24:52 PM ~!~Info~!~Speak ():Attempting to restart the Home Seer application via jon 0 0 function
                            8/1/2008 6:24:57 PM ~!~Info~!~Device: Bedroom Master Ceiling Light (G14) OFF
                            8/1/2008 6:24:59 PM ~!~Info~!~Application shutdown at 8/1/2008 6:24:59 PM
                            8/1/2008 6:24:59 PM ~!~Info~!~Running shutdown script ...
                            8/1/2008 6:24:59 PM ~!~Info~!~Shutdown Script Completed
                            8/1/2008 6:24:59 PM ~!~Info~!~Removing Plug-in Links...
                            8/1/2008 6:24:59 PM ~!~Info~!~Removing all Callbacks...
                            8/1/2008 6:24:59 PM ~!~Info~!~Shutting down plug-ins ...
                            8/1/2008 6:24:59 PM ~!~Shutdown~!~Shutting down X10 plug-in.
                            8/1/2008 6:24:59 PM ~!~Shutdown~!~Shutting down all I-O/Generic plug-ins.
                            8/1/2008 6:24:59 PM ~!~Shutdown~!~Shutting down plug-in: DooNetwork
                            8/1/2008 6:24:59 PM ~!~Shutdown~!~Shutting down plug-in: mcsTemperature
                            8/1/2008 6:24:59 PM ~!~mcsTemperature~!~Closed Comm Port 4
                            8/1/2008 6:24:59 PM ~!~mcsTemperature~!~Return to HS following Shutdown
                            8/1/2008 6:24:59 PM ~!~Shutdown~!~Shutting down plug-in: RCS Serial Thermostats
                            8/1/2008 6:24:59 PM ~!~Shutdown~!~Shutting down plug-in: Applied Digital Ocelot
                            8/1/2008 6:25:01 PM ~!~Shutdown~!~Shutting down plug-in: Media Player
                            8/1/2008 6:25:01 PM ~!~Shutdown~!~Shutting down plug-in: MR26A RF Receiver ver 2
                            8/1/2008 6:25:01 PM ~!~Shutdown~!~MR26A Communications Module Shutting Down
                            8/1/2008 6:25:01 PM ~!~Info~!~MR26A Interface shutting down
                            8/1/2008 6:25:01 PM ~!~Shutdown~!~Shutting down plug-in: DooMotion
                            8/1/2008 6:25:01 PM ~!~DooMotion Info~!~Shutting down ...
                            8/1/2008 6:25:01 PM ~!~DooMotion Info~!~DooMotion has shut down
                            8/1/2008 6:25:01 PM ~!~Shutdown~!~Shutting down plug-in: mcsSprinklers
                            8/1/2008 6:25:01 PM ~!~Shutdown~!~Shutting down plug-in: mcsSprinklersS
                            8/1/2008 6:25:01 PM ~!~Shutdown~!~Finished shutting down all I-O/Generic plug-ins.
                            8/1/2008 6:25:01 PM ~!~Database~!~Saving Devices...
                            8/1/2008 6:25:01 PM ~!~Database~!~Processed: 100 devices...
                            8/1/2008 6:25:01 PM ~!~Database~!~Processed: 200 devices...
                            8/1/2008 6:25:01 PM ~!~Database~!~Processed: 300 devices...
                            8/1/2008 6:25:01 PM ~!~Database~!~Processed: 400 devices...
                            8/1/2008 6:25:01 PM ~!~Database~!~Processed: 500 devices...
                            8/1/2008 6:25:01 PM ~!~Database~!~Processed: 600 devices...
                            8/1/2008 6:25:01 PM ~!~Database~!~Finished: 600 devices, applying device changes to database...
                            8/1/2008 6:25:02 PM ~!~Database~!~Finished applying device changes to the database.
                            8/1/2008 6:25:02 PM ~!~Database~!~Saving Events...
                            8/1/2008 6:25:02 PM ~!~Database~!~Processed: 100 events...
                            8/1/2008 6:25:02 PM ~!~Database~!~Processed: 200 events...
                            8/1/2008 6:25:02 PM ~!~Database~!~Processed: 300 events...
                            8/1/2008 6:25:02 PM ~!~Database~!~Processed: 400 events...
                            8/1/2008 6:25:02 PM ~!~Database~!~Finished: 462 events, applying changes to the database...
                            8/1/2008 6:25:02 PM ~!~Database~!~Updating Events
                            8/1/2008 6:25:03 PM ~!~Database~!~Updating Event Actions
                            8/1/2008 6:25:03 PM ~!~Info~!~MR26A Interface stopped
                            8/1/2008 6:25:03 PM ~!~Database~!~Updating Event Conditions
                            8/1/2008 6:25:03 PM ~!~Database~!~Finished applying event changes to the database.
                            8/1/2008 6:25:03 PM ~!~Database~!~Saving TV Timers...
                            8/1/2008 6:25:03 PM ~!~Info~!~Saving device status ...
                            8/1/2008 6:25:03 PM ~!~Info~!~Shutting down web server ...
                            8/1/2008 6:25:03 PM ~!~Info~!~Web Server stopped
                            8/1/2008 6:25:03 PM ~!~Info~!~Shutting down email ...
                            8/1/2008 6:25:03 PM ~!~Info~!~Shutting down threads ...
                            8/1/2008 6:25:03 PM ~!~Info~!~Shutting down Phone ...
                            8/1/2008 6:25:03 PM ~!~Info~!~Saving address book
                            8/1/2008 6:25:03 PM ~!~Info~!~Saving mailboxes
                            8/1/2008 6:25:03 PM ~!~Info~!~Shutting down phone line Default Line
                            8/1/2008 6:25:04 PM ~!~End~!~-------------------------------------------------------------------
                            8/1/2008 6:25:04 PM ~!~End~!~ HomeSeer Successfully Shut Down Now
                            8/1/2008 6:25:04 PM ~!~End~!~-------------------------------------------------------------------

                            Comment


                              #59
                              I have now reset it 3 times successfully. Trying to figure out what messes it up.

                              Comment


                                #60
                                Originally posted by kw1816 View Post
                                Hmmmm, Jon, is there any possibity to add this functionality to Jon00RestartHS.exe ? Perhaps a switch to shutdown HS but not restart it ?
                                Jon, I would like to add another request for this. It would be great if there were a Jon00RestartHS switch that gracefully shutdown Homeseer, but did not try and restart. Or perhaps a separate version - maybe Jon00ShutdownHS.exe

                                In my case, I am moving my Homeseer environment into VMware. I am creating a batch file as a pre-shutdown exec for all of the processes running on the guest-VM. Without the pre-exec, VMware simply does the equivalent of a Windows Start -> Turn Off Computer, which does not properly shutdown Homeseer.

                                Comment

                                Working...
                                X