-
1Connect the UPS's via USB to the OrangePi
-
2Verify the UPS Connection
```bash
lsusb
```You should see an output similar to:
```
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 019: ID 09ae:2012 Tripp Lite
``` -
3Install NUT
```bash
sudo apt update
sudo apt install nut nut-client nut-server
``` -
4Confirm UPS detection
```bash
sudo nut-scanner -U
```You should see an output similar to:
```
[nutdev1]
driver = "usbhid-ups"
port = "auto"
vendorid = "09AE"
productid = "2012"
product = "Tripp Lite UPS"
vendor = "Tripp Lite"
bus = "001"
``` -
5Configure UPS Devices
Make sure to replace the names with those of your UPS devices - the generic ushid driver is fine most of the time, but it might depend on your UPS.
```bash
sudo nano /etc/nut/ups.conf
```Add the following configurations:
```ini
maxretry = 3
pollinterval = 1
[APC1400VA]
driver = usbhid-ups
port = auto
vendorid = "051D"
productid = "0002"
desc = "APC 1400 VA USB UPS"[Trust1500VA]
driver = nutdrv_qx
port = auto
vendorid = "0665"
productid = "5161"
desc = "Trust UPS 1500VA"[EATON1150VA]
driver = usbhid-ups
port = auto
vendorid = "0463"
productid = "FFFF"
desc = "EATON UPS 1150 VA"
``` -
6Configure UPS Monitoring
```bash
sudo nano /etc/nut/upsmon.conf
```Add the following lines:
```ini
MONITOR trust@localhost 1 admin secret master
MONITOR apc@localhost 1 admin secret master
MONITOR eatonk@localhost 1 admin secret master
``` -
7Configure NUT Server to listen for requests (from a monitoring service of dashboard)
```bash
sudo nano /etc/nut/upsd.conf
```Change:
```ini
LISTEN 127.0.0.1 3493
```To:
```ini
LISTEN 0.0.0.0 3493
``` -
8Open the main NUT configuration file
```bash
sudo nano /etc/nut/nut.conf
```Set:
```ini
MODE=netserver
``` -
9Open the user configuration file
```bash
sudo nano /etc/nut/upsd.users
```Add the following:
```ini
[monuser]
password = yourpwd
admin master
``` -
10Set Up Udev Rules
```bash
sudo nano /etc/udev/rules.d/99-nut-ups.rules
```Add the following rules:
```ini
SUBSYSTEM!="usb", GOTO="nut-usbups_rules_end"# TrippLite
ACTION=="add|change", SUBSYSTEM=="usb|usb_device", SUBSYSTEMS=="usb|usb_device", ATTR{idVendor}=="09ae", ATTR{idProduct}=="2012", MODE="664", GROUP="nut", RUN+="/sbin/upsdrvctl stop; /sbin/upsdrvctl start"LABEL="nut-usbups_rules_end"
```
Nicola
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.