Announcement

Collapse
No announcement yet.

Restarting Homeseer

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

    #76
    To close homeseer gracefully through the application, you have to make sure that the "X" closes Homeseer is checked under the edit heading in the HS GUI.

    Nothing has changed so I'm at a loss as to why this has now started.
    Jon

    Comment


      #77
      Well, it's certainly confusing me. I confirmed that 'close with X' was checked and I also closed HS that way with no problem. Then I tried to restart again while sitting in front of my HS machine with Task Manager open and watching the log. Of course, the restart went without a hitch!? Initially I was concerned because the HomeSeer.exe process did not disappear from the Task Manager list, but maybe it went and returned so quickly I didn't notice?

      The only other thing I observed was that the GUI log showed two instances of the shutdown event, even though I am certain I pressed the Run button just once. Interestingly, the log file does not include any record of the HS Restart event. There's just a time gap between 8:39:46 and 8:40:12.

      10/3/2008 8:39:34 AM ~!~Info~!~Event Trigger "Audio Status"
      10/3/2008 8:39:34 AM ~!~Info~!~Running script and waiting: Request Zone Status.vb
      10/3/2008 8:39:39 AM ~!~X10 Received~!~B15 (RF Motion Master Bath Shower PIR) B Off
      10/3/2008 8:39:39 AM ~!~JDS StarGate~!~Flag [25 (JDS MBMot) set to OFF
      10/3/2008 8:39:41 AM ~!~X10 Received~!~B9 (RF Motion Master Bath Entry PIR) B Off
      10/3/2008 8:39:43 AM ~!~JDS StarGate~!~Flag [25 (JDS MBMot) set to OFF
      10/3/2008 8:39:46 AM ~!~X10 Received~!~B11 (RF Motion Master Bath Toilet PIR) B Off
      10/3/2008 8:39:46 AM ~!~JDS StarGate~!~Flag [25 (JDS MBMot) set to OFF
      10/3/2008 8:40:12 AM ~!~Info~!~Application shutdown at 10/3/2008 8:40:12 AM
      10/3/2008 8:40:13 AM ~!~Info~!~Running shutdown script ...
      10/3/2008 8:40:13 AM ~!~Info~!~Shutdown Script Completed
      10/3/2008 8:40:13 AM ~!~Info~!~Removing Plug-in Links...
      10/3/2008 8:40:13 AM ~!~Info~!~Removing all Callbacks...
      10/3/2008 8:40:13 AM ~!~Info~!~Shutting down plug-ins ...
      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


        #78
        Shutdown but not restart

        Hej Jon00
        I wish to shutdown HS and after that run the WinXP command Shutdown -r to get at complete restart of the computer and homeseer.

        I seems like your restartHS closes down and restarts HS a second after.
        Is there a way to only close down HS in a safe manner?
        Best,
        Jakob Sand, I automate everything!

        Comment


          #79
          Indeed. Look at post 63 of this thread!
          Jon

          Comment


            #80
            Restart of Computer and HS shutdown

            Hi Jon,
            If I try in an event to launch first the windows app: shutdown.exe -r, for a restart and then run your Jon00Shutdown.exe, HS newer gets to your HS Shutdown.exe

            The shutdown windows process gives HS 20 sec. to finalize but as I said never gets there.
            What do I do wrong?
            Best,
            Jakob Sand, I automate everything!

            Comment


              #81
              Jakob,

              I've just re-read your requirement.

              Just use the HS script command hs.restartsystem which will close HS and then restart your PC.
              Jon

              Comment


                #82
                Originally posted by Jakob.Sand View Post
                Hi Jon,
                If I try in an event to launch first the windows app: shutdown.exe -r, for a restart and then run your Jon00Shutdown.exe, HS newer gets to your HS Shutdown.exe

                The shutdown windows process gives HS 20 sec. to finalize but as I said never gets there.
                What do I do wrong?

                shutdown.exe -f -r -t 60

                That gives you 60 seconds before the actual shut down process starts.


                ~Bill

                Comment


                  #83
                  Jon,
                  I was having difficulty using the restart exe a year ago, and since it wasn't critical I set it aside. I now have a need to automatically restart HS, so I'm revisiting.

                  I have confirmed that the behavior I was seeing then is still occurring: Jon00RestartHS.exe shuts HS down with no problem, but when it tries to restart, sometimes it works, but sometimes there are two message boxes stating that HS is already running.

                  If Windows Task Manager is running, though, HS restarts without the message box problem!

                  However, on closer examination, it's not quite that simple. After HS restarts, just as it is getting to the point where it is to reconnect to the Speaker app, HS is killed ...and then it restarts again. Aside from the warning that it wasn't shut down properly, there doesn't seem to be any harm done, but it does seem needlessly violent.

                  Any ideas about what is happening?
                  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


                    #84
                    That is a strange one. I'm wondering if it is a timing issue. If you shutdown Homeseer manually, how long does it take to close completely?
                    Jon

                    Comment


                      #85
                      When I want to restart HS I place a 45 second delay between when the Homeseer process is no longer found and when HS is restarted. If I do not delay then I get the Homeseer already running messages.

                      I also know that when .exe plugins are running HS often is unable to close them down before HS closes down. Rich's solution to this is for the .exe plugin to monitor itself after shutdown commanded and terminate itself after a timeout. My first thought was that this and the quick restart were related, but I have no confirmation. The simple solution of 45 second delay was good enough for me.

                      Comment


                        #86
                        Originally posted by jon00 View Post
                        That is a strange one. I'm wondering if it is a timing issue. If you shutdown Homeseer manually, how long does it take to close completely?
                        I just timed it. From a click on 'X' to the disappearance of the HS GUI is 12-18 sec (two runs). The HS process disappears from Task Manager at the same time as the HS GUI vanishes.
                        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


                          #87
                          Well that is not the issue then. I think the wait time is up to 2 minutes. The Exe checks to see if the HS process is running and will only restart it, when it sees that it has stopped. As Michael states, it could be a plugin causing the issue.

                          How are you calling the restart app? If you are running it from a script/event, you could try using hs.shutdown immediately after running it.
                          Jon

                          Comment


                            #88
                            I've been testing it using an event action, but I can put it in a script and follow with hs.shutdown. I'll let you know what I observe.
                            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


                              #89
                              Success?

                              I tried your suggestion and if one successful trial is proof, then it works. I am getting an error in the log, though.

                              This is the script:
                              Code:
                              sub main()
                                            hs.Launch Jon00RestartHS
                                            hs.Shutdown
                              end sub
                              This is the log:
                              11/3/2009 9:33:24 AM ~!~Info~!~Event Trigger "Restart HS"
                              11/3/2009 9:33:24 AM ~!~Info~!~Running script in background: Restart_shutdown.txt
                              11/3/2009 9:33:24 AM ~!~Error~!~Launching application: ->Object reference not set to an instance of an object.
                              11/3/2009 9:33:24 AM ~!~Info~!~Event Trigger "Restart HS"
                              11/3/2009 9:33:24 AM ~!~Info~!~Application shutdown request from external interface.
                              11/3/2009 9:33:25 AM ~!~Info~!~Application shutdown at 11/3/2009 9:33:25 AM
                              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


                                #90
                                Try:

                                sub main()
                                hs.launch hs.GetAppPath & "\Jon00RestartHS.exe","", , 1
                                hs.shutdown
                                end sub
                                Jon

                                Comment

                                Working...
                                X