[Q] NUT plugin - Communication with Back-UPS and RJ45/USB cable

  • Hello all.


    I have a Pi4B with OMV6 and the NUT plugin.


    I am thinking of buying the following UPS "APC Back-UPS BE850G2" (https://www.apc.com/es/es/prod…de-recarga-usb-tipoc-y-a/) for protecting the IT equipment (ONT, router, switch), along with the Pi4B and some external HDDs.


    I have checked the UPS has a Data port with a RJ-45/USB type cable, like this one:


    Cable-de-comunicaci-n-APC-UPS-USB-AP9827-Cable-NAS-de-se-alizaci-n-Simple-USB.jpg


    I would like to connect it to the Pi4B in order to set the nut plugin to autoshutdown when UPS goes on battery for more than 5 minutes.


    Is this possible? I have it but on another more advanced UPS (APC Smart-UPS SMT1500i) and I do not know if this interface is also "smart" and it can communicate with the nut plugin to get the sequence done.


    Thanks in advance

    omv 5.5.23-1 usul arm64

    omv 5.5.23-1 usul x64


    • Offizieller Beitrag

    In this guide you have a link to the NUT documentation that will tell you if that UPS is compatible (and if it is totally or partially). [How-to] Use the openmediavault-nut plugin

  • Thank you.


    It seems it is compatible:


    *** based on publicly available protocol


    APCBack-UPS (USB)
    USB
    usbhid-ups



    It has the same level of compatibility as my main UPS (SMT1500i) so I guess I could achieve with this what I get from my old one.


    Regards.

    omv 5.5.23-1 usul arm64

    omv 5.5.23-1 usul x64


  • chente

    Hat das Label gelöst hinzugefügt.
  • I would like to connect it to the Pi4B in order to set the nut plugin to autoshutdown when UPS goes on battery for more than 5 minutes.

    If the intention is to shutdown your NAS after 5 minutes on battery, you could use a Attiny45, optocoupler/relay/etc. and a USB phone charger. Use a (super)capacitor or a rechargEable cr2450 to power the attiny and coupler when the power drops. The basic concept is, when the relay is closed, the USB charger has power, when the relay is open, the USB charger loses power because your power source is down. You can use other components, like a coupler that runs on your main voltage, but that might not be cheaper and the components will certainly be less readily available.


    The Pi is overkill if that's all you want. I use Pi4B with 3D printers (Klipper) but, for detecting when to stop a print and park the hot end, I use the above. I could use the Pi for this too as I'm already utilizing it but it's too much wiring in my case.



    All code related to using the attiny45 for this can be found here:

    Gammon Forum : Electronics : Microprocessors : Interrupts

    Attinys on this list descendant to the attiny45 will work (but you might want the package package type to be DIP-xxN):

    ATtiny_microcontroller_comparison_chart

    Just about any 5v optocoupler or relay will work.


    You could also use a ESP01 and do this over wifi along with using nut, but that kicks up the power considerations significantly from a coin cell battery.

  • Wow, that is a super interesting method.


    Geeky as hell :D


    I keep it for the future.


    Thank you!

    omv 5.5.23-1 usul arm64

    omv 5.5.23-1 usul x64


  • The Pi is overkill if that's all you want.

    Not overkill if the Pi is the server (my case is a CM4 but same concept).

    UPS is feeding everything NETWORK related:

    The CM4 server itself

    The ISP router

    The TP-Link Switch to feed all devices

    A Home Security Camera


    UPS is configured to shutdown the server on low battery but I've never reached it.

    The rare occasions I was without grid power, the UPS showed an autonomy of around 150 minutes which is quite good.

    Not that awkward since the power output of everything running is around 32W and the UPS is 900W, :)


    I believe OP is running OMV on the Pi. He's not using it just to control the UPS so it's the same concept as above.

  • shutdown the server on low battery

    Right but, what is "low battery" in time? I found the OP's question relatable because of the specific time limit as I used to compare time left for print completion to UPS time remaining but now I stopped replacing UPS batteries.


    For what it's worth, plugging a ESP 8266 directly into the motherboard and setting a captive portal like "nas.com/power_out" would be pretty trivial. This way, you could read the NUT report at least via serial and depending on your security preferences and hardware, possibly WiFi too. Any device that could reach "nas.com/power_out" could use it and of course anything connected to the pins will still work.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!