Skip to content

Instantly share code, notes, and snippets.

@dieechtenilente
Last active December 26, 2022 15:28
Show Gist options
  • Save dieechtenilente/b8823ce10479d63b6ecab1ef2c7ebc8f to your computer and use it in GitHub Desktop.
Save dieechtenilente/b8823ce10479d63b6ecab1ef2c7ebc8f to your computer and use it in GitHub Desktop.
Eaton 3S 700 on Linux (Debian/Proxmox)

Monitoring Eaton 3S 700 UPS on Linux

Sources

=== Still not working properly. UPS is sometimes not available for 20 minutes?

How to manage an EATON UPS via USB on Linux

Check, if UPS is registered correctly via USB

# lsusb
...
Bus 001 Device 004: ID 0463:ffff MGE UPS Systems UPS
...

Install nut

apt install nut

Configure nut

Define Eaton USV with a poll frequency of 15. Change the vendorid based on lsusb.

vim /etc/nut/ups.conf
...
[Eaton]
    driver = usbhid-ups
    port = auto
    vendorid = 0463
    pollfreq = 15

Standalone mode: This mode address a local only configuration, with 1 UPS protecting the local system. This implies to start the 3 NUT layers (driver, upsd and upsmon) and the matching configuration files. This mode can also address UPS redundancy.

vim /etc/nut/nut.conf
...
MODE=standalone

Disconnect and reconnect UPS

systemctl restart udev
chown nut /etc/nut/*
upsdrvctl start

Check, if nut detects the Eaton UPS

#  upsc -l
Init SSL without certificate database
Eaton

Tests

On AC

upsc Eaton
Init SSL without certificate database
battery.charge: 100
battery.charge.low: 20
battery.runtime: 4800
battery.type: PbAc
device.mfr: EATON
device.model: Eaton 3S 700
device.serial: Blank
device.type: ups
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.parameter.synchronous: no
driver.parameter.vendorid: 0463
driver.version: 2.7.4
driver.version.data: MGE HID 1.40
driver.version.internal: 0.41
input.transfer.high: 264
input.transfer.low: 184
outlet.1.desc: PowerShare Outlet 1
outlet.1.id: 1
outlet.1.status: on
outlet.1.switchable: no
outlet.desc: Main Outlet
outlet.id: 0
outlet.switchable: yes
output.frequency.nominal: 50
output.voltage: 230.0
output.voltage.nominal: 230
ups.beeper.status: enabled
ups.delay.shutdown: 20
ups.delay.start: 30
ups.firmware: 02.08.0010
ups.load: 0
ups.mfr: EATON
ups.model: Eaton 3S 700
ups.power.nominal: 700
ups.productid: ffff
ups.serial: Blank
ups.status: OL
ups.timer.shutdown: 0
ups.timer.start: 0
ups.type: offline / line interactive
ups.vendorid: 0463

On Battery

upsc Eaton
Init SSL without certificate database
battery.charge: 100
battery.charge.low: 20
battery.runtime: 4800
battery.type: PbAc
device.mfr: EATON
device.model: Eaton 3S 700
device.serial: Blank
device.type: ups
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.parameter.synchronous: no
driver.parameter.vendorid: 0463
driver.version: 2.7.4
driver.version.data: MGE HID 1.40
driver.version.internal: 0.41
input.transfer.high: 264
input.transfer.low: 184
outlet.1.desc: PowerShare Outlet 1
outlet.1.id: 1
outlet.1.status: on
outlet.1.switchable: no
outlet.desc: Main Outlet
outlet.id: 0
outlet.switchable: yes
output.frequency.nominal: 50
output.voltage: 230.0
output.voltage.nominal: 230
ups.beeper.status: enabled
ups.delay.shutdown: 20
ups.delay.start: 30
ups.firmware: 02.08.0010
ups.load: 0
ups.mfr: EATON
ups.model: Eaton 3S 700
ups.power.nominal: 700
ups.productid: ffff
ups.serial: Blank
ups.status: OB
ups.timer.shutdown: 0
ups.timer.start: 0
ups.type: offline / line interactive
ups.vendorid: 0463

Add user for automatic shutdown

vim /etc/nut/upsd.users
...
[upsmon]
    password = <Password>
    actions = SET
    instcmds = ALL
...
MONITOR Eaton@localhost 1 upsmon <Password> slave
...
systemctl restart nut-server.service
systemctl restart nut-monitor.service

Set minimum charge level before the server shuts down

upsrw -s battery.charge.low=35 -u upsmon -p <Password> eaton

Get the remaining time on battery with the current load and state of charge

upsc eaton battery.runtime

e.g. command for monitoring

/usr/bin/upsc eaton battery.runtime 2>&1 | /usr/bin/sed 's/Init SSL without certificate database//g' | xargs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment