Config NUT for CyberPower VAL600 UPS with TrueNAS Core 12.0-U6

     Master NAS,   PC/TrueNAS Core attached with UPS USB Cable

  • Step 1:   Power on the Cyberpower VAL600 & plug the USB cable into TrueNas system

  • Step 2:   Find out UPS port information, say ugen3.0

TrueNAS Web Gui / System/Advance/Show Console Message

  • Step 3:   Config with the UPS

TrueNAS Web Gui / Services/UPS

UPS Mode:  Master

Remote Monitor:    Enable

Monitor User:      upsmon

Monitor Password:   Your Passwrod

Driver:  Cyber Power System ups2 Value 600E USB

Port or Hostname:   /dev/ugen0.3auto

Shutdown Command:  shutdown -h now

  • Step 4:  Check with command upsc ups@localhost

TrueNAS Web Gui / Shell

  • Step 5:   Verify shutdown command is working by turn off the AC power supplier of UPS

     Slave NAS:    PC/TrueNAS Core not  attached with UPS USB Cable

  • Step 6:Config TrueNAS PC as NUT Salve

UPS Mode:     Slave

Remote Host:   IP of Master NAS

Remote Port:    3493

Port or Hostname:  auto

Monitor User:     upsmon

Monitor Password:    Same as Master UPS

Shutdown command:     shutdown -h now

     Slave Linux:    PC/Linux not  attached with UPS USB Cable

  • Step 7: Config Linux PC as NUT slave

Install NUT

Config upsmon as following

POWERDOWNFLAG /etc/nut/killpower
               MONITOR ups@MASTER_UPS_IP 1  upsmon YOUR_PASSWORD  slave
               MINSUPPLIES 1
               SHUTDOWNCMD “/sbin/shutdown -h +0”

               POLLFREQ 5
               POLLFREQALERT 5
               HOSTSYNC 15
               DEADTIME 15
               RBWARNTIME 43200
               NOCOMMWARNTIME 300
               FINALDELAY 5

Launch upsmon service

Note:

TrueNAS Core only support  UPS On Battery Action

Using CyberPower UPS to keep NAS data safety

The CyberPower VALUE600ELCD UPS is supported by NUT, it can be used to switch off the NAS and computer system when main power fail, for the purpose to keep data and disk safety.

 

NUT,  Network UPS Tools

A suite of open source software component designed for UPS

 

Architect of NUT:   

Kernel:                USB HID Class driver

User Space:       Three linux daemon design

Driver Daemon:  usbhid_ups,   usb hid based protocol

upsd Daemon:   API for client, including upsmon

upsmon Daemon:   monit events from UPSD, and action by launch the pre-defined script

 

Install NUT under ubuntu or debian:

sudo apt-get install -y nut

 

NUT Config  for CyberPower VALUE600ELCD

Modify 4 config file in /etc/nut, by adding following lines

nut.conf:

    MODE=standalone

 

ups.conf
   [cyberpower]
     driver = usbhid-ups
     port = auto
     desc = “CP1500 AVR UPS”
     offdelay = 20
     ondelay = 0
     ignorelb
     override.battery.charge.low = 20
     override.battery.charge.warning = 40
     pollinterval = 15

upsd.conf

    [admin]
         password = 123456
         actions = SET
         instcmds = ALL

   [upsmonuser]
        password = 123456
        upsmon master

upsmon.conf

      MONITOR cyberpower@localhost 1 upsmon 123456 master

 

 

  • Start  or Stop   NUT driver :

             sudo upsdrvctl start

             sudo upsdrvctl stop

 

  • Start/Stop NUT server:

            sudo upsd

            sudo upsd -c stop

 

  • Start/Stop monit Daemon

            sudo upsmon

            sudo upsmon -c stop

 

  • Display UPS status:

            sudo upsc cyberpower@localhost