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

arouanet/homebridge-sht3x: Homebridge plugin for the Sensirion SHT3x humidity an ...

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

开源软件名称:

arouanet/homebridge-sht3x

开源软件地址:

https://github.com/arouanet/homebridge-sht3x

开源编程语言:

JavaScript 100.0%

开源软件介绍:

homebridge-sht3x

NPM Version verified-by-homebridge Build Status JavaScript Style Guide

Homebridge plugin for the Sensirion SHT3x humidity and temperature sensor. Uses raspi-node-sht31 to communicate with the device and fakegato-history to show historical data graphs when using the Eve app.

SHT31 sensor

Breakout boards for the SHT31 sensor are available from Adafruit or AliExpress.

This plugin has only been tested on a Raspberry Pi, but should work with any Linux-based board supported by i2c-bus, including C.H.I.P., BeagleBone, or Intel Edison.

Refer to your board documentation for instructions on how to enable the I²C interface and how to connect an I²C device. The i2c-bus documentation also includes a few examples.

Installation

Node.js v10.17.0 or greater is required.

This assumes Homebridge has already been installed. If not, see the Homebridge documentation for more information.

If using Homebridge Config UI X, search for the plugin in the Plugin screen, and install it from there. Otherwise you can install it manually with:

sudo npm install -g homebridge-sht3x

Configuration

If using Homebridge Config UI X, you can configure the plugin from the graphical settings editor, or you can edit the config.json file manually.

The minimal accessory configuration, containing only the required attributes, is as follows:

"accessories": [
  {
   "accessory": "SHT3x",
   "name": "SHT31"
  }
]

See config-sample.json for a complete example.

The following table shows the list of supported configuration parameters:

Attribute Description
accessory Accessory name registered with Homebridge. Has to be "SHT3x".
name Display name for the sensor. Can be anything you want.
address I²C address of the sensor. Possible values are "0x44" (default) or "0x45".
bus I²C bus number. Defaults to 1. See the I²C setup section below.
interval Time interval at which the device is polled, in seconds (default: 60).
history Options passed to fakegato-history as an object. Empty by default.

I²C setup

The default I²C bus number (1) is used by most Raspberry Pi models, except for the early Raspberry Pi Model B (256MB) which uses bus number 0. On other boards, available buses typically are 1 or 2 on a C.H.I.P., 0, 1, or 2 on a BeagleBone, and 1 or 6 on an Intel Edison. Consult your board documentation for details, and run i2cdetect -l to list the available I²C buses.

The I²C address for the SHT3x sensor is 0x44 by default, or 0x45 if the ADDR pin is connected to logic high.

History persistence

By default Fakegato saves history to memory, and data not yet downloaded by the Eve app will be lost when Homebridge is restarted. If you want to save history to disk instead, add the following line to the accessory configuration:

"history": {"storage": "fs"}

Data will be saved in a JSON file located in the Homebridge directory (~/.homebridge by default unless redefined with the -U option) and read upon restart. In order to store the file elsewhere, use the path option:

"history": {
  "storage": "fs",
  "path": "/tmp"
}

See the Fakegato documentation for more information on available options.

Also note that Fakegato will automatically average out measurements and log an entry to history every 10 minutes. If you want the history feature to work reliably and avoid holes in the data, interval should be no more than 600.

Screenshots

Home app Eve app




鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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