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.

[DEPRECATED] Apcupsd Plugin for V6

Featured Replies

  • Author

New version of the apcupsd plugin is available.

 

The requirement that the UPS daemon be stopped in order to make setting changes has been removed.

 

Implemented the unRAID notification system so UPS events are emailed and shown on the webgui.

 

The UPS events are listed in the OP.

  • Replies 203
  • Views 28.6k
  • Created
  • Last Reply

It's great to see the updates keep coming - thank you for everything you are doing!

 

Two questioins:

1) Am I the only person who is a little frustrated by the wide spacing of the lines in the UPS status - it requires excessive scrolling to see all the data?  Would anyone object if the lines were close-spaced?

2) Are the notification events available as triggers for events to which plugins can respond?  I would find it very useful for a plugin to be able to respond to power fail/power restore events.

New version of the apcupsd plugin is available.

 

The requirement that the UPS daemon be stopped in order to make setting changes has been removed.

 

Implemented the unRAID notification system so UPS events are emailed and shown on the webgui.

 

The UPS events are listed in the OP.

 

I don't suppose you could make the following setting to also be configurable?

 

"ANNOY" - Time in seconds between annoying users to signoff prior to system shutdown. 0 disables.

New version of the apcupsd plugin is available.

 

The requirement that the UPS daemon be stopped in order to make setting changes has been removed.

 

Implemented the unRAID notification system so UPS events are emailed and shown on the webgui.

 

The UPS events are listed in the OP.

 

Very cool! Thanks so much for all the hard work you have put into this plugin. Much appreciated.

 

Gary

  • Author

I'm using the built in script for notifications.  The script is called 'notify'.  I don't think other processes can receive notifications about ups events.  Right now I believe it is limited to sending emails and webGui notifications.  BTW, You can control the way you are notified by the settings on the notifications page.

 

If you want to test the ups notification, unplug the ups communication cable, wait for a minute or so and you'll get the email and webgui notification.  Plug it back in and you'll get another notification.

I've just set up web and email notifications - pretty cool.  After updating Apcupsd, I found that it was necessary to reboot in order to enable the UPS notifications.  I tried the 'pull the usb connection' test, and it worked perfectly!  Thanks very much!

  • Author

Another update to the plugin.  I revised the field descriptions to cater to a wider audience.  The field descriptions now explain better what the field settings do.  The optional fields ('Custom UPS Cable' and 'Device') are managed and are only active when appropriate.  They are also cleared when not valid for the selection made.

 

EDIT: The 'Timeout' default is now set to zero seconds.  When set to zero the timeout is disabled.  This value is really for older UPSs that don't have time left or % battery left values in the UPS firmware.  If the UPS does not have any indicator of % battery or time left on battery, the timeout will shut down the UPS after the set number of seconds.  You would set the value to a short enough time to insure there is enough power left in the batteries to perform a shutdown.  Newer UPSs have the time left and % battery values built into their firmware, so the timeout value is not really needed unless you want a quick shutdown.

EDIT: The 'Timeout' default is now set to zero seconds.  When set to zero the timeout is disabled.  This value is really for older UPSs that don't have time left or % battery left values in the UPS firmware.

 

