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

*** The apcupsd plugin is now installed in the core.  This plugin is deprecated. ***

 

I have updated the apcupsd plugin to work properly with the V6 plugin manager.  The plugin manager built into unRAID is the preferred way to manage plugins.  You can install, remove, and update plugins from the plugin manager page.

 

To install the apcupsd, go to the 'Plugins' page and enter the following into the 'Install Plugin' line and then click the 'Install' button.

 

https://github.com/dlandon/unraid-snap/raw/master/Apcupsd-x86_64.plg

 

The Apcupsd plugin will be installed.  You can then manage the plugin from the plugin manager page.

 

If you did not use the plugin manager to install Apcupsd, then delete the Apcupsd plugin from the /boot/config/plugins directory and the Apcupsd and powerdown packages from the /boot/packages directory and reboot.

 

I have the plugin and Apcupsd package hosted on my GitHub account and will update the plugin as necessary and you will be able to update from the plugin manager and won't have to puruse the forum looking for the proper Apcupsd package to use.

 

The Apcupsd version is the latest 3.14.12.  The powerdown plugin is not installed by apcupsd and can be installed as a separate plugin if desired.  The user can see the powerdown plugin installed in the plugin manager and powerdown can be managed independently of Apcupsd.  If you have a fairly basic unRAID configuration, the powerdown plugin is not necessary.

 

Click on the 'Help' button to see descriptions of the fields and what they mean.  That will give you all the information you need to set up and use the apcupsd plugin.

 

unRAID v6b12 has a notification system that will email and display notifications on the webgui.  The following are the notification events that the apcupsd daemon will generate:

  • Communications with UPS lost.
  • Communications with UPS restored.
  • Power failure.
  • Power restored.
  • Continuing shutdown even though main power has returned.
  • Battery power exhausted.
  • Battery time limit exceeded.
  • Remaining battery charge below limit.
  • Remaining battery run time below limit.
  • UPS initiated shutdown sequence.
  • Power problems with UPS.
  • Emergency shutdown.  Possible battery failure.
  • Batteries have failed.
  • Remote shutdown.

 

Change Log:

The Changelog is now built into the plugin and you'll be able to look at the changes when you update the plugin.

  • Replies 203
  • Views 28.6k
  • Created
  • Last Reply
I have updated the apcupsd plugin to work properly with the V6 plugin manager.
Which beta versions will this work with?
  • Author

I have updated the apcupsd plugin to work properly with the V6 plugin manager.
Which beta versions will this work with?

 

It should work on all betas, but I have not checked it.

installed, but not tested.  I can't imagine it won't work fine given that the ups is responding to commands, the webgui is working, my kill file has been copied ro rc.unRAID.d and "powerdown" at the cli initiated a clean shutdown and rebooted successfully.

Works on beta 7. In the plugins page it shows up at the top with an error: /boot/config/Apcupsd-x86.plg apcups mismatch.

 

ScreenHunter_13_Sep._02_21_07.jpg.7236e388beff717193036ba3a7a11bcb.jpg

ScreenHunter_14_Sep._02_21_10.jpg.cd549a5664d083d5c6f17f5f768d18e4.jpg

  • Author

I tested it on beta8 and not on beta7.  I don't know what that error means.  It may be an error in the plugin manager.

  • Author

installed, but not tested.  I can't imagine it won't work fine given that the ups is responding to commands, the webgui is working, my kill file has been copied ro rc.unRAID.d and "powerdown" at the cli initiated a clean shutdown and rebooted successfully.

 

What version of v6 beta are you using?

  • Author

I've updated the Apcupsd plugin to now install powerdown as a plugin so it can be updated on its own.  Having a powerdown plugin makes it easier for other plugins using powerdown to always install the same version, not install multiple versions, and allow the user to have visibility about the version installed and to decide to update powerdown independent of other plugins.  Plugins that depend on powerdown no longer have to be updated when there is a change in powerdown.

 

After working with the new plugin scheme on V6, I have to say it is pretty awesome.  Installation, removal, and updates are very simple and it solves a lot of the manual looking through the forum to find the right version of a plugin.  Its my understanding that LT will be setting up a repository for some plugins that are deemed to be part of the core functionality.

I did a update from the plgman page, and after that the plugin was uninstalled ???? is it a bug in your plugin? or in UnRAID?

 

//Peter

  • Author

Plgman is having a problem with updates and Tom is aware of it.

dlandon

 

On a different version of the plg I have the settings page for APC UPS also shows the Load Percentage and Nominal Power.

 

