Announcement

Collapse
No announcement yet.

Max uptime

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

    Max uptime

    Does anyone have a script that works for setting max uptime on a realtime basis. By realtime, I mean every time the event is ran. I am currently doing a if uptime > myMax then myMax = uptime. Problem is, at 7 minutes past, it see the minute 7 of my max and compares it to the first number in the teens or 20's and so on so it won't update again until the next hour, when the hour is greater again.

    #2
    Try this

    TrOjAn
    Attached Files

    Comment


      #3
      I can get current uptime, I want maximum uptime.

      Comment


        #4
        MeSteve,

        What are you trying to accomplish by your HS computer gaining this knowledge?

        I could be wrong, and not for the first time here, but; say what is is you are trying to accomplish. There could just be other ways to do it.
        sigpic
        A founder member of "The HA Pioneer Group" otherwise known as the "Old farts club!"

        Comment


          #5
          Originally posted by MeSteve
          I can get current uptime, I want maximum uptime.
          Ahh yes, wondered if thats what you ment, so basically your after keeping track of your recorded maximum uptime ever!

          Ill see what can be done, TrOjAn

          Gogs. Its one of those data things to show on the hs homepage, my record uptime is xxxxx in my case 1 day ROFLOL

          Comment


            #6
            Try this, obviously modify to suit, Erm, this BBS does not allow posting of such code which is a compleate pain in the , enyway; I will attach as an txt file, it's actually part of an ASP. However, start and end are missing, just the bit you may be looking for.

            If you wish to see what it does look at the entry page of my HS, link below.

            OK, sorry you have my entire opening page. (Bloody BBS)


            The bit you are looking for is where is starts HomeSeer Version, after that is the code I think you are looking for.
            Attached Files
            sigpic
            A founder member of "The HA Pioneer Group" otherwise known as the "Old farts club!"

            Comment


              #7
              here's a page that I have created based on some scripts that I found on HS message board. At the bottom you can see where I maintain the uptime of HS. I maintain 3 items;
              1) current uptime
              2) record uptime
              3) all time record uptime

              I have a script that runs every 15 minutes and updates the "uptime", and a script that builds an html page that is the uploaded to my website.

              I can post details if this is what you're after.
              Attached Files

              Comment


                #8
                Jeff, that is exactly what I am looking for. Although I don't see a need for 2 different max uptimes, but hey.

                How are you getting the middle one calculated?

                Do you see the problem I mentioned in my first post where it stops updating the hour once the minutes hit double digit?

                Comment


                  #9
                  FWIW

                  Not done any digging in this - and I may be talking rubbish, but this kind of thing happens to me when I am doing vb style compares of things that are numbers but vb is making them strings. What I do in these kind of cases is take a copy of the the strings and turn everything to minutes - then do the compare on the real numbers.

                  Malarcy

                  Comment


                    #10
                    here's the script that I use to keep track of the system uptime record in a HS variable. (in my case Z3)
                    Attached Files

                    Comment


                      #11
                      Malarcy, I think you are exactly right about the VB compare being a string.

                      Jeff, nothing is being created for the
                      hs.CreateVar("STARTUP_DATE")
                      startupdate=hs.GetVar("STARTUP_DATE")

                      Comment


                        #12
                        in the comments of the script you will have seen the following instructions to put these statements in the HS startup script.

                        hs.CreateVar("STARTUP_DATE")
                        hs.SaveVar "STARTUP_DATE",NOW

                        Comment


                          #13
                          I saw that and just totally disregarded it, not enough coffee yet I guess. Thanks, I'll give that a try

                          Comment


                            #14
                            Jeff, thanks for the help. I never figured out how you were converted ours of uptime to day hours minutes format.

                            Here's what I came up with.
                            Attached Files

                            Comment


                              #15
                              MeSteve, that's great that you got it working. I kept everything in hours and convert at the display point. I have code for that if you wish it.

                              Glad to help out.....

                              Comment

                              Working...
                              X