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.

UPS support yet?

Featured Replies

Please accept my apology...

 

Sorry it took so long to get back to this.  Between work and my other server problems, this got put on the back burner for a while, but I finally got around to trying it and the new mail script works correctly.  Thanks!

 

No apology is necessary.  You have gone above and beyond helping myself and others around here.  I am truly grateful for your help and patience. 

  • 1 month later...
  • Replies 239
  • Views 82.7k
  • Created
  • Last Reply

I'm running two unRaid servers off of one UPS.  I have tower2 configured as the slave with the cabletype set to ethernet, but I keep getting emails and messages in the system log that say that communication has been lost with the UPS and then seconds later it says communication has been restored.  It seems to be random.  Some days it doesn't happen and others it happens numerous times.  tower1 is the server that is actually connected to the UPS via USB and I never see any messages like that for it.  Has anyone experienced this?  Any ideas what the problem could be?  Here are a few lines from my current system log:

 

Dec 1 00:00:01 Tower2 kernel: mdcmd (801): check
Dec 1 00:00:01 Tower2 kernel: md: recovery thread got woken up ...
Dec 1 00:00:01 Tower2 kernel: md: recovery thread checking parity...
Dec 1 00:00:01 Tower2 kernel: md: using 1152k window, over a total of 732574552 blocks.
Dec 1 00:39:26 Tower2 apcupsd[2390]: Communications with UPS lost.
Dec 1 00:39:27 Tower2 apcupsd[2390]: Communications with UPS restored.
Dec 1 04:33:47 Tower2 kernel: md: sync done. time=16262sec rate=45048K/sec
Dec 1 04:33:47 Tower2 kernel: md: recovery thread sync completion status: 0
Dec 2 05:19:25 Tower2 apcupsd[2390]: Communications with UPS lost.
Dec 2 05:19:50 Tower2 apcupsd[2390]: Communications with UPS restored.
Dec 2 05:34:25 Tower2 apcupsd[2390]: Communications with UPS lost.
Dec 2 05:34:30 Tower2 apcupsd[2390]: Communications with UPS restored.
Dec 2 05:39:09 Tower2 apcupsd[2390]: Communications with UPS lost.
Dec 2 05:39:09 Tower2 apcupsd[2390]: Communications with UPS restored.
Dec 2 05:40:00 Tower2 apcupsd[2390]: Communications with UPS lost.
Dec 2 05:40:13 Tower2 apcupsd[2390]: Communications with UPS restored.
Dec 2 05:48:40 Tower2 apcupsd[2390]: Communications with UPS lost.
Dec 2 05:48:46 Tower2 apcupsd[2390]: Communications with UPS restored.
Dec 2 09:44:01 Tower2 apcupsd[2390]: Communications with UPS lost.
Dec 2 09:44:01 Tower2 apcupsd[2390]: Communications with UPS restored.
Dec 2 09:46:03 Tower2 apcupsd[2390]: Communications with UPS lost.
Dec 2 09:46:04 Tower2 apcupsd[2390]: Communications with UPS restored.
Dec 2 10:04:43 Tower2 apcupsd[2390]: Communications with UPS lost.
Dec 2 10:05:13 Tower2 apcupsd[2390]: Communications with UPS restored.
Dec 3 10:30:37 Tower2 apcupsd[2390]: Communications with UPS lost.
Dec 3 10:30:38 Tower2 apcupsd[2390]: Communications with UPS restored.
Dec 5 13:10:37 Tower2 apcupsd[2390]: UPS Self Test switch to battery.
Dec 5 13:10:46 Tower2 apcupsd[2390]: UPS Self Test completed: Battery OK
Dec 5 20:47:21 Tower2 apcupsd[2390]: Communications with UPS lost.
Dec 5 20:47:34 Tower2 apcupsd[2390]: Communications with UPS restored.

 

 

  • 1 month later...

