Announcement

Collapse
No announcement yet.

Restarting Homeseer

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

    #61
    Have you tried the scripting function hs.shutdown?
    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


      #62
      Originally posted by Uncle Michael View Post
      Have you tried the scripting function hs.shutdown?
      I guess the suggestion is to create a .vbs and use Windows Scripting Host outside of Homeseer. I was thinking of an executable that I call from within a batch file. I'm not exactly sure how to use a .vbs from within a batch file. Would I have to create a VB program and compile it? Hopefully there is an easier way. Thanks!

      EDIT:

      Ahhh... Search is a wonderful thing! I think that I found an old post on how to do this. Thanks for pointing me in the right direction.
      Last edited by automateme; August 6, 2008, 11:08 AM.

      Comment


        #63
        Your wish is my command

        Just place Jon00ShutdownHS.exe in your Homeseer 2 directory and run it however you wish. I have not tested it as a command line but it should work.

        Like the restart application, it will keep trying to gracefully shutdown Homeseer for 2 minutes. If that fails, Homesser is killed.
        Attached Files
        Jon

        Comment


          #64
          Originally posted by sponnath View Post
          I have now reset it 3 times successfully. Trying to figure out what messes it up.
          Steve,

          As I was playing around writing the shutdown version, I also reloaded the restart version and made a change which increase some of the timings. Give it a try and see if it makes any difference to your issues.
          Attached Files
          Jon

          Comment


            #65
            Originally posted by jon00 View Post
            Your wish is my command

            Just place Jon00ShutdownHS.exe in your Homeseer 2 directory and run it however you wish. I have not tested it as a command line but it should work.

            Like the restart application, it will keep trying to gracefully shutdown Homeseer for 2 minutes. If that fails, Homesser is killed.
            Wow!!!! Thanks Jon. I can't wait to try it this evening when I get home. This will solve one of my remaining concerns over moving into VMware land. I'll report back later today on how it works from the command line.

            Comment


              #66
              Originally posted by jon00 View Post
              Your wish is my command

              Just place Jon00ShutdownHS.exe in your Homeseer 2 directory and run it however you wish. I have not tested it as a command line but it should work.

              Like the restart application, it will keep trying to gracefully shutdown Homeseer for 2 minutes. If that fails, Homesser is killed.
              Works like a champ Jon. Thanks again!

              Comment


                #67
                Originally posted by jon00 View Post
                Steve,
                As I was playing around writing the shutdown version, I also reloaded the restart version and made a change which increase some of the timings. Give it a try and see if it makes any difference to your issues.
                Thanks. Will try this tonight.

                I noticed that my existing 75G Raptor drive in my Abit AB9 Pro was getting a lot of errors. I'm not sure that one of the Sata headers liked that Raptor. I got a new Raptor, let the old one offline as emergency backup and installed the new one on a different Sata header. I no longer get the drive read/write errors. I wanted to eliminate any possibilities of system problems before continuing on this 'quest'.

                Comment


                  #68
                  Nope, just tried it. Same error.


                  Sure wished this worked. Getting tired of restarted HS every morning.

                  Anything else I can check? Are you looking for something in particular to find HS? I start it from the start up folder using a delay exe.

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



                  ************** 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 WindowsApplication1.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
                  ----------------------------------------
                  WindowsApplication1
                  Assembly Version: 1.0.0.0
                  Win32 Version: 1.0.0.0
                  CodeBase: file:///C:/Program%20Files/HomeSeer%202/Jon00RestartHS_A.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
                  ----------------------------------------

                  Comment


                    #69
                    Steve,

                    Try version B. I have hard coded the path to Homeseer (C:\Program Files\Homeseer 2\HomeSeer.exe) with this version. See if that now works.

                    If that fails, it must be something taking ownership of the file, maybe your start-up delayer program.
                    Attached Files
                    Jon

                    Comment


                      #70
                      Originally posted by automateme View Post
                      I guess the suggestion is to create a .vbs and use Windows Scripting Host outside of Homeseer.

                      EDIT: Ahhh... Search is a wonderful thing! I think that I found an old post on how to do this. Thanks for pointing me in the right direction.
                      Actually, I made the poor assumption that you had a way to inform HS that it was time to shut down. One alternative that might work is the Script Connector plug-in. But it sounds as if Jon has already got a simpler solution.
                      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


                        #71
                        Originally posted by Uncle Michael View Post
                        Actually, I made the poor assumption that you had a way to inform HS that it was time to shut down. One alternative that might work is the Script Connector plug-in. But it sounds as if Jon has already got a simpler solution.
                        No, there is no specific way to notify a running application (in this case Homeseer). VMware gives you the choice of "Restarting" the guest, which is the equivalent of doing a Start->Shutdown->Restart from within Windows. Optionally, you can have VMware run a batch file before it does the Start->Shutdown->Restart. That is why I needed the application that Jon so kindly created. Now, I can add the line "start /WAIT Jon00ShutdownHS.exe" in my shutdown pre-exec batch file and gracefully shutdown Homeseer before VMware pulls the plug. I have several Guest-VM's on this Host running Windows 2003 Server, and when I need to apply Microsoft security patches to the Host and reboot, it was a pain to go to each Windows and Linux guest and shut them down individually before I rebooted the Host. I have been working to clean-up all of the guest shutdowns, so that when I Start->Shutdown->Restart the Windows 2003 Host, it automatically (and cleanly) shuts down the guests first. Getting VERY close to having this work perfectly.

                        Comment


                          #72
                          Originally posted by jon00 View Post
                          Steve,

                          Try version B. I have hard coded the path to Homeseer (C:\Program Files\Homeseer 2\HomeSeer.exe) with this version. See if that now works.

                          If that fails, it must be something taking ownership of the file, maybe your start-up delayer program.
                          I'll give this one a try. I had left my machine running for a while to see what long term impact was with the version with longer timings. It just ran for a couple of weeks (I was out of town) until last night. I thought maybe I was out of the woods. Last night the only thing I did was to update my trendmicro virus software. This morning, same issue. But that's a couple of weeks plus without incident!

                          I don't think the restart software is an issue as it only starts HS on a reboot. But I won''t rule that out. I will do some tests of HS that I have manually started and some started by that software.

                          Comment


                            #73
                            Jon,
                            Just a FYI. I recently began having problems with the RestartHS program. It's been working without a problem for at least a year, but the last couple of weeks it's generated "HomeSeer.exe is already running" or something like that. (Two message boxes.) If I click the two OK's, then start HS, it would restart fine.

                            I just downloaded the latest version in the first post of this thread, and it worked without the errors. I'm running XP Home, so I didn't really think it would make any difference, but it did.
                            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


                              #74
                              It could be that as your system has grown, the time taken for Homeseer to shutdown has gone past the pre-set limits in the original exe. I increased this in later versions which is why it is now probably working.
                              Jon

                              Comment


                                #75
                                Oops. Misinformation.

                                Jon,
                                Sorry, but I was wrong. My initial success with the new version was a fluke.

                                I just tried it again and it failed the same way as before. I opened Task Manager and noticed two instances of HomeSeer.exe in the process list. Each disappeared, in turn, when I clicked on the OK buttons in the message boxes. What is more strange is that the program now waits much longer than I would wait before restarting HS.

                                I stop HS manually by selecting File/Exit from the menu, not by clicking on the red X in the corner. Are the sequences of events different for the two modes?
                                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