Giter Club home page Giter Club logo

homebridge-nut's Introduction

Homebridge-nut

NPM Version

NUT (Network UPS Tools) Plugin for Homebridge leveraging node-nut.

This plugin allows you to monitor your UPS's with HomeKit and Siri via a NUT Client.

Installation

  1. Install homebridge using: npm install -g homebridge
  2. Install this plugin using: npm install -g homebridge-nut
  3. Update your configuration file like the example below.
  4. Ensure you have a NUT Client running somewhere. For assistance - http://wynandbooysen.com/raspberry-pi-ups-server-using-nut.html.

This plugin will create a ContactSensor element with BatteryService for each USB returned from your NUT Client.

  • ContactSensorState will show OPEN if UPS Status starts with OB (On Battery).
  • StatusActive will be true if UPS Load is > 0.
  • StatusFault will be true is NUT is not reachable.
  • BatteryLevel will show the BatteryCharge percent.
  • ChargingState will show Charging, Not Charging (Online and 100%), or Not Chargable (On Battery).
  • StatusLowBattery will be true if low_batt_threshold is breached. This can potentially notify you prior to your Nut shutting down its server(s).
  • Input/Output/Battery Voltage & BatteryLoad will be shown if available, otherwise may show 0 or default values.

Configuration

Example config.json:

"platforms": [
     {
         "platform": "Nut",
         "name": "Nut",
         "host": "localhost",
         "port": "3493",
         "search_time_delay": "1",
         "acc_delay": "100",
         "low_batt_threshold": "40",
         "polling": "120"
     }
]

Explanation:

Field Description
platform Required - Must always be "Nut".
name Required - Name for platform logging.
host Optional - Internal ip or hostname of Nut Client. Default is localhost.
port Optional - Port which Nut Client is listening. Default is 3493.
search_time_delay Optional - Delay on startup to list Nut devices. Defaults to 1 second.
acc_delay Optional - Delay to prevent communication collisions for multiple UPS accessories. Defaults to 100 milliseconds.
low_batt_warning Optional - Percent at which UPS will raise low battery. Default is 40.
polling Optional - Poll interval. Default is 0 sec, which is OFF or no polling.

homebridge-nut's People

Contributors

toddgreenfield avatar jsmeyers avatar caribsky 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.