technical:24.04_ups_setup_with_nut
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| technical:24.04_ups_setup_with_nut [2026/01/05 23:47] – mark_scottworld.net | technical:24.04_ups_setup_with_nut [2026/01/14 17:27] (current) – mark_scottworld.net | ||
|---|---|---|---|
| Line 38: | Line 38: | ||
| Add the following at the bottom of the file. | Add the following at the bottom of the file. | ||
| - | | + | [apc] |
| - | driver = usbhid-ups | + | |
| - | port = auto | + | port = auto |
| - | desc = " | + | #cable = 940-0095B |
| - | override.battery.charge.low = 50 | + | desc = " |
| + | #override.battery.charge.low = 50 | ||
| + | # | ||
| + | | ||
| + | | ||
| + | | ||
| Edit / | Edit / | ||
| Line 64: | Line 69: | ||
| upsmon master | upsmon master | ||
| | | ||
| + | Edit / | ||
| + | |||
| + | nano / | ||
| + | |||
| + | Uncomment and set the following lines... | ||
| + | |||
| + | |||
| + | MONITOR apc@localhost 1 upsuser < | ||
| + | NOTIFYCMD / | ||
| + | SHUTDOWNCMD "/ | ||
| + | DEADTIME 20 | ||
| + | NOTIFYFLAG ONLINE | ||
| + | NOTIFYFLAG ONBATT | ||
| + | NOTIFYFLAG LOWBATT | ||
| + | NOTIFYFLAG FSD SYSLOG+WALL+EXEC | ||
| + | NOTIFYFLAG COMMOK | ||
| + | NOTIFYFLAG COMMBAD | ||
| + | NOTIFYFLAG SHUTDOWN | ||
| + | NOTIFYFLAG REPLBATT | ||
| + | NOTIFYFLAG NOCOMM | ||
| + | NOTIFYFLAG NOPARENT | ||
| + | |||
| + | Now create a script to send email notifications / | ||
| + | |||
| + | nano / | ||
| + | | ||
| + | In / | ||
| + | |||
| + | < | ||
| + | # | ||
| + | SUBJECT=" | ||
| + | FROM_ADDR=" | ||
| + | FROM_NAME=" | ||
| + | TO="< | ||
| + | echo " | ||
| + | </ | ||
| + | |||
| + | Set the necessary permissions: | ||
| + | |||
| + | < | ||
| + | chown root:nut ups.conf upsd.conf upsd.users upsmon.conf notify-email | ||
| + | chmod 0640 ups.conf upsd.conf upsd.users upsmon.conf | ||
| + | chmod 0750 notify-email | ||
| + | </ | ||
| + | |||
| + | Change the following in / | ||
| + | |||
| + | MODE=standalone | ||
| + | |||
| + | Restart the UPS monitoring service: | ||
| + | |||
| + | < | ||
| + | systemctl restart nut-server.service | ||
| + | systemctl restart nut-monitor.service | ||
| + | </ | ||
| + | |||
| + | Check / | ||
| + | |||
| + | upsc apc@localhost | ||
| + | | ||
| + | (You may need to reboot before the USB is allowed to talk to the UPS). | ||
technical/24.04_ups_setup_with_nut.1767653276.txt.gz · Last modified: by mark_scottworld.net