Can these be added to your version please.

 

Kevin.

 

  • Author

dlandon

 

On a different version of the plg I have the settings page for APC UPS also shows the Load Percentage and Nominal Power.

 

Can these be added to your version please.

 

Kevin.

 

Just added changes for this from dmacias.

Thank you. Works fine.

 

Kevin.

Hey want to first say thanks! This is awesome and I had no problem installing and getting this plugin to work with my CyberPower 1000PFCLCD.

 

Now a couple of things to point out.

 

On the APC UPS settings page Battery Charge has a minor typo, where there are 3 T's in battery.  :P

 

Also on the plug in page Extensions -> Plugin I am getting the following error and not seeing an icon or information about the plug-in even thought it's properly installed and working.

 

error: /boot/config/plugins/Apcupsd-x86_64.plg apcups mismatch

error: /boot/config/plugins/powerdown-x86_64.plg powerdown mismatch

 

This matches the error soana reported, earlier.

  • Author

Thanks.  I'll fix the typo.

 

The earlier report was for b7.  If you are on b7, update to a later version.

Thanks.  I'll fix the typo.

 

The earlier report was for b7.  If you are on b7, update to a later version.

Or maybe downgrade to b6, wait on b9, and don't worry about this plugin for now.

Thanks.  I'll fix the typo.

 

The earlier report was for b7.  If you are on b7, update to a later version.

 

I'm actually running 6b6 and lucky I was lazy and planned to update to 6b8 this weekend... looks like I'm holding off on that.

 

 

  • Author

I have released a new version of Apcupsd.  When I first converted the plugin to the new V6 structure, I had a problem with using 'apcupsd' as the name of the plugin.  The plugin would not be recognized by the plugin manager as installed.  I named it 'apcups' to get around this issue.  I have subsequently found that there was some things done in the V5 version of the plugin that caused a problem in the V6 version.  Namely the logs were written to /var/log/plugins/apcupsd.  unRAID uses the /var/log/plugins directory to manage plugins and should not be touched by the apcupsd plugin.  I have corrected that, and the plugin is now named 'apcupsd' as I believe is should be.

 

Because of this change, the plugin manager will not update the plugin.  It says that the plugin name is not installed.  The solutions is to remove the plugin and then reinstall it.

I just tried to remove it and it didn't seem to completely clean up. I couldn't reinstall until I rebooted. This is probably because I didn't think to stop it before trying to remove it.

 

Working fine after rebooting and reinstalling. Thanks

 

  • Author

I just tried to remove it and it didn't seem to completely clean up. I couldn't reinstall until I rebooted. This is probably because I didn't think to stop it before trying to remove it.

 

Working fine after rebooting and reinstalling. Thanks

 

You shouldn't have to stop apcupsd first.  That's handled by the plugin manager and the apcupsd plugin.

 

There have been quite a few structural changes (files and directories moved around) in the process of me getting the plugin compatible with V6.  The plugin manager probably got confused.  An earlier version may not have cleaned up the way it should.  I don't expect any further changes at this time unless future beta software requires a change in the plugin.

The reason I thought it didn't completely clean up is because it left an entry on the plugin page, but its icon had reverted to the generic "jigsaw puzzle piece" icon. All OK now though.

  • Author

The reason I thought it didn't completely clean up is because it left an entry on the plugin page, but its icon had reverted to the generic "jigsaw puzzle piece" icon. All OK now though.

 

Yes.  That is what happens if the removal is not clean.  Earlier versions of apcupsd had this problem.

Not sure if it is totally related bu I just updated from an Aug version (iirc) to the latest version and it left a fully functional second copy in the Settings page (with a good icon).  I know it is different though because it is the one with Batttery.  This was an upgrade from beta8 to beta9. 

  • Author

Remove apcupsd from the plugin manager and re-install.  I've made a lot of changes, and the plugin manager was known to have a problem with updating plugins.

 

Also check for any plg files on /boot and /boot/config and remove them before re-installing.  That should clean it up.

I 'upgraded' to this latest version of apcupsd (and hence powerdown) just yesterday (Sept 14).

 

Can you explain why a power cut on Sept 13 allowed a clean restart, yet the restart after a power cut today started running a parity check?

 

On both occasions unRAID v6.0beta9 was running.

 

