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.
Announcement
Collapse
No announcement yet.
Max uptime
Collapse
This topic is closed.
X
X
-
MeSteveTags: None
-
MeSteve
-
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
-
Originally posted by MeSteveI can get current uptime, I want maximum uptime.
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
-
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 Filessigpic
A founder member of "The HA Pioneer Group" otherwise known as the "Old farts club!"
Comment
-
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.
Comment
-
MeSteve
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
-
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
-
MeSteve
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
-
MeSteve
I saw that and just totally disregarded it, not enough coffee yet I guess. Thanks, I'll give that a try
Comment
-
MeSteve
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
Comment