当前位置: 首页 > 软件库 > 其他开源 > 物联网 >

homebridge-nut

授权协议 Readme
开发语言 JavaScript
所属分类 其他开源、 物联网
软件类型 开源软件
地区 不详
投 递 者 巫英纵
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

homebridge-nut

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

This plugin allows you to monitor multiple UPS devices with HomeKit via a NUT Client.

NOTE: This is re-write of https://github.com/ToddGreenfield/homebridge-nut to avoid usage of system-sleep anddeasync module dependencies which end up relying on native code. I was having problems with these blocking theNode event loop (possibly due to running on FreeBSD). I also wanted to avoid the need of having to do native code rebuilds...

Installation

  1. Install Homebridge using: npm install -g homebridge
  2. Install this plugin using: npm install -g @vectronic/homebridge-nut
  3. Update your configuration file. See a sample config.json snippet below.
  4. Ensure you have a NUT Client running somewhere.

This plugin will create an accessory for each UPS returned from the NUT Client.

The accessory will have a ContactSensor service and a BatteryService.

The ContactSensor will have the following characteristics:

  • ContactSensorState will be open if UPS Status starts with OB (On Battery).
  • StatusActive will be true if UPS Load is greater than 0.
  • StatusFault will be true if NUT is not reachable.

The BatteryService will have the following characteristics:

  • BatteryLevel will show the battery charge percentage.
  • ChargingState will show Charging, Not Charging (online and 100% battery charge), or Not Chargeable (on battery).
  • StatusLowBattery will be true if BatteryLevel is below low_batt_threshold.

Configuration

Example config.json entry:

"platforms": [
  {
    "platform": "Nut",
    "name": "Nut",
    "host": "localhost",
    "port": 3493,
    "username": "foo",
    "password": "bar",
    "low_batt_threshold": 40,
    "poll_interval": 60,
    "connect_interval": 5,
    "command_interval": 1
  }
]

Where the following properties are all optional:

  • name is the name used for Homebridge logging. Default is Nut.
  • host is the IP or hostname for the Nut Client. Default is localhost.
  • port is the port for the Nut Client. Default is 3493.
  • username is the username to use for Nut Client authentication.
  • password is the password to use for Nut Client authentication.
  • low_batt_threshold is the battery level percentage at which to set the Low Battery Status to true. Default is 40.
  • poll_interval is the UPS polling interval in seconds. Default is 60.
  • connect_interval is the NUT client connection attempt interval in seconds. Default is 5.
  • command_interval is the NUT client delay interval between success requests in seconds. Default is 1.

Help etc.

If you have a query or problem, raise an issue in GitHub, or better yet submit a PR!

 相关资料
  • Homebridge 是一个轻量级 NodeJS 服务器,它模拟 iOS HomeKit API,提供从 HomeKit 到“智能家居”设备制造商提供的各种第三方 API 的基本桥接。通过 Homebridge 的桥接,可以让 Siri 控制完全不支持 HomeKit 的设备。 此外 Homebridge 支持插件。

  • homebridge-vsx homebridge-vsx is a plugin made for homebridge,which allows switching on and off your Pioneer AV receiver. All AV receivers (VSX and SC),which work with the iControl AV5 App are support

  • homebridge-sesame Control and monitor your Sesame smart lock with HomeKit integration. Prerequisites Installation of Homebridge iOS 11 or later Sesame lock with enabled cloud integration Sesame Wifi A

  • homebridge-panasonictv A homebridge plugin for turning on and off your Panasonic Viera TV. The plugin also has experimental support for changing the volume and channel. These characteristics are not r

  • Quick Start | Contribute A Wake on Lan plugin for Homebridge Turn your PCs, laptops, servers and more on and off through Siri Quick Start To install the plugin, head over to the machine with Homebridg

  • Docker Homebridge This Alpine/Ubuntu Linux based Docker image allows you to run Nfarina's Homebridge on your home network which emulates the iOS HomeKit API. This is a multi-arch image and will also r