• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

ebaauw/homebridge-lib: Utility Library for Homebridge Plugins

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

ebaauw/homebridge-lib

开源软件地址:

https://github.com/ebaauw/homebridge-lib

开源编程语言:

JavaScript 100.0%

开源软件介绍:

Homebridge Lib

Downloads Version JavaScript Style Guide GitHub issues GitHub pull requests

Library for Homebridge Plugins

Copyright © 2018-2022 Erik Baauw. All rights reserved.

While developing a number of Homebridge plugins, I find myself duplicating a lot of code. The idea behind this library is to ease developing and maintaining Homebridge plugins by separating this generic code, dealing with HomeKit and Homebridge, from the specific code, dealing with the actual devices being exposed to HomeKit.

Documentation

The documentation, how to develop a plugin using Homebridge Lib, is provided in the code and through tutorials in the doc directory. To generate the documentation, install jsdoc and run jsdoc -c jsdoc.json. To view the documentation, open index.html in the out directory.

See Homebridge WS for an example plugin based on Homebridge Lib.

Command-Line Tools

The Homebridge Lib library comes with a number of command-line tools for troubleshooting Homebridge installations.

Tool Description
hap Logger for HomeKit accessory announcements.
json JSON formatter.
sysinfo Print hardware and operating system information.
upnp UPnP tool.

Each command-line tool takes a -h or --help argument to provide a brief overview of its functionality and command-line arguments.

Installation

This library is not a Homebridge plugin and does not need to be installed manually. Instead, Homebridge plugins using this library should list it as a dependency in their package.json. This way, npm installs Homebridge Lib automatically when installing the actual plugin.

To install the command-line tools, use:

$ sudo npm -g i homebridge-lib

This creates symlinks to these tools in /usr/bin or /usr/local/bin (depending on how you installed NodeJS). Note that, when Homebridge Lib is installed like this, Homebridge might issue a warning at startup:

Plugin /usr/lib/node_modules/homebridge-lib package.json does not contain the keyword 'homebridge-plugin'

This warning can be ignored safely.

Credits

The logic for handling Eve history was copied from Simone Tisa's fakegato-history repository, copyright © 2017 simont77.

Caveats

Homebridge Lib is a hobby project of mine, provided as-is, with no warranty whatsoever. I've been running it successfully at my home for years, but your mileage might vary.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
mroth/bootslap: bootstraps macOS to be usable发布时间:2022-06-14
下一篇:
justme-1968/homebridge-fhem: a fhem platform plugin for homebridge发布时间:2022-06-14
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap