Announcement

Collapse
No announcement yet.

[VBScript] Max_Uptime_v2 Script

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

    [VBScript] Max_Uptime_v2 Script

    This is the discussion for Max Uptime Version 2. It is an entirely different script than Version 1, hence the new discussion thread.

    Script can be found here

    #2
    Where does the ini file go?

    Does the ini file belong in the config directory with all the other ini files?
    James

    Running HS 3 on Win10 .

    Comment


      #3
      Yes

      Comment


        #4
        A question

        I might be missing something, but this version 2 script, when run as indicated in the Max_Uptime_v2.txt file only updates the 'Intentional' setting in the uptime.ini file. The actual uptimes are only updated if you run the script with no parameters. Is that correct?

        If that is correct, I assume you are you supposed to run the script periodically to update the ini file's runtimes and the shutdown and startup parts are only to track if a shutdown was intentional or not?
        Dick
        HS PRO 2.5.0.81, WinXP, IE8, Shuttle XS35V3, 2.13GHz, 4GB, 40GB SSD drive, AC-RF2, ADIOcelot, Message Server, TI103, SNEVL CID, pjcOutlook, MCSTemperature, Powertrigger, BLBackup, BLFloorplan, BLIcon, BLOccupied, BLRadar, BLRfid, BLLogMonitor, ACPUPSD, UltraECM, WeatherXML & Stipus' script connector. 500+ devices, 260+ events, 1-wire weather station + temp/humidity sensors & Oregon Scientific temp & humidity sensors & 2 Brultech ECM-1240s

        Comment


          #5
          On startup it runs FirstRun to update Intentional

          periodically ran (with no params) it will update Current, and MaxOverall if current passes MaxOverall

          On shutdown it runs LastRun to update Intentional. This is how it knows if HS was shut down intentionally.

          So, yes your second paragraph is correct. I added a little better instructions and will upload it shortly.

          EDIT: the times for maxFault and maxNoFault will not update until the next time HS is started.
          Last edited by MeSteve; December 19, 2006, 08:58 PM.

          Comment


            #6
            Just downloaded and tested...works great..I really like the idea in this script.

            Well done!

            Comment


              #7
              Please grab the new version as I had to fix a bug.

              The bug would show incorrect incriment titles under certain situations.

              Comment


                #8
                New version posted that fixed a bug where the longest times with and without a faulty shutdown were being overwritten.

                Comment


                  #9
                  Thanks for the update...I think its a great script.

                  Comment


                    #10
                    Originally posted by darren-mc View Post
                    Thanks for the update...I think its a great script.
                    Thanks

                    Comment


                      #11
                      Just completed a re-start of HS with the new updated script I get the following error:

                      Code:
                      05/01/2007 14:45:29  - Error - Running script, script run or compile error in file: Max_Uptime_v2.txt13:Type mismatch: 'Current_Parts' in line 162 More info: Type mismatch: 'Current_Parts'
                      Can you shed some light?

                      Thanks

                      Darren

                      Comment


                        #12
                        Take a look at your ini file and make sure the string looks correct. It looks like the ini string for the current uptime may not be a number. Actually, that value comes directly from HS. Did it just show up the first time or is the error continuous?

                        Comment


                          #13
                          Originally posted by darren-mc View Post
                          Just completed a re-start of HS with the new updated script I get the following error:

                          Code:
                          05/01/2007 14:45:29  - Error - Running script, script run or compile error in file: Max_Uptime_v2.txt13:Type mismatch: 'Current_Parts' in line 162 More info: Type mismatch: 'Current_Parts'
                          Can you shed some light?

                          Thanks

                          Darren

                          I get that in mine on the first call, then after that it runs just fine.. Are you seeing this error everytime you call the script??

                          TrOjAN

                          Comment


                            #14
                            I've just got this error too:

                            06/01/2007 12:38:07 Error Running script, script run or compile error in file: Max_Uptime_v2.txt13:Type mismatch: 'Current_Parts' in line 162 More info: Type mismatch: 'Current_Parts'

                            This is the first time I have restarted HS since I originally put the v2 script on (8 Days) - I have copied over the 2 updates since then without restarting HS.

                            OK - I have just restarted HS again and get the same error - I DON'T get the error when I run the script from within HS so it seems to be confined to when it is run at startup...

                            Also the homeseer log window just froze on me (now there's a surprise) so I had to end task it... was expecting the Max Uptime w/F (with fault) to have been updated to show an uptime of about 5-10 minutes but it still reads zero...
                            Last edited by steve-l; January 6, 2007, 08:20 AM.

                            Comment


                              #15
                              OK, found what is causing the error on restart.

                              Steve, Try this one out. I think I found all the bugs.
                              Attached Files

                              Comment

                              Working...
                              X