![]() ![]() Upscmd -u $V" # diff /usr/local/emhttp/plugins/nut/ /usr/local/emhttp/plugins/nut/nutFooter.page by replacing existing code with the following (substituting the password you set for admin earlier for ) # START: User-specific settings # Customize the executable called by upssched # Battery replacement indicated by cron'd quick test # Shutdown after 20 minutes on battery (20 * 60 = 1200)ĪT ONBATT * START-TIMER onbatt_shutdown 1200 # (Optional) Silence the beeper after 2 minutes # Send alerts immediately on change in line power # Add monitor replacing pwd with the password you specified for above # To be safe give clients an additional 90 seconds to fully shutdown # Alerting twice/day about a battery change is excessive, make it once # Works with pollinterval setting to prevent USB disconnection # Increase slave shutdown wait period to 10 minutes (worst case) # Add users for admin, monitoring, local and remote users replacing pwd with your preferred password # Add network request listener replacing with your Pi's IP address ignorelb allows custom overrides for battery.charge.ondelay should be 30 (10s greater than off delay) but a cyberpower bug requires 0 to avoid unexpected power cuts (similar to apcupsd behavior)Ī shorter pollinterval is required to prevent the Pi (and maybe other debian systems) from losing contact.Offdelay says turn UPS off X seconds after master server shuts off, required for automatic restart Low battery will still trigger shutdown but the goal's to avoid a low battery condition. Instead we'll set NUT to shutdown clients after 20 minutes on battery (approximately 20% of my runtime capacity) so in theory it can handle a couple of these power's restored/power's lost cycles. ![]() The timer method is more robust because if, after a power outage and shutdown, power's restored and the system boots but it's lost again, unraid may pick up the battery-level shutdown signal before the startup process completes which seems risky. We can trigger shutdown one of two ways - after a set amount of time on battery or at a set battery level. I settled on NUT running as master on the Pi (Debian-based) connected to the UPS via USB, with Unraid and all other clients as slaves. (NOTE: If your CyberPower UPS is connected directly to your unRAID server, enabling Turn off UPS after shutdown in settings not only won't work but may cause the UPS to cut power without warning, forcing a parity check.) Install was fairly straightforward and worked well except for automatic restart after shutdown - when power's restored connected servers must be booted manually. Initially I installed apcupsd on the Pi, connected it to the UPS (via USB) and setup Unraid as slave. I have a Cyberpower UPS (CP685AVR) powering a Raspberry Pi and my Unraid Server. I should start with the disclaimer that I have no particular expertise with NUT so this guide is not definitive. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |