Nut Configuration

  • Hello


    @ryecoaaron suggested that i get a UPS to save my system i just got it today thinking that it will be easy to set up but i don't even know if it is working or not and i would like some help


    this is the ups that i have

    APC Back-UPS, 1200VA, Tower, 230V, 4x CEE 7/7 Schuko outlets, AVR - BX1200MI-GR | APC USA
    BX1200MI-GR - APC Back-UPS, 1200VA, Tower, 230V, 4x CEE 7/7 Schuko outlets, AVR | APC USA
    www.apc.com


    when i checked Nut home page it said that most Back-UPS should work with usbhid-ups


    but i don't even know how to check if it is working or not or even know if the battery is full or not


    i'm using a USB to connect it


    thanks in advance

  • chente

    Approved the thread.
    • New
    • Official Post

    when i checked Nut home page it said that most Back-UPS should work with usbhid-ups

    According to the compatibility list, it seems that your model is compatible with NUT and that the driver you have configured is correct. https://networkupstools.org/stable-hcl.html

    but i don't even know how to check if it is working or not or even know if the battery is full or not

    Try it. Unplug the UPS from the electrical power. You should receive a notification email advising you of this fact. Once the configured time has passed, the server should turn off by itself and you should receive another email warning about this. If you turn off the server and then turn off the UPS everything works as expected.

    • New
    • Official Post

    I wouldn't get too obsessed about that. I'm sure there are UPSs that even have a screen with that information integrated but I'm sure they are also more expensive. If you are very interested in knowing, it is possible that your UPS has an application that you can perhaps install in Debian to obtain more information and possible configurations.

    Keep in mind that the UPS will always be connected to electrical power so once the battery is charged it will never be discharged unless it has degraded. Personally, I only worry about replacing the battery every 5 or 6 years.

  • A UPS needs some kind of connection to the computer via USB, Serial, or Network in order for the computer/ups to be able to monitor and control each other, From what I can tell, that one has no such connection so it will not be able to initiate a graceful shutdown. It will still protect against unstable power, but not against prolonged power outages.


    If it had a connection to the computer, there a cli installed utility that would most likely work called apcupsd

  • A UPS needs some kund of connection to the computer via USB, Serial, or Network in order for the computer/ups to be able to monitor and control each other, From what I can tell, that one has no such connection so it will not be able to initiate a graceful shutdown. It will still protect against unstable power, but not against prolonged power outages.


    If it had a connection to the computer, there a cli installed utility that would most likely work called apcupsd

    i'm sorry but i don't follow here


    do you mean that my UPS will not work with NUT or something else?


    i specifically bought this UPS because it has a USB port that i can connect to my PC and it even has an official software for windows and linux on their official website


    but all i want it to do it is safely automatically shutdown with NUT

  • i went to diagnostics and saw UPS when i opened it the info were there even the battery was there all that remain is unplugging the UPS cord and see if OMV will shutdown accordingly


    chente is it something like that on your system as well?

    BernH you are the professional here your input is also appreciated


  • I looked up the UPS from the link you posted and it says "USB Compatible: No" I am only going by what is posted on that link.


    If it does have a USB connection, then it should work with the apcupsd that I mentioned, regardless of if NUT supports it or not.

  • I looked up the UPS from the link you posted and it says "USB Compatible: No" I am only going by what is posted on that link.


    If it does have a USB connection, then it should work with the apcupsd that I mentioned, regardless of if NUT supports it or not.

    i'm not an expert by any means but apcupsd would require me to do everything manually which i'm not confident that i can configure myself without guidance


    maybe NUT is easier to configure in my case because it has a GUI all i need to do is do an experiment and see if my settings work or will it ignore it



    maybe when it gets ignore i will ask your guidance on how to properly configure apcupsd if it won't bother you of course?

  • If NUT works for the UPS, use it. It is easier for sure if you are not comfortable with editing a config file. I only mentioned apcuspd because Chente said your UPS was not compatible with NUT.


    Realistically though, just because the exact model is not listed, does not mean it isn't compatible, as long as the control protocols are the same as other APC models, it should work, as it is only really monitoring the battery level and status of the AC power vs battery power. If it is engaging a driver and it works you should be good.

    • New
    • Official Post

    Chente said your UPS was not compatible with NUT.

    I guess you misread what I said. I said that UPS IS compatible with NUT. It appears in the compatibility list and the driver that the OP has configured is the correct one so it should work without problems.

    is it something like that on your system as well?

    You're right, I didn't know that was there, I also have something similar to what you have. From what you can see, the battery charge level appears in that list, in your case 56%.

  • chente


    i think i configured it correctly i did a test and it did shut down on its own BUT


    i also connected my router and monitor on the same UPS when the electricity was back it didn't turn off battery mode immediately it kept going on battery for about 3 min and then it restarted it self but when the UPS restarted to be back on electricity mode

    it also restarted my router and monitor as well is that a normal behaviour isn't the UPS supposed to keep everything up rather than restarting my equipment

  • Yes a UPS should keep the equipment on, but equipment can get restarted during the switch over for 2 reasons. Either the switching is not fast enough leaving too long a time with no power when switching or the equipment is too sensitive to the instantaneous power loss that happens during a fast switch over.


    The link you sent says the switcing time is 6ms typical : 10ms maximum, so I doubt it is too slow a switch as 6ms is pretty quick


    The switch time isn't a problem with the monitoring done by NUT, as the switching is automatically done by the UPS. The extra 3 minutes on battery seems odd though. Normally a UPS will switch back over to AC in less than 20 or 30 seconds, often less than 10 seconds, but I don't know if that is normal for that model or if it can be changed by a setting.

  • Yes a UPS should keep the equipment on, but equipment can get restarted during the switch over for 2 reasons. Either the switching is not fast enough leaving too long a time with no power when switching or the equipment is too sensitive to the instantaneous power loss that happens during a fast switch over.


    The link you sent says the switcing time is 6ms typical : 10ms maximum, so I doubt it is too slow a switch as 6ms is pretty quick


    The switch time isn't a problem with the monitoring done by NUT, as the switching is automatically done by the UPS. The extra 3 minutes on battery seems odd though. Normally a UPS will switch back over to AC in less than 20 or 30 seconds, often less than 10 seconds, but I don't know if that is normal for that model or if it can be changed by a setting

    yes there was settings on windows called powerchute

    i tried changing them but there was no option about when the AC is back i honestly don't know what to do maybe i will call APC they might have an idea

  • Contacted them and they gave me some troubleshooting steps after doing them


    NOW the UPS instantly switch between AC and Battery mode instead of that weird 3 min

    and also doesn't restart my other equipments


    thank you both for your help so far

  • BernH

    the problem is back again but i know why its happening.

    hello again since you have knowledge of linux i wanted to ask

    where is the config file that i can edit my server from restarting my UPS


    so whats happening is if my gaming PC / router / switch are connected and power is down

    the UPS swtiches normally without issues between battery to AC and vice versa


    BUT when you add the SERVER PC and NUT commands the SERVER PC to shut down here where the problem occurs again the UPS switches to battery mode and NEVER switches back to AC mode even though the power is back

    and what is worse is that the UPS restarts itself after about 2 to 3 min


    this is probably a config issue and i really need your help on this.

    thanks in advance

  • I have never used NUT myself, so I can't direct you on configuring it, but this page may help a bit

    Network UPS Tools - Documentation



    The only thing I have used on Linux is apcupsd.


    It can be installed with apt-get install apcupsd.

    The config file is at /etc/apcupsd/apcupsd.conf

    The manual pages are here:

    https://linux.die.net/man/8/apcupsd

    https://linux.die.net/man/5/apcupsd.conf

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!