I know that we might be an unusual case, here in Philippines, but I just want to point out that the 'Timeout' setting is still useful with a 'smart' ups.  We frequently have two, or more, power cuts a day (I think that ten is highest I've counted in any 24 hour period) - often with only five minutes power in between.  I don't want to allow the batteries to become exhausted on one powercut - otherwise I run the risk of an abrupt power loss on subsequent events.  I set the timeout to five minutes, which allows me time to get out and start the generator, if I so wish, before shutdown occurs.  My ups will support 25-30 minutes run time - allowing protection for five consecutive power cuts.

 

After all, there is not much point leaving the server running if most other electrical equipment in the house is off!

The display problem I reported about the UPS Status section here seemed to go away after the recent "tabbed" version but now it is back, but only on that tab. Not sure if it was due to this latest update or not since I only bothered to look at that page again just now. Haven't really changed anything else, except for a reboot today to upgrade parity.

  • Author

EDIT: The 'Timeout' default is now set to zero seconds.  When set to zero the timeout is disabled.  This value is really for older UPSs that don't have time left or % battery left values in the UPS firmware.

 

I know that we might be an unusual case, here in Philippines, but I just want to point out that the 'Timeout' setting is still useful with a 'smart' ups.  We frequently have two, or more, power cuts a day (I think that ten is highest I've counted in any 24 hour period) - often with only five minutes power in between.  I don't want to allow the batteries to become exhausted on one powercut - otherwise I run the risk of an abrupt power loss on subsequent events.  I set the timeout to five minutes, which allows me time to get out and start the generator, if I so wish, before shutdown occurs.  My ups will support 25-30 minutes run time - allowing protection for five consecutive power cuts.

 

After all, there is not much point leaving the server running if most other electrical equipment in the house is off!

 

Another way to do it is to set a % battery left to a higher value.  That way you'd be guaranteed of having sufficient battery power left.

The display problem I reported about the UPS Status section here seemed to go away after the recent "tabbed" version but now it is back, but only on that tab. Not sure if it was due to this latest update or not since I only bothered to look at that page again just now. Haven't really changed anything else, except for a reboot today to upgrade parity.

 

This is a style issue in the black theme only. Will be corrected in an upcoming version of the webGui.

 

  • Author

The display problem I reported about the UPS Status section here seemed to go away after the recent "tabbed" version but now it is back, but only on that tab. Not sure if it was due to this latest update or not since I only bothered to look at that page again just now. Haven't really changed anything else, except for a reboot today to upgrade parity.

 

What browser are you using?  What is your display resolution?

  • Author

The display problem I reported about the UPS Status section here seemed to go away after the recent "tabbed" version but now it is back, but only on that tab. Not sure if it was due to this latest update or not since I only bothered to look at that page again just now. Haven't really changed anything else, except for a reboot today to upgrade parity.

 

This is a style issue in the black theme only. Will be corrected in an upcoming version of the webGui.

 

I don't test with the black theme so I didn't see this.  bonienl is on it.

Another way to do it is to set a % battery left to a higher value.  That way you'd be guaranteed of having sufficient battery power left.

... except that on second, and subsequent, cuts I wouldn't have time to start the generator before the server started shutting down.

  • Author

That's why the settings are there.  You can set it up however it works best for you.

I noticed, this morning, that when the UPS was in 'TRIM ONLINE' status, most of the status information at the top of the configuration screen was removed.  TRIM and BOOST status is not a fault condition, and shouldn't be treated as such - it's merely informing that the AVR function is doing its job.

  • Author

I noticed, this morning, that when the UPS was in 'TRIM ONLINE' status, most of the status information at the top of the configuration screen was removed.  TRIM and BOOST status is not a fault condition, and shouldn't be treated as such - it's merely informing that the AVR function is doing its job.

 

I will make the changes.  I am having trouble finding the exact status values from the UPS, but I believe they are: 'TRIM ONLINE' and 'SMART BOOST'.  This is the best I can get from the apcupsd documentation.

 

 

I will make the changes.  I am having trouble finding the exact status values from the UPS, but I believe they are: 'TRIM ONLINE' and 'SMART BOOST'.  This is the best I can get from the apcupsd dpcumentation.

 

Great, many, many thanks!  Yes, I also had difficulty finding the precise status texts online.  The 'trim' often occurs in the evening/early morning, when I have seen our nominal 230V go as high as 264V.  The 'boost' often occurs when I'm using the generator, which seems to be set at around 220V ... I must adjust that sometime.

 

I will let you know how it goes, and make a note of the exact texts.  I'm not clear whether the texts come from the UPS or whether they are produced by apcupsd/apcaccess.

 

Later:

Okay, I've just looked at apcupsd in binary mode - as far as I can tell, it's 'TRIM ONLINE' and 'BOOST ONLINE' - there is no string 'SMART' anywhere in the file.

 

EDIT:

BTW, have you any comment on my suggestion to close-space the lines on the UPS Status page?

EDIT:

BTW, have you any comment on my suggestion to close-space the lines on the UPS Status page?

 

Quick observations from another party.  I looked at the 'UPS Status' page.  My thought is is the lines are moved closer together, I (personally) will have problems reading the value from an variable because the columns are so wide in my default width browser window that my eyes couldn't move across the 'white space' from the variable to its value.  (The columns have variable width properties  and I realize I can make the window smaller which will reduce the white space but that then would cause problems with other pages.)

 

EDITED to fix the result of clumsy fingers!!!

I just looked at the spacing also, and sort of agree with both views.  The rows are 'wasting' a lot of space with the height/white space between, but the columns are so far apart, it would be hard to 'follow' if the rows were made smaller.

 

How about maybe a table, so we can have more than 2 columns?  This would keep the need to scroll to the bottom of a long list minimized, and would let us see more of the information on one page.  I don't know how best to 'group' or rearrange the fields to keep similar values together, but maybe 4 (or even 6) columns would be easier to see everything.

 

With all that said, I pretty much never need to see this information on a regular basis, so if it remained as it is, that wouldn't bother me at all either.  Just giving my thoughts for consideration towards any changes :)

  • Author

Another update to the plugin.

 

The status has been reformatted in the latest version of the plugin.  It more matches the status output from the /sbin/apcaccess status script where this information comes from.

 

I also added a link to the online apcupsd manual.

  • Author

I will make the changes.  I am having trouble finding the exact status values from the UPS, but I believe they are: 'TRIM ONLINE' and 'SMART BOOST'.  This is the best I can get from the apcupsd dpcumentation.

 

Great, many, many thanks!  Yes, I also had difficulty finding the precise status texts online.  The 'trim' often occurs in the evening/early morning, when I have seen our nominal 230V go as high as 264V.  The 'boost' often occurs when I'm using the generator, which seems to be set at around 220V ... I must adjust that sometime.

 

I will let you know how it goes, and make a note of the exact texts.  I'm not clear whether the texts come from the UPS or whether they are produced by apcupsd/apcaccess.

 

Later:

Okay, I've just looked at apcupsd in binary mode - as far as I can tell, it's 'TRIM ONLINE' and 'BOOST ONLINE' - there is no string 'SMART' anywhere in the file.

 

EDIT:

BTW, have you any comment on my suggestion to close-space the lines on the UPS Status page?

 

These statuses will show:

'ONLINE TRIM' will show 'UPS: Online(trim)

'ONLINE BOOST' will show 'UPS: Online(boost)

 

This way you can tell if the voltage is being trimmed or boosted and the online status will show properly.

 

UPS Status Page has been reformatted.

So my setup has my Unraid box connected to the same UPS as my desktop.  In looking at some old posts on this form I discovered that Apcupsd can be configured using an inbuilt, Network Information Server, which will send apcupsd information accross your network to other designated computers....

 

http://lime-technology.com/forum/index.php?topic=28261.msg250947#msg250947

 

I had no idea this was an option, so you can see that I'm pretty excited about it.

 

Can your plugin be configured this way? Would I have to dig down into the apcupsd.conf file and make changes manually, and if I do would that cause problems with updates?

 

I can't be the only one with this kind of set up can I? Could these additional config options be included in your plug-in perhaps on an separate NIS tab.

 

I'd love to get this working, but I also don't want to mess up a good thing in the process.

  • Author

So my setup has my Unraid box connected to the same UPS as my desktop.  In looking at some old posts on this form I discovered that Apcupsd can be configured using an inbuilt, Network Information Server, which will send apcupsd information accross your network to other designated computers....

 

http://lime-technology.com/forum/index.php?topic=28261.msg250947#msg250947

 

I had no idea this was an option, so you can see that I'm pretty excited about it.

 

Can your plugin be configured this way? Would I have to dig down into the apcupsd.conf file and make changes manually, and if I do would that cause problems with updates?

 

I can't be the only one with this kind of set up can I? Could these additional config options be included in your plug-in perhaps on an separate NIS tab.

 

I'd love to get this working, but I also don't want to mess up a good thing in the process.

 

It should be a matter of just configuring with the choices in the plugin.  The NIS server is started when the ups daemon is started.  You can see this in the log.  The IP address of the NIS server is the IP address of the unraid server.  You will want to set a fixed IP address on the NIS server computer.

 

I'll use two unraid servers connected to one ups as an example.  I'll assume the IP address of the NIS server as 192.168.1.50.  This is the computer directly communicating with the ups.

 

Configure the unraid connected to the UPS normally.  This is the NIS server.

 

Then set up the client unraid as follows:

 

UPS Cable:  'ether'

UPS Type:  'net'

Device:  '192.168.1.50:3551' or 'Tower:3551'

 

EDIT: The Apcupsd documentation also says you could use the name of the server.

 

The default NIS port is 3551.

 

The shutdown parameters on the NIS client and server need to be configured so the client will shutdown first if you turn off the ups with the server when it shuts down to insure the client has time to shutdown.

 

There is a client apcupsd program that will run on a Windows computer to sense the signal from the NIS server if you want the Windows computer to get its shutdown signal from the NIS server.

 

Some time ago I did this with a Windows computer as a client and it worked fine.

So my setup has my Unraid box connected to the same UPS as my desktop.  In looking at some old posts on this form I discovered that Apcupsd can be configured using an inbuilt, Network Information Server, which will send apcupsd information accross your network to other designated computers....

 

http://lime-technology.com/forum/index.php?topic=28261.msg250947#msg250947

 

I had no idea this was an option, so you can see that I'm pretty excited about it.

 

Can your plugin be configured this way? Would I have to dig down into the apcupsd.conf file and make changes manually, and if I do would that cause problems with updates?

 

I can't be the only one with this kind of set up can I? Could these additional config options be included in your plug-in perhaps on an separate NIS tab.

 

I'd love to get this working, but I also don't want to mess up a good thing in the process.

 

It should be a matter of just configuring with the choices in the plugin.  The NIS server is started when the ups daemon is started.  You can see this in the log.  The IP address of the NIS server is the IP address of the unraid server.  You will want to set a fixed IP address on the NIS server computer.

 

I'll use two unraid servers connected to one ups as an example.  I'll assume the IP address of the NIS server as 192.168.1.50.  This is the computer directly communicating with the ups.

 

Configure the unraid connected to the UPS normally.  This is the NIS server.

 

Then set up the client unraid as follows:

 

UPS Cable:  'ether'

UPS Type:  'net'

Device:  '192.168.1.50:3551'

 

The default NIS port is 3551.

 

The shutdown parameters on the NIS client and server need to be configured so the client will shutdown first if you turn off the ups with the server when it shuts down to insure the client has time to shutdown.

 

There is a client apcupsd program that will run on a Windows computer to sense the signal from the NIS server if you want the Windows computer to get its shutdown signal from the NIS server.

 

Some time ago I did this with a Windows computer as a client and it worked fine.

 

This is super awesome news. I wasn't sure if the NIS server was on by default or if I had to go configure it! I'll try to get this working and report back! Again thanks for the awesome support!

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.