Announcement

Collapse
No announcement yet.

Number of Transfers, Total Time on Battery, etc. not saved?

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

    Number of Transfers, Total Time on Battery, etc. not saved?

    pcp:

    I had to reboot my HS3 server for some routine maintenance today. When HS3 came back up, I noticed some UPS device values had reset to zero - ones that I would not have expected, such as:

    UPS Last on Battery
    UPS Last off Battery
    UPS Total Time on Battery
    UPS Number of Transfers

    Do these not get saved to disk? If they only "exist" during the time that HS3 is "up", I'm not sure what the value of them are...

    BBB

    P.S.: I know these devices had each gotten set before I rebooted my HS3 server, as I had run a test to make sure a 'running on battery' event would be reported.

    #2
    I need to double check but upon restart it might set them to default initial values.

    Comment


      #3
      I checked and these device values are reset to default initial values when the plugin starts. Something I could look at possibly changing in a future release.

      Comment


        #4
        pcp:

        In my opinion, it would be nice to have those reflect "history" over how long the plugin has been monitoring the UPS. Thanks for considering as a possible change.

        Regards,
        BBB

        Comment


          #5
          I looked a bit more into it. While I can update the logic to not set the values to default values (from the plugin), the APCUPSD driver will send updates upon reboot including for example the number of transfers, last transfer, etc... which would still set the device values to whatever APCUPSD reports and might not include settings as prior to the reboot.

          Comment


            #6
            Try version the APCUPSD plugin version 3.3.2.0 in the beta section of the updater.

            Comment


              #7
              pcp:

              I downloaded 3.3.2.0, and it appears that the plug-in did load values from the apcupsd daemon. Because of high winds today, one of my UPSes kicked in twice for a total of 4 seconds. I noted those values before I disabled the plugin. I then downloaded/installed the new plugin, then enabled 3.3.2.0. So that is an improvement -- thanks!

              I'm sorry to belabor the point, but I'm wondering about the situation where the computer with the UPS runs until the battery can no longer support running the computer - so it is shut down. When the computer comes up again after power is restored, it seems like I would have little or no information about what happened. I can send emails when the system goes on UPS, and maybe when it is being powered off, but there is no "history" in the plugin of that occurring. Are there any options in apcupsd that would have it store history?

              Regards,
              Paul

              Comment


                #8
                Sorry for yet another question. With the beta 3.3.2.0 plugin running, I pulled the UPS' power plug out of the socket for about 20 seconds then plugged it back in. The plugin registered that as a Transfer (it increased the Number of Transfers by 1), but my event (see attached picture) did not trigger - what am I doing wrong?

                Comment


                  #9
                  apcupsd saves a history in file
                  C:\apcupsd\etc\apcupsd\apcupsd.events (Windows), or
                  /var/log/apcupsd.events (Linux)

                  Comment


                    #10
                    zwolfpack:

                    I found that file on my Linux system - thanks! It logged 3 power outages of my Back-UPS ES 650 since apcupsd has been monitoring the UPS. To see if the contents of that file were being used by the plugin, I shut down HS3 and rebooted the Linux computer; when it came back up, the 'Total Time on Battery' and 'Number of Transfers' devices were reset to zero. The 'Last on Battery' and 'Last off Battery' are blank.

                    Regards,
                    BBB

                    Comment


                      #11
                      I'm guessing that the plugin only uses info available from the apcupsd daemon, which doesn't necessarily include contents of this file. If the plugin were to use this file directly, it would only work in cases where the plugin is running on the same machine as the daemon.

                      Comment


                        #12
                        zwolfpack -

                        That makes sense. In case of the plugin, I guess it comes down to the type of information one is looking for it to provide. In my case, I'm looking / hoping for a more "historical record" that would be available in HomeSeer.

                        Regards,
                        BBB

                        Comment


                          #13
                          Originally posted by BigBadBuzz View Post
                          Sorry for yet another question. With the beta 3.3.2.0 plugin running, I pulled the UPS' power plug out of the socket for about 20 seconds then plugged it back in. The plugin registered that as a Transfer (it increased the Number of Transfers by 1), but my event (see attached picture) did not trigger - what am I doing wrong?
                          I just did a test with 3.3.2.0 setting up an event triggered on the UPS “Status” device to trigger when it changes to be ‘On Battery” and it triggered as expected. Did you see the Status device change state in the Device Management UI?

                          You can also use the APCUPSD plugin built-in triggers to detect such changes. To be specific, use the “APCUPSD status flag is set...” trigger and then the relevant flag of interest (On Battery is set in your example).

                          Comment


                            #14
                            Originally posted by zwolfpack View Post
                            I'm guessing that the plugin only uses info available from the apcupsd daemon, which doesn't necessarily include contents of this file. If the plugin were to use this file directly, it would only work in cases where the plugin is running on the same machine as the daemon.
                            Yes the plugin is using what the daemon is sending over its protocol. Using the file in would break enabling remote monitoring and making it inconsistent if the deamon is local or not.

                            Comment


                              #15
                              So it seems that remote monitoring is the emphasis here - at least that is good to know before I put any more effort into it. Thanks for answering all my questions so promptly.

                              Regards,
                              BBB

                              Comment

                              Working...
                              X