This article describes the process of setting up Postfix + Gmailįollow the guide to install and configure Postfix with Gmail. Unplug USB from Pi and watch to make sure log shows offline, replug it in and see it come back up, /e/nut# upslog -s -l - Network UPS Tools upslog 2.7.2 logging status of to - (30s intervals) Init SSL without certificate database 20190726 161546 100 118.0 8 NA NA 20190726 161616 100 118.0 8 NA NA 20190726 161646 NA NA NA NA NA 20190726 161716 100 118.0 8 NA NA 20190726 161746 100 118.0 8 NA NA 20190726 161816 100 119.0 8 NA NA Configure Email alertsįor email alerts, I’m using Postfix, install it on the Pi if you dont have it, Set permissions & restart all services sudo chown root:nut /etc/nut/* sudo chmod 640 /etc/nut/* systemctl nut-server restart systemctl nut-client restart Locate the Nut Monitor (lol) binary and get the path which upsmonĬreate the systemd script vi/etc/systemd/system/rvice Description=Network UPS Tools - power device monitor and shutdown controller After=rvice ExecStart=/sbin/upsmon PIDFile=/run/nut/upsmon.pid Type=forking WantedBy=multi-user.targetĮnable the monitor on reboot systemctl enable nut-monitor Vi /etc/nuts/nf add these lines MONITOR “CyberPower OR2200LCDRTXL2U-TOP” MONITOR “CyberPower OR2200LCDRTXL2U-BOTTOM” Vi /etc/nut/nf MONITOR 1 upsmaster myPass123 master MONITOR upsremote myPass123 slave You can also check your 2nd UPS device the same way, ~# upsc NUT-Server and NUT-monitor Test to see if you can see your UPS devices, ~# upsc command will return bunch of UPS information, Init SSL without certificate database battery.charge: 100 : 10 : 20 : CPS ntime: 4710 : 300 battery.type: PbAcid battery.voltage: 27.5 : 24 device.mfr: CPS device.model: OR2200LCDRTXL2U device.type: ups driver.name: usbhid-ups : 30 : 2 : auto driver.version: 2.7.2 : CyberPower HID 0.3 : 0.38 : 140 : 90 input.voltage: 118.0 : 120 output.voltage: 118.0 : enabled : 20 : 30 ups.load: 8 ups.mfr: CPS ups.model: OR2200LCDRTXL2U ups.productid: 0601 : 1650 ups.status: OL : -60 : -60 ups.vendorid: 0764
Restart Driver upsdrvctl stop upsdrvctl start Start the NUT Client service systemctl restart rvice If your UPS model is different, see the driver list and choose appropriate driver driver = usbhid-ups port = auto desc = "CyberPower OR2200LCDRTXL2U-TOP" driver = usbhid-ups port = auto desc = "CyberPower OR2200LCDRTXL2U-BOTTOM" Vi /etc/nut/ups.conf add the entires for your devices, here I am giving the description of each UPS and its position in my cabinet. PR1500LCDRT2U UPSĬonfigure the /var/run/nut directory mkdir /var/run/nut chown nut:nut /var/run/nut PR1500LCDRT2U UPS Bus 001 Device 049: ID 0764:0601 Cyber Power System, Inc.
Once installed, reboot the Pi, once rebooted, check if you can see your UPS devices, lsusb Bus 001 Device 050: ID 0764:0601 Cyber Power System, Inc.
Here we are installing NUT packages (Network UPS Tools) apt-get update & apt-get install nut nut-client nut-server
SSH to your Pi as root and install the necessary packages that will connect to your UPS devices,