Okay, I bought an APC ups with USB connection.  Installed it and hooked up the UPS cable.  Went into unMenu's package manager and fully installed the UPS package.  Went into unMenu's SystemInfo/UPS_Status and see that it's responding and all looks well.  Other than trying to set up e-mailed status as above, is there anything else I need to do?  ???

 

Okay, I bought an APC ups with USB connection.  Installed it and hooked up the UPS cable.  Went into unMenu's package manager and fully installed the UPS package.  Went into unMenu's SystemInfo/UPS_Status and see that it's responding and all looks well.  Other than trying to set up e-mailed status as above, is there anything else I need to do?  ???

 

You want to make sure you also have the "powerdown" package installed.  That way, in an extended power failure, you will get a clean shutdown.

 

Other than that, it really is pretty painless.  The "Package Manager" plug-in really helps.  Make sure you set both packages to be automatically re-installed every time you reboot.

 

Joe L.

You want to make sure you also have the "powerdown" package installed.

Yup, did that as well... thought, by skimming this thread, that I needed to maybe do some config file editing...

 

You want to make sure you also have the "powerdown" package installed.

Yup, did that as well... thought, by skimming this thread, that I needed to maybe do some config file editing...

 

You need to set up mail.  I had previously posted a really simple script that used a forwarding file.  I keep a copy in /boot/custom/bin.

I have two tasks in my etc/rc.d folder that put it into place

 

First task, create a .forward file ... make sure this has your correct e-mail.

root@Tower:/boot/custom/etc/rc.d# cat S51-mail-forward-install

echo "[email protected]" >/root/.forward

Second task, copy the mail.sh program to /usr/bin/mail where other programs expect it to exist.

root@Tower:/boot/custom/etc/rc.d# cat S50-mail-install

cp /boot/custom/bin/mail.sh /usr/bin/mail

chmod 755 /usr/bin/mail

 

There have been better (more comprehensive)  mail scripts posted since I wrote my simple one. Any should work, as long as they use the ".forward" file in the home directory of "root"

 

Joe L.

Thanks !!  ;D

ok, so I'm new to UPSes... I have a APC Back-ups ES 550.  It has a single "data port" that uses a special cable with a RJ45 jack on one end and a USB A male on the other.  I currently have it set up and working on the unraid server, no problems there.

 

What I want to do is plug a second computer(my htpc) into the UPS and have it shutdown when the power goes out as well.  Is there a way to have the htpc connect to the unraid server to find out the status of the power via network?  I'm assuming that I will need to set-up apcupsd on the unraid machine to broadcast it... (ideally I would like them to have staggered shutdowns, meaning if the power is off for 30 seconds, shutdown the htpc, after a minute of power outage, turn off the unraid server.  I have already set the unraid server TIMEOUT value)

 

Any help would be appreciated,

 

Matt

 

ps. The htpc is running vista, and I have the powerchute software that came with the APC UPS

ok, so I'm new to UPSes... I have a APC Back-ups ES 550.  It has a single "data port" that uses a special cable with a RJ45 jack on one end and a USB A male on the other.  I currently have it set up and working on the unraid server, no problems there.

 

What I want to do is plug a second computer(my htpc) into the UPS and have it shutdown when the power goes out as well.  Is there a way to have the htpc connect to the unraid server to find out the status of the power via network?  I'm assuming that I will need to set-up apcupsd on the unraid machine to broadcast it... (ideally I would like them to have staggered shutdowns, meaning if the power is off for 30 seconds, shutdown the htpc, after a minute of power outage, turn off the unraid server.  I have already set the unraid server TIMEOUT value)

 

Any help would be appreciated,

 

Matt

 

ps. The htpc is running vista, and I have the powerchute software that came with the APC UPS

 

Sorry for the stupid question, I had read the apcupsd manual but must have been confused/not paying enough attention.  Going back over, the answer is pretty clearly laid out for me.

 

For others that are interested here is the link to the manual: http://www.apcupsd.org/manual/index.html

The details for the setup I discussed are found here: http://www.apcupsd.org/manual/Configuration_Examples.html#SECTION000134000000000000000

 

Cheers,

Matt

ok, so I'm new to UPSes... I have a APC Back-ups ES 550.  It has a single "data port" that uses a special cable with a RJ45 jack on one end and a USB A male on the other.  I currently have it set up and working on the unraid server, no problems there.

 

What I want to do is plug a second computer(my htpc) into the UPS and have it shutdown when the power goes out as well.  Is there a way to have the htpc connect to the unraid server to find out the status of the power via network?  I'm assuming that I will need to set-up apcupsd on the unraid machine to broadcast it... (ideally I would like them to have staggered shutdowns, meaning if the power is off for 30 seconds, shutdown the htpc, after a minute of power outage, turn off the unraid server.  I have already set the unraid server TIMEOUT value)

 

Any help would be appreciated,

 

Matt

 

ps. The htpc is running vista, and I have the powerchute software that came with the APC UPS

 

Sorry for the stupid question, I had read the apcupsd manual but must have been confused/not paying enough attention.  Going back over, the answer is pretty clearly laid out for me.

 

For others that are interested here is the link to the manual: http://www.apcupsd.org/manual/index.html

The details for the setup I discussed are found here: http://www.apcupsd.org/manual/Configuration_Examples.html#SECTION000134000000000000000

 

Cheers,

Matt

Reading between the lines, if you install the apsupsd "network" config on a PC on your lan, it can be configured to shut down even if it is not plugged into the same UPS, and even if it is not even plugged into an APC brand UPS.  The unRAID server plugged into the APC UPS and communicating with the UPS will simply alert the other PC's that power has been lost.  They then do their own timing. 

 

Interesting.  I'll have to try that on one of my machines some day when I next inherit  a dumb UPS.

Reading between the lines, if you install the apsupsd "network" config on a PC on your lan, it can be configured to shut down even if it is not plugged into the same UPS, and even if it is not even plugged into an APC brand UPS.   The unRAID server plugged into the APC UPS and communicating with the UPS will simply alert the other PC's that power has been lost.  They then do their own timing.   

 

Interesting.   I'll have to try that on one of my machines some day when I next inherit  a dumb UPS.

 

You figured me out...

 

Well what I have been working on doing is two-fold.. First, having a computer(htpc) on the same UPS recognize the power outage and turn off itself off with the unraid server (which I mentioned above)..

 

Secondly, i'm trying to get my laptops to do as you are saying.. to get the alert and shutdown even though they are not attached to the ups  (to powerdown if I left them on and plugged in with no one around to turn them off.)  Usually when I have them left on, it is for downloading... if the power goes out, the cable modem won't work and therefore no need for the laptops to be running off their battery.  Although the same idea can be used for non-APC UPSes or dumb UPS as you mention.

 

Cheers,

Matt

dumb UPS

 

How dumb is dumb... I currently have a large 1200va UPS that is REALLY dumb... it has NO data port...  :o

 

dumb UPS

 

How dumb is dumb... I currently have a large 1200va UPS that is REALLY dumb... it has NO data port...  :o

 

If the PC connected to the dumb UPS can automatically shut itself down in an extended power failure, the un-loaded battery of the dumb UPS will probably last through most power failures of moderate duration.

 

Your UPS qualifies as pretty dumb.  You will need a smarter UPS that can talk with the apcupsd program so it will know when power is failing.  You can usually pick up one of those for anywhere from $39. on up, depending on the capacity, and the sale of the day. 

You figured me out...

 

Well what I have been working on doing is two-fold.. First, having a computer(htpc) on the same UPS recognize the power outage and turn off itself off with the unraid server (which I mentioned above)..

 

