After running Homeseer for a while the number of events grows and grows. It is not easy to see how old events are. When checking there might be a lot of events that have not ran for a year. You could probably remove them, or something is wrong!


Check out the Homeseer Event Age Script page to get the files, instructions and one more screenshot.

UPDATE: version 0.7 is published on the Script page. This INCLUDES (a better version of) the code change below

If you want to replace ‘41525 d’ with ‘unknown’ (as it’s shown in Homeseer), please replace the following script code…

[code language=”asp”]s.Add “<td align=center>” & evdb.fields(“Elapsed”) & “&nbsp;</td>”[/code]


[code language=”asp”]if evdb.fields(“Elapsed”) = “41525 d” then

s.Add “<td align=center class=” & rowstyle & “>” & “<span style=’color:#AAAAAA;’>unknown</span> &nbsp;</td>”
s.Add “<td align=center class=” & rowstyle & “>” & evdb.fields(“Elapsed”) & “&nbsp;</td>”
end if[/code]


Old Homeseer Events — 12 Comments

  1. Hi DJ,

    This is a really nice script! It works fine, and yes, after a while because of the many events, the overview is completely lost. Especially when there are some conditions added, and the different colors, don’t make it easier to read.
    I’ve a few events that not ran untill today, but the script displayed this as elapsed “41095 d”. Maybe you can fine tune it as “unknown”, like Homeseer do?

      • Hi DJ,
        I’ve also a few events that not ran until today, but the script displayed this as elapsed “41095 d”.
        Is it possible to change it to “unknown”, like Homeseer do?
        It would be very great

        Regards, Fischi

  2. Hi DJ,
    Where do I have to change the script code to replace ’41525 d’ with ‘unknown’ ??

    What’s about with your script for HS devices, did you make progress ?

    Regards, Fischi

    • Hello Fischi,
      A bit late but I have updated the code to version 0.7, check out the Event Age script page (link in post above) to download the code.

      • Thank you very much DJ,
        The script works better now.
        The only thing that I don’t understand is that the events these are younger as 1 day also show
        “unknown”. Did you want it to do so ?
        Best regards,

      • Ah, thanks for pointing this out.
        Fix: replace line 97 with:
        If len(evdb.fields(“Elapsed”))>6 and instr(evdb.fields(“Elapsed”),”hours”)=0 then
        So it basically checks if the length of that string is >6 *AND* if it does not contain the word ‘hours’

      • BTW, I also have a version that does the same for devices.. Haven’t had the time to update it and post it.. Would you be interested?

      • Hi DJ,
        I can’t find the line 97 that I have to replace.
        What is the detailed content (text of the line) ?

        Best regards, Fischi

  3. Hi DJ,
    I’ve found the line and replaced it.
    The event age is running fine now.
    Many thanks, Fischi