Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

NUT - UPS

Featured Replies

Hi,

 

I´m working on getting NUT ups software to work.

 

I have almoast gotten everything to work, basically it works just cant get the system to halt.

 

So far i have NUT working, a shut down script that will shutdown the system if power isen´t restored within the time specified.

The script shut downs the system with "powerdown" for a clean shutdown, and then in the almoast very end of rc.0,6 it sends the kill signal to the ups for it to turnoff. (so when power is restored the sytem will turn on)

 

However with "powerdown" the system dosen´t halt so when power is restored to the ups will turn on again but, the system is unresponsive(fans blowing) and with a black screen.

 

If I invoke "shutdown -h now" instead of "powerdown" as the shutdown sequence , everything works perfect, but there will be an unclean shutdown.

 

Anyone have any ideas?

 

//Mace

Hi, i'm using powerdown command with my APCUPSD. have you installed powerdown plugin?

 

and which UPS model have you?

mine is APC Smartups 750 and it's not working correctly with builtin APCUPSD on unRAID - some values like iTemp and Usage and empty..

then i'm connecting it to Windows VM, and all are working great.

  • 2 weeks later...
  • Author

I made it work with this:

#!/bin/bash
#
# Helper script to gracefully power-down unRAID server.
# Works only if webGui is running and listening on port 80.

# Access a blank page in case this is first request since startup.
/usr/bin/wget -q -O - localhost/update.htm >/dev/null

# Have emhttp do all the work as if user clicked 'stop array' in webGui.
/usr/bin/wget -q -O - localhost/update.htm?cmdStop=apply >/dev/null

# Shutdown unRAID so that it starts again when power is returned to the ups
while [[ ${LOOP:=30} -gt 1 && -d /mnt/user/ ]]
  do
        (( LOOP=LOOP-1 ))
        echo "Array is still online waiting for it to come off-line ($LOOP)"
        sleep 1	
done
echo "Array is off-line shutting down unRAID"
/sbin/shutdown -h +0

 

 

Finally I got my Eaton 3s ups working with NUT, shutsdown unRAID cleanly after 3mins if power isent restored and sends notifications to webUI and email.

Nice code, but I believe it would be MUCH better to call powerdown, the plugin not the built-in.

  • Author

Nice code, but I believe it would be MUCH better to call powerdown, the plugin not the built-in.

 

Yea tried with the powerdown plugin, having problems that when power is restored to the ups the serverboots but is unresponsice with fans blowing att full, no bios screen or anything.

 

Guessing the plugins does some witchery with "/etc/rc.d/rc.6"? (havent looked into to much though)

Nice code, but I believe it would be MUCH better to call powerdown, the plugin not the built-in.

 

Yea tried with the powerdown plugin, having problems that when power is restored to the ups the serverboots but is unresponsice with fans blowing att full, no bios screen or anything.

 

Guessing the plugins does some witchery with "/etc/rc.d/rc.6"? (havent looked into to much though)

I can't remember I had any problems when I was playing with NUT after power was restored. I used the power down plugin to shut down.

 

  • 4 weeks later...

Hi macester

 

I have nut running on a VM used for communication with a shared UPS, NUT on a couple of servers communicate with the NUT installation on said VM. The third server i have is an unraid machine wich unfortunately does not support NUT out of the box.

 

Can you provide some information on how you went about installing NUT on unraid?

 

KG

  • Author

Hi macester

 

I have nut running on a VM used for communication with a shared UPS, NUT on a couple of servers communicate with the NUT installation on said VM. The third server i have is an unraid machine wich unfortunately does not support NUT out of the box.

 

Can you provide some information on how you went about installing NUT on unraid?

 

KG

 

Hi,

 

I added a guide just last night on my github,

I guess you want it to run over the network, so ya need to edit the nut config "files" part a tad moore in the script but should be pretty straight forward.

 

https://github.com/macexx/nut_ups

 

//mace

Great, thanks!

 

One question, I'm not running a cache drive, where is the location of the scripts defined?

 

KG

Hi, this is what I was looking for.

I have a Riello NPW600 ups connected to one of my Unraid Vm´s (only for monitoring).

I have tried a solution but had no luck since the script was done within the windows vm.

Now I read your post and I think this may work.

I looked at NUT and got this, so if I understood you guide, there is a driver for connecting my ups via usb to Unraid and using your script. Can you confirm it to me pls?

c499ed1c-7884-497f-adaa-02a44f2fa410_zpsczbschpg.png

Also, pls let me know if I can follow your guide step by step (or do I need to modify something) since I am not into programming like you.

You wrote:

You should also see the stats of the ups in the "TOOL" tab in unRAID.

... could you post a pic of that, since I cannot figure how it looks like.

Thx in advance. I will try this when I got your answer :)

Rgds.

 

  • Author

Great, thanks!

 

One question, I'm not running a cache drive, where is the location of the scripts defined?

 

KG

 

Go script,

Change booth instances of "/mnt/cache/.scripts" to any folder on your array it just checks for the array to be online. (example /mnt/user)

Change "/mnt/cache/.scripts/go_ups" to where you put the script (example /mnt/user/data/scripts/go_ups).

#Start ups script on boot
while [[ ${LOOP:=30} -gt 1 && ! -d /mnt/cache/.scripts ]]
do
        (( LOOP=LOOP-1 ))
        echo "Waiting for /mnt/cache/.scripts to come online ($LOOP)"
        sleep 1
done
/mnt/cache/.scripts/go_ups

  • Author

Hi, this is what I was looking for.

I have a Riello NPW600 ups connected to one of my Unraid Vm´s (only for monitoring).

I have tried a solution but had no luck since the script was done within the windows vm.

Now I read your post and I think this may work.

I looked at NUT and got this, so if I understood you guide, there is a driver for connecting my ups via usb to Unraid and using your script. Can you confirm it to me pls?

c499ed1c-7884-497f-adaa-02a44f2fa410_zpsczbschpg.png

Also, pls let me know if I can follow your guide step by step (or do I need to modify something) since I am not into programming like you.

You wrote:

You should also see the stats of the ups in the "TOOL" tab in unRAID.

... could you post a pic of that, since I cannot figure how it looks like.

Thx in advance. I will try this when I got your answer :)

Rgds.

 

Yes, the driver is built in to NUT.

So if you have a cache drive you can follow it step by step and then just change "usbhid-ups" to "riello_usb" and it should work.

 

Here is a pic of the stats page and notifications from the ups:

http://i.imgur.com/ISsLFRO.jpg

Thx macester! I wish I could read and simply understand on the fly the code you wrote....I will try it this week when I can have some time to focus on this.

 

Just wondering if you had a look at "KNutClient" and maybe thought about installing it too?

 

Rgds.

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.