Laptop power, battery + UPS



  • I've been using pfSense 2.0.3 for a while now on a Dell SC430 with an APC UPS 1500. Works great, but it's a little overkill for my small setup at home.

    To lighten the power bill a bit, I recently acquired an HP nc6000 laptop and added a Trendnet USB 2.0 NIC for the WAN. I can get away with a much smaller UPS now, but with an internal battery that would last 4+ hours, I really don't care about the UPS. When it dies, it dies. I really want to monitor the internal battery and shutdown gracefully with 5 minutes or n% remaining. You have to monitor the last power source, not the first.

    I've searched around, found some posts about using the Hardware Abstraction Layer Daemon (hald) to get the battery status but I have no idea how to install that or if it might break things.

    Is there a solution for this?

    TIA

    dsiminiuk



  • I think its probably just as power efficient to use the ups as internal battery.  NUT can't manage one or the other or both?



  • Nice idea ….. status bar for laptop battery and controlled shutdown ..... not critical, but would be a nice option on dashboard.



  • I realize this is very old stuff, but I am curious if the original posters have any fresh input on this subject.

    I've been looking for the same thing, i.e. being able to monitor the AC loss on a laptop running pfSense and shutting it off gracefully when it happens. My understanding is that there is no package or patch capable of doing it with pfSense or FreeBSD. Although it's my understanding that PC-BSD can do it but then PC-BSD has a ton of additional software…

    Btw, I am currently using an old SmartUPS electronics card to monitor the AC presence and the nut package to alert pfSense, but I want to eliminate the SmartUPS board in the cookie box before it became a fire hazard or worst - killed me, as unwittingly, once in a while I reach into the box trying to fetch a cookie to no avail except for the nasty shock  :P

    Halea



  • Refer to the NUT package & documentation for it at networkupstools.org. pfSense can be configured to monitor UPS signals for battery life & send out signals over IP to other connected PCs of when to shutdown. This is done with the NUT package.



  • Yes, I understand that NUT can monitor a UPS unit's feedback regarding battery and AC status and have pfSense to shut itself down or even send a shutdown signal to other computers on the LAN (actually I didn't know about that part, thanks for the info).

    That's actually what I am doing currently, except I am using only the control board of an old SmartUPS to catch the AC presence information.
    (One side of the control board is connected to AC, the control signal coming off on USB is sent to my pfSense box.

    But, as it is not a full UPS (salvaged electronics, battery is missing) and I don't need a full UPS, because my pfSense is on a laptop with a healthy battery capable of giving it more than 2 hours of life in the case of AC loss, all that I want is to have the NUT package or some other ways to monitor the AC presence through the electronics of the laptop, i.e. without having to connect an external UPS' USB wire to bring the status info in.
    Then I wouldn't even worry about monitoring battery levels, as soon as AC is lost I would set pfSense to initiate the shut down sequence, or maybe give it 5-10 minutes then initiate it. UPS units generally use two separate detectors for AC presence and battery level. My point is I don't even care about monitoring the battery as long as I can get the AC loss signal.

    Any thoughts?

    Halea



  • @haleakalas:

    I realize this is very old stuff, but I am curious if the original posters have any fresh input on this subject.

    I've been looking for the same thing, i.e. being able to monitor the AC loss on a laptop running pfSense and shutting it off gracefully when it happens. My understanding is that there is no package or patch capable of doing it with pfSense or FreeBSD. Although it's my understanding that PC-BSD can do it but then PC-BSD has a ton of additional software…

    Btw, I am currently using an old SmartUPS electronics card to monitor the AC presence and the nut package to alert pfSense, but I want to eliminate the SmartUPS board in the cookie box before it became a fire hazard or worst - killed me, as unwittingly, once in a while I reach into the box trying to fetch a cookie to no avail except for the nasty shock  :P

    Halea

    I was working on a laptop widget and package to provide for battery monitoring, and possibly allowing inserting entries to /etc/devd.conf to perform a graceful shutdown on low battery threshold the admin sets.  I've been running pfsense off laptops for a long time now, and am working some new deployments on Dell laptops.  I will try to get back and see if I can spend more time on this.

    Note that the laptop must support ACPI, etc and that information must be accessible via sysctl.  From what I can tell, most Dell laptops circa 2008 or newer (Core2) should be fine.  The few HP laptops I have tried also seem to be OK in what is reported, though I've decommissioned any HPs I was using a few years ago so I have nothing to test against.

    For now, visit my post from last year: (screencaps in post)

    https://forum.pfsense.org/index.php?topic=69807.msg382229#msg382229