Sep 13 09:40:54 Tower apcupsd[2078]: Power failure.
Sep 13 09:41:00 Tower apcupsd[2078]: Running on UPS batteries.
Sep 13 09:45:29 Tower sshd[6440]: Received disconnect from 10.2.1.15: 11: disconnected by user
Sep 13 09:45:29 Tower sshd[4563]: Received disconnect from 10.2.1.15: 11: disconnected by user
Sep 13 09:45:29 Tower sshd[4662]: Received disconnect from 10.2.1.15: 11: disconnected by user
Sep 13 09:46:01 Tower apcupsd[2078]: Reached run time limit on batteries.
Sep 13 09:46:01 Tower apcupsd[2078]: Initiating system shutdown!
Sep 13 09:46:01 Tower apcupsd[2078]: User logins prohibited
Sep 13 09:46:01 Tower powerdown[25032]: Powerdown initiated
Sep 13 09:46:01 Tower powerdown[25036]: Powerdown V2.06
Sep 13 09:46:01 Tower rc.unRAID[25038][25039]: Processing /etc/rc.d/rc.unRAID.d/ kill scripts.
Sep 13 09:46:01 Tower rc.unRAID[25038][25043]: Running: "/etc/rc.d/rc.unRAID.d/K00.sh"
Sep 13 09:46:01 Tower rc.unRAID[25038][25047]: Waiting for 0 domains
Sep 13 09:46:01 Tower powerdown[25049]: Initiating Shutdown with ''
Sep 13 09:46:01 Tower shutdown[25050]: shutting down for system halt
Sep 13 09:46:18 Tower init: Switching to runlevel: 0
Sep 13 09:46:20 Tower rc.unRAID[25235][25236]: Powerdown V2.06
Sep 13 09:46:20 Tower rc.unRAID[25235][25237]: Stopping Plugins.
Sep 13 09:46:20 Tower rc.unRAID[25235][25245]: Running: "/etc/rc.d/rc.docker stop"
Sep 13 09:46:20 Tower rc.unRAID[25235][25248]: stopping docker ...
Sep 13 09:46:21 Tower rc.unRAID[25235][25248]: 68d53a8c9096
Sep 13 09:46:22 Tower rc.unRAID[25235][25248]: 4b32e542da76
Sep 13 09:46:23 Tower rc.unRAID[25235][25248]: unmounting docker loopback
Sep 13 09:46:26 Tower rc.unRAID[25235][25359]: Running: "/etc/rc.d/rc.dovecot stop"
Sep 13 09:46:26 Tower rc.unRAID[25235][25362]: Stopping dovecot...
Sep 13 09:46:26 Tower rc.unRAID[25235][25366]: Running: "/etc/rc.d/rc.fan_speed stop"
Sep 13 09:46:26 Tower rc.fan_speed: WARNING: fan_speed called to stop with SERVICE not = disabled
Sep 13 09:46:26 Tower rc.unRAID[25235][25377]: Running: "/etc/rc.d/rc.mpop stop"
Sep 13 09:46:26 Tower rc.unRAID[25235][25380]: usage /etc/rc.d/rc.mpop start|stop|enable|disable|reload
Sep 13 09:46:26 Tower rc.unRAID[25235][25381]: Running: "/etc/rc.d/rc.rsyslogd stop"
Sep 13 09:46:26 Tower rsyslogd: [origin software="rsyslogd" swVersion="8.4.0" x-pid="1180" x-info="http://www.rsyslog.com"] exiting on signal 15.

 

