Small blackout will not disrupt the normal working and in case of long blackout will be possible to safely shut down the system.
Plus will be possible to create events to inform about an outtage, like sending an email.
Here some notes to connect my HomeSeer HS4 running on a Raspberry Pi to a CyberPower SL700U UPS.
Physical connection
First of all of course, install the UPS and connect the power of the HomeSeer to it, then connect the USB cable from the UPS to a free USB port of the Raspberry.
HomeSeer HS4 does not have a native UPS manager, the Pi acts as a bridge.
Then few things to do :
- login to the server console
- install 'nut' : sudo apt install nut
After restart the system, issuing a lsusb should show the UPS.
In my case :
In my case :
homeseer@HTPiHubG3v2:~$ lsusb
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 109: ID 0764:0501 Cyber Power System, Inc. CP1500 AVR UPS
Bus 001 Device 002: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
homeseer@HTPiHubG3v2:~$
Nut configuration
Is time to configure nut.
To do so, two files need to be edited :
- ups.conf
- nut.conf
From the server console edit the file ups.conf : sudo nano /etc/nut/ups.conf
Add this paragraph to the file (I'm using the data read from lsusb) :
[cyberpower]
driver = usbhid-ups
port = auto
desc = "CyberPower CP1500 AVR UPS"
vendorid = 0764
productid = 0501
pollinterval = 2
Save the file, then edit the nut.conf : sudo nano /etc/nut/nut.conf
Add, or modify if exist, the line :
MODE=standalone
Save the file.
Time to restart the server nut :
sudo systemctl restart nut-server
If everything was set correctly, is now possible to read the UPS info : sudo upsc cyberpower@localhost
homeseer@HTPiHubG3v2:~$ sudo upsc cyberpower@localhost
Init SSL without certificate database
battery.charge: 100
battery.charge.low: 10
battery.charge.warning: 20
battery.mfr.date: CPS
battery.runtime: 8202
battery.runtime.low: 300
battery.type: PbAcid
battery.voltage: 13.7
battery.voltage.nominal: 12
device.mfr: CPS
device.model: ST Series
device.type: ups
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.parameter.productid: 0501
driver.parameter.synchronous: no
driver.parameter.vendorid: 0764
driver.version: 2.7.4
driver.version.data: CyberPower HID 0.4
driver.version.internal: 0.41
input.transfer.high: 140
input.transfer.low: 96
input.voltage: 121.0
input.voltage.nominal: 0
output.voltage: 121.0
ups.beeper.status: enabled
ups.delay.shutdown: 20
ups.delay.start: 30
ups.load: 0
ups.mfr: CPS
ups.model: ST Series
ups.productid: 0501
ups.realpower.nominal: 375
ups.status: OL
ups.timer.shutdown: -60
ups.timer.start: -60
ups.vendorid: 0764
homeseer@HTPiHubG3v2:~$
Connect the Nut server to HomeSeer
TBD - for now using APCUPSD
No comments:
Post a Comment