Giter Site home page Giter Site logo

apcupsd-smartos-2's Introduction

apcupsd-smartos

This script will setup apcupsd in the global zone as a network slave. In my case, I have apcupsd installed on a raspberry pi which is connected to the UPS via USB and talks to the slaves.

Tested on SmartOS 20160721T174418Z

At the time of this write up, 3.14.14 is the latest version of apcupsd.

http://www.apcupsd.org/

##Installation Unzip and copy to global zone

cd apcupsd-smartos
sh apcupsd-install.sh

Edit apcupsd.conf and change DEVICE to apcupsd master (e.g., DEVICE 192.168.1.114:3551)

vi /opt/local/etc/apcupsd/apcupsd.conf

I would also suggest editing the doshutdown command in apccontrol from init 0 to init 5.

vi /opt/local/etc/apcupsd/apccontrol

${SHUTDOWN} -y -g0 -i5

Reboot SmartOS to load and start the service

init 6

Run apcaccess command to test for proper connectivity.

[root@smartos ~]# apcaccess
APC      : 001,027,0696
DATE     : 2016-08-13 18:15:17 +0000
HOSTNAME : smartos
VERSION  : 3.14.14 (31 May 2016) sun
UPSNAME  : raspberrypi
CABLE    : Ethernet Link
DRIVER   : NETWORK UPS Driver
UPSMODE  : Stand Alone
STARTTIME: 2016-08-13 18:15:17 +0000
MASTERUPD: 2016-08-13 18:15:17 +0000
MASTER   : 192.168.1.114:3551
MODEL    : Smart-UPS 750
STATUS   : ONLINE SLAVE
BCHARGE  : 100.0 Percent
TIMELEFT : 72.0 Minutes
MBATTCHG : 80 Percent
MINTIMEL : 60 Minutes
MAXTIME  : 0 Seconds
BATTV    : 27.0 Volts
NUMXFERS : 0
TONBATT  : 0 Seconds
CUMONBATT: 0 Seconds
XOFFBATT : N/A
STATFLAG : 0x07000408
SERIALNO : XXXXXXXXXXXX
NOMBATTV : 24.0 Volts
FIRMWARE : UPS 09.3 / ID=18
END APC  : 2016-08-13 18:15:18 +0000

apcupsd-smartos-2's People

Contributors

amalleo25 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.