Sep 15 10:50:52 Tower apcupsd[30011]: Power failure.
Sep 15 10:50:58 Tower apcupsd[30011]: Running on UPS batteries.
Sep 15 10:51:14 Tower fan_speed.sh: Highest disk drive temp is: 40C
Sep 15 10:51:14 Tower fan_speed.sh: Changing disk drive fan speed from: [144 (56% @ 1573 rpm) ] to: [180 (70% @ 1856 rpm) ]
Sep 15 10:51:49 Tower emhttp: shcmd (485): /usr/sbin/hdparm -y /dev/sdd &> /dev/null
Sep 15 10:55:48 Tower sshd[13916]: Received disconnect from 10.2.1.15: 11: disconnected by user
Sep 15 10:55:48 Tower sshd[4966]: Received disconnect from 10.2.1.15: 11: disconnected by user
Sep 15 10:55:48 Tower sshd[24977]: Received disconnect from 10.2.1.15: 11: disconnected by user
Sep 15 10:55:59 Tower apcupsd[30011]: Reached run time limit on batteries.
Sep 15 10:55:59 Tower apcupsd[30011]: Initiating system shutdown!
Sep 15 10:55:59 Tower apcupsd[30011]: User logins prohibited
Sep 15 10:55:59 Tower powerdown[23614]: Powerdown initiated
Sep 15 10:55:59 Tower powerdown[23626]: Powerdown V2.07
Sep 15 10:55:59 Tower rc.unRAID[23632][23633]: Processing /etc/rc.d/rc.unRAID.d/ kill scripts.
Sep 15 10:55:59 Tower rc.unRAID[23632][23637]: Running: "/etc/rc.d/rc.unRAID.d/K00.sh"
Sep 15 10:55:59 Tower rc.unRAID[23632][23640]: Shutting down domain 8
Sep 15 10:55:59 Tower rc.unRAID[23632][23640]: Waiting for 1 domains
Sep 15 10:55:59 Tower rpc.mountd[25157]: authenticated unmount request from 10.2.0.104:982 for /mnt/user/mysql (/mnt/user/mysql)
Sep 15 10:55:59 Tower rpc.mountd[25157]: authenticated unmount request from 10.2.0.104:983 for /mnt/user/Photos (/mnt/user/Photos)
Sep 15 10:56:04 Tower kernel: br0: port 2(vif8.0) entered disabled state
Sep 15 10:56:04 Tower rc.unRAID[23632][23640]: Domain 8 has been shut down, reason code 0
Sep 15 10:56:04 Tower powerdown[23766]: Initiating Shutdown with ''
Sep 15 10:56:04 Tower avahi-daemon[24008]: Withdrawing workstation service for vif8.0.
Sep 15 10:56:04 Tower shutdown[23767]: shutting down for system halt
Sep 15 10:56:04 Tower kernel: br0: port 2(vif8.0) entered disabled state
Sep 15 10:56:04 Tower kernel: device vif8.0 left promiscuous mode
Sep 15 10:56:04 Tower kernel: br0: port 2(vif8.0) entered disabled state
Sep 15 10:56:04 Tower logger: /etc/xen/scripts/vif-bridge: offline type_if=vif XENBUS_PATH=backend/vif/8/0
Sep 15 10:56:04 Tower logger: /etc/xen/scripts/vif-bridge: brctl delif br0 vif8.0 failed
Sep 15 10:56:04 Tower logger: /etc/xen/scripts/vif-bridge: ifconfig vif8.0 down failed
Sep 15 10:56:04 Tower logger: /etc/xen/scripts/vif-bridge: Successful vif-bridge offline for vif8.0, bridge br0.
Sep 15 10:56:05 Tower init: Switching to runlevel: 0
Sep 15 10:56:07 Tower rc.unRAID[23911][23912]: Powerdown V2.07
Sep 15 10:56:07 Tower rc.unRAID[23911][23913]: Stopping Plugins.
Sep 15 10:56:07 Tower rc.unRAID[23911][23921]: Running: "/etc/rc.d/rc.apcupsd.new stop"
Sep 15 10:56:07 Tower apcupsd[30011]: apcupsd exiting, signal 15
Sep 15 10:56:07 Tower apcupsd[30011]: apcupsd shutdown succeeded
Sep 15 10:56:07 Tower rc.unRAID[23911][23924]: Stopping apcupsd power management..  Done.
Sep 15 10:56:07 Tower rc.unRAID[23911][23928]: Running: "/etc/rc.d/rc.dovecot stop"
Sep 15 10:56:07 Tower rc.unRAID[23911][23931]: Stopping dovecot...
Sep 15 10:56:07 Tower rc.unRAID[23911][23933]: Running: "/etc/rc.d/rc.fan_speed stop"
Sep 15 10:56:07 Tower rc.fan_speed: WARNING: fan_speed called to stop with SERVICE not = disabled
Sep 15 10:56:07 Tower rc.unRAID[23911][23944]: Running: "/etc/rc.d/rc.mpop stop"
Sep 15 10:56:07 Tower rc.unRAID[23911][23947]: usage /etc/rc.d/rc.mpop start|stop|enable|disable|reload
Sep 15 10:56:07 Tower rc.unRAID[23911][23948]: Running: "/etc/rc.d/rc.rsyslogd stop"
Sep 15 10:56:07 Tower rsyslogd: [origin software="rsyslogd" swVersion="8.4.0" x-pid="1186" x-info="http://www.rsyslog.com"] exiting on signal 15.

 

I'm a little wary of this since we experience an average of 2 power cuts a day (except Sundays!).  The last parity check was performed manually, after 45 days with no parity check, so the old apcupsd/powerdown has been very reliable.

 

Should I revert to powerdown v2.06, or might this be some quirk in the session during which the upgrade was performed?

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.