Secondly, i'm trying to get my laptops to do as you are saying.. to get the alert and shutdown even though they are not attached to the ups  (to powerdown if I left them on and plugged in with no one around to turn them off.)  Usually when I have them left on, it is for downloading... if the power goes out, the cable modem won't work and therefore no need for the laptops to be running off their battery.  Although the same idea can be used for non-APC UPSes or dumb UPS as you mention.

 

Cheers,

Matt

 

Ok, so after some fudging around, I got my laptop to recognize the APC UPS attached to my unRAID server.

here are the details of the set-up for others looking to try. (note the term windows computer referes to the secondary computer... it sould have any operating system on it, i'll use windows because it's what i installed it on)

 

1. First, there are no need to change any settings on apcupsd ont he unraid server... it is configured and ready to go (to my delight)

2. Install APCUPSD on your other computers (I used the win version in vista with no problems).  make sure you install the tray program as well, it will allow you to keep track of the ups status from your windows machine.

3. configure the apcupsd.conf on the windows computers(all computers you want to look to the unraid server for UPS status) as follows:

UPSCABLE ether

UPSTYPE net

DEVICE tower:3551 <- where "tower" is your unraid server name, for me it's "server"

UPSCLASS standalone

UPSMODE disable

POLLTIME 10 <- make sure that this computer polls at least once between power failure and shutdown of the unraid server (10-30 seconds should be good)

 

ALSO make sure the following settings are configured this way or you will not get a connection:

NETSERVER on

NISIP 0.0.0.0 <- I'm not entirely sure about this value, the default 0.0.0.0 works so I didn't feel a need to play with this value.

 

Here is a screenshot from my windows computer:

apcupsd.jpg

(notice the values for Cable(where it is looking for the ups), Master(the computer this one is listening to for APC status) and the Status)

 

Cheers,

Matt

That is really cool.  The only issue I can foresee is if you take the unRAID server off-line to physically install a drive.

 

I'm wondering... if you did not disable the apcupsd software on the laptop, would it would power itself down thinking power had been lost?

 

An experiment or two might be in order.

 

Joe L.

That is really cool.  The only issue I can foresee is if you take the unRAID server off-line to physically install a drive.

 

I'm wondering... if you did not disable the apcupsd software on the laptop, would it would power itself down thinking power had been lost?

 

An experiment or two might be in order.

 

Joe L.

 

I will experiment more with this when I have some time... I will have to get back to you

 

Matt

That is really cool.  The only issue I can foresee is if you take the unRAID server off-line to physically install a drive.

 

I'm wondering... if you did not disable the apcupsd software on the laptop, would it would power itself down thinking power had been lost?

 

An experiment or two might be in order.

 

Great post, Biggy2872!

 

Doing the test is a good idea.  My guess, though, is that failing to communicate with the unRAID server, it just wouldn't shut down at all.  This would create a dependency between the two boxes both being up at the same times.

 

Maybe a little obvious, but the network switch would have to also be plugged into the UPS for this to work.  I don't think the router would need to be.  Can someone confirm?

 

That is really cool.  The only issue I can foresee is if you take the unRAID server off-line to physically install a drive.

 

I'm wondering... if you did not disable the apcupsd software on the laptop, would it would power itself down thinking power had been lost?

 

An experiment or two might be in order.

 

Great post, Biggy2872!

 

Doing the test is a good idea.  My guess, though, is that failing to communicate with the unRAID server, it just wouldn't shut down at all.  This would create a dependency between the two boxes both being up at the same times.

 

Maybe a little obvious, but the network switch would have to also be plugged into the UPS for this to work.  I don't think the router would need to be.  Can someone confirm?

 

The router(i think it does, how else would the packets know where to go) and dependent switches would need to be on battery backup too, you are right.. BUT, they can be on a dumb ups. 

Also if you have a BIG dumb UPS and a small smart one to get the signal (as jimwhite may need to do).. the smaller smart ups can have the router/switches plugged in to it (but still run its data port wire to the server for the signal) and let the big, dumb ups handle the actual power to the computers.

 

