树莓派监控SANTAK UPS
硬件:SANTAK TG-BOX 600 + RPi 4B (2GB) + Huawei ME909s-821
监控服务:NUT(Network UPS Tools)参考文章挺多,就不详解了;Pi上连了4G模块主要是掉电时可能无法得到Wired Ethernet供应,就发个短信而已,不如直接走wwan靠谱省心。
目前用的是standalone模式,回头有空查下文档试试netserver模式,看config文件介绍,猜测是client可以通过server知道市电挂了,从而在server之前关机?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
➜ ~ sudo cat /etc/nut/nut.conf # Network UPS Tools: example nut.conf # ############################################################################## # General section ############################################################################## # The MODE determines which part of the NUT is to be started, and which # configuration files must be modified. # # This file try to standardize the various files being found in the field, like # /etc/default/nut on Debian based systems, /etc/sysconfig/ups on RedHat based # systems, ... Distribution's init script should source this file to see which # component(s) has to be started. # # The values of MODE can be: # - none: NUT is not configured, or use the Integrated Power Management, or use # some external system to startup NUT components. So nothing is to be started. # - standalone: 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. # - netserver: same as for the standalone configuration, but also need # some more network access controls (firewall, tcp-wrappers) and possibly a # specific LISTEN directive in upsd.conf. # Since this MODE is opened to the network, a special care should be applied # to security concerns. # - netclient: this mode only requires upsmon. # # IMPORTANT NOTE: # This file is intended to be sourced by shell scripts. # You MUST NOT use spaces around the equal sign! MODE=standalone ➜ ~ |
打完收工!
文章的脚注信息由WordPress的wp-posturl插件自动生成