Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Master Setup

Connect UPS using USP cable


Installation

Code Block
$ sudo apt-get install nut

...

Code Block
$ upsc homeups@localhost



Client Setup

Installation

Install nut-client

Code Block
$ sudo apt-get install nut-client


Configure

Update nut-config

Code Block
$ vi /etc/nut/nut.conf

...

  • upsname = qnapups
  • user = admin
  • password = 123456


Restart Nut Client

Restart nut client:

Code Block
$ systemctl restart nut-client


Get Status of Nut Client

Get Status:

Code Block
$ systemctl status nut-client

...

Code Block
● nut-monitor.service - Network UPS Tools - power device monitor and shutdown controller
     Loaded: loaded (/lib/systemd/system/nut-monitor.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2021-08-24 12:39:49 EDT; 2s ago
    Process: 162230 ExecStart=/sbin/upsmon (code=exited, status=0/SUCCESS)
   Main PID: 162234 (upsmon)
      Tasks: 2 (limit: 19043)
     Memory: 1.1M
     CGroup: /system.slice/nut-monitor.service
             ├─162231 /lib/nut/upsmon
             └─162234 /lib/nut/upsmon

Aug 24 12:39:49 deepthought systemd[1]: Starting Network UPS Tools - power device monitor and shutdown controller...
Aug 24 12:39:49 deepthought upsmon[162230]: fopen /run/nut/upsmon.pid: No such file or directory
Aug 24 12:39:49 deepthought upsmon[162230]: UPS: qnapups@192.168.1.60 (slave) (power value 1)
Aug 24 12:39:49 deepthought upsmon[162230]: Using power down flag file /etc/killpower
Aug 24 12:39:49 deepthought systemd[1]: nut-monitor.service: Can't open PID file /run/nut/upsmon.pid (yet?) after start: Operation not permi>
Aug 24 12:39:49 deepthought upsmon[162231]: Startup successful
Aug 24 12:39:49 deepthought systemd[1]: nut-monitor.service: Supervising process 162234 which is not our child. We'll most likely not notice>
Aug 24 12:39:49 deepthought systemd[1]: Started Network UPS Tools - power device monitor and shutdown controller.


Check connection 

Check Connection:

Code Block
$ upsc qnapups@192.168.1.60

...