I have a feeling that you are right about not shutting down when the unraid server shuts down, but we'll see.

 

I will look into the testing in the next few days when I have a big block of free time to play with things....

 

I also thought I would mention, that there is supposed to be a way, according to the documentation, to ONLY monitor the apc from the windows machine and not actually have it powerdown at all regardless of the signal from the ups... I'll see if I can find out more about this as well...

 

Cheers,

Matt

You can operate a network without a router with static IP.  The router is needed as a gateway for Internet access, and (for most of us) as a DHCP server.  The router may be needed for DNS inside the local LAN, but a "hosts" file (or static IP for the unRAID box) may make that unnecessary for this purpose.

You can operate a network without a router with static IP.  The router is needed as a gateway for Internet access, and (for most of us) as a DHCP server.  The router may be needed for DNS inside the local LAN, but a "hosts" file (or static IP for the unRAID box) may make that unnecessary for this purpose.

You are probably right.. although in my case, it is irrelevant.

 

I only have a single router with no switches in my set-up, although the advice would surely help out someone wanting to adopt this set-up and has a router with one or more switches.

 

Cheers,

Matt

Ok, so I had some time to run a few quick tests and do some more reading...

 

I killed apcupsd on the server (to simulate the unraid server being taken offline), because I couldn't actually turn off the server (I was told that I would lose my testicles!)..  After waiting a sufficient amount of time for my TIMEOUT variable to elapse, I did get a "COMM LOST" message but no powerdown as bjp999 suggested.

 

apccommlost.jpg

(note the status)

 

I also found (by poking in every corner of the apcupsd manual) that, like the slackware version. the shutdown procedures can be modified.  This is done in the c:/apcupsd/etc/apcupsd/apccontrol.bat (whereas in unraid it is in the file /etc/apcupsd/apccontrol).  You can edit the shutdown procedures by commenting out the shutdown call and replacing it with a output to the events log or whatever you like, so that you are only MONITORING the ups and not responding its signals with powerdowns...  I tried this and it worked, it did not shutdown my laptop even when apcupsd was trying to shut it down because the server was being shutdown (again, I faked it so I could stay rich and keep the family jewels).  Just another option for those looking to monitor their UPS over the network, or even from a remote location (to check in and see how things are with the UPS... or have you ever ask yourself during a big storm, I wonder if the power is still on at home? now you can find out - just some outside the box thinking!)

 

the edits I made to apccontrol.bat are as follows:

was:

:doshutdown
rem
rem  ...

*snip*

rem   ping -n 1 -w 12000 10.255.255.254 > NUL
rem
   %SHUTDOWN% -h now
   GOTO :done

now:

:doshutdown
rem
rem  ...

*snip*

rem   ping -n 1 -w 12000 10.255.255.254 > NUL
rem
rem   %SHUTDOWN% -h now
   GOTO :done

 

I mentioned already that I don't have both a router and a switch in my network to test to see what needs to be plugged in for sure.  If I get some time (likely this weekend) I will dig out one of my old linksys 4 port wired routers and hook it up as a switch on my network and test a power failure with a router on the UPS and without it to see if it makes a difference.  Unless someone beats me to it, of course.

 

Cheers,

Matt

  • Author

This is great to see.  I have a UPS on every computer in the house, but all they use the serial cables, which I don't have and have not had the inclination to build.

 

So far they just protect me against blinks, or brown outs.  This could provide better coverage.

 

I actually set this up once when I had two computers on the same UPS, but when I moved the UPS to the UnRaid box did not think to set it up again.

 

thanks for the great idea!

 

dave

This is great to see.  I have a UPS on every computer in the house, but all they use the serial cables, which I don't have and have not had the inclination to build.

 

So far they just protect me against blinks, or brown outs.  This could provide better coverage.

 

I actually set this up once when I had two computers on the same UPS, but when I moved the UPS to the UnRaid box did not think to set it up again.

 

thanks for the great idea!

 

dave

 

I'm just glad my testing/work will prove helpful to others...

 

As a side note, I did get to do some limited testing of the network (router/switch) question.  The tests were not as definitive as I had hoped.  I only had about an hour or so to work with so the findings are subject to change when I get some more time to do some additional research and execute more carefully crafted tests.  But for now here we go:

 

when I had unRAID and windows machine set to DHCP, the router needed to be there.

when I had both set to static, router was not needed.

when I had unraid on static and windows in dhcp (worked with only switch plugged in, but in 5 tries, 2 did not work)

when I had unraid on dhcp and windows static, needed router plugged in.

 

I accomplished testing this by only changing the dchp/static setting on my machines without testing various router/swtich settings.  Your results may vary depending on network settings.

 

What *I* figure from these results is that the NIS server works by making a single connection upon request, returns the expected status information, then closes the connection.  This means to me, that in order for you to only have the switch plugged into the ups for power, the unraid server would have to be static but that the requesting computer can be dhcp (although I did have an issue or two with it, but that could be a problem with my very old linksys wired 4 port router being used as a switch, circa 2000-2002).

 

I plan on writing a full wiki for apcupsd in the near future(likely sometime in the next few weeks as my free time steadily starts to increases) out so that all the relevant documentation for setting up apcupsd for various ups types and for the various "network apcupsd solutions".  It will also include the instructions for modifying a local copy of apcupsd-unmenu-package.conf to work for your set-up.

 

Until then... Cheers,

Matt

  • 2 weeks later...

Am I missing something ?

I can't acces the UPS. The HID driver will not be loaded.

cat /proc/bus/usb/devices

T:  Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  3 Spd=1.5 MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0463 ProdID=ffff Rev=42.41
S:  Manufacturer=MGE OPS SYSTEMS
S:  Product=ELLIPSE
S:  SerialNumber=BD8J3300L
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr= 20mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=(none)
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=20ms

It says :"Driver=(none)" instead of "Driver=HID"

So, I cant' communicate with the UPS.

cannot connect to server localhost on port 3551

 

Does someone have an idea ?

 

syslog won't upload, so i put it there : http://www.mediafire.com/?sharekey=719f2fc46b0cb6e65bf1f12f1ff3f30a003a809be1a58ec8b8eada0a1ae8665a

Feb 14 03:04:59 tvixhd4 kernel: usbcore: registered new interface driver hiddev
Feb 14 03:04:59 tvixhd4 kernel: usbcore: registered new interface driver usbhid
Feb 14 03:04:59 tvixhd4 kernel: drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver

Feb 14 03:05:36 tvixhd4 apcupsd[2340]: apcupsd FATAL ERROR in linux-usb.c at line 609 Cannot find UPS device -- For a link to detailed USB trouble shooting information, please see <http://www.apcupsd.com/support.html>. 
Feb 14 03:05:36 tvixhd4 apcupsd[2340]: apcupsd error shutdown completed

Feb 14 06:34:22 tvixhd4 apcupsd[3510]: apcupsd FATAL ERROR in linux-usb.c at line 786 Cannot find UPS device -- For a link to detailed USB trouble shooting information, please see <http://www.apcupsd.com/support.html>. 
Feb 14 06:34:22 tvixhd4 apcupsd[3510]: apcupsd error shutdown completed

Feb 14 06:51:38 tvixhd4 apcupsd[3541]: apcupsd FATAL ERROR in linux-usb.c at line 786 Cannot find UPS device -- For a link to detailed USB trouble shooting information, please see <http://www.apcupsd.com/support.html>. 
Feb 14 06:51:38 tvixhd4 apcupsd[3541]: apcupsd error shutdown completed

 

I'm not an expert in this, but I don't think it is a problem with HID.  The HID driver is available, but the apcupsd module has been shutdown, 3 times above.  I would check the support link it indicates, and perhaps the source code at the indicated lines.  This may or may not be helpful.

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.