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

SANdood/homebridge-purpleair

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

开源软件名称:

SANdood/homebridge-purpleair

开源软件地址:

https://github.com/SANdood/homebridge-purpleair

开源编程语言:

JavaScript 100.0%

开源软件介绍:

Homebridge-purpleair

NPM Version

Homebridge plugin that is showing information about air quality from PurpleAir API.

Project is based on homebridge-weather and homebridge-arinow.

Installation

  1. Install Homebridge using: (sudo) npm install -g --unsafe-perm homebridge.
  2. Install this plugin:
    1. find the directory that homebridge was installed in (e.g. /usr/local/lib/node-modules)
    2. create homebridge-purpleair in that directory
    3. copy index.js and package.js into this directory
    4. make sure the file/directory ownership and RWX permissions are the same as other modules in that directory
  3. Update your homebridge configuration file like the example below.

This plugin is returning only: AQI (Air Quality Index) and PM2.5

Configuration

Example config.json

"accessories": [
    {
          "accessory": "PurpleAir",
          "purpleID": "PURPLE_AIR_STATION_ID",
          "updateFreq": MIN_SECS_BETWEEN_API_READ,
          "name": "PurpleAir Air Quality"
    }
]

Config file

Fields:

  • accessory must be "PurpleAir" (required).
  • purpleID PurpleAir Station ID (a number).
  • updateFreq minimum number of seconds between reads from PurpleAir API (a number - default is 90 seconds)
  • name Is the name of accessory (required).

To find your specific "PURPLE_AIR_STATION_ID" (a string):

  1. Use the PurpleAir Map to locate a station (https://www.purpleair.com/map)
  2. Open this URL in a new Window or Tab: (https://www.purpleair.com/json)
  3. Search for the NAME of the station you found in step A (using JSONview in Google Chrome makes this a bit easier)
  4. The Station ID is the first element in the results[:] map - you will enter this ID (1-5 digits) into the preferences for the Air Quality Station
    1. If you have an outdoor sensor, there should be 2 entries in the big JSON file, one for each sensor. Please use only the FIRST entry - the code will find the second and average the values, as done for the PurpleAir map.



鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
bagonyi/homebrew-formulae发布时间:2022-06-17
下一篇:
rooi/homebridge-lightwaverf: LightwaveRF plugin for HomeBridge发布时间:2022-06-17
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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