资料介绍
软件简介
DEPRECATION
This plugin is now deprecated/archived/read-only.
It is recommended that you switch to the second generation Homebridge Dynamic Platform plugin: homebridge-awair2
homebridge-awair
Awair plugin for homebridge: https://github.com/nfarina/homebridge
Based on the great work of @henrypoydar.
This is a very basic plugin for Nfarina's amazing Homebridge project. It will fetch current sensor conditions from an Awair device (e.g. Awair, Awair Glow, Awair Mint, Awair Omni, Awair 2nd Edition or Awair Element) and provide available sensor readings (e.g. temperature, humidity, carbon dioxide, TVOC, and dust/PM2.5/PM10) information for HomeKit.
You can look at the current Awair information via HomeKit enabled Apps on your iOS device or even ask Siri for them.
It will get new data once every 15 minutes (default), but it can be customized in config.json
.
Installation
-
Install homebridge using:
[sudo] npm install -g homebridge
-
Install this plugin using:
[sudo] npm install -g homebridge-awair
- Update your configuration file. See the sample below.
You'll need to run an HTTP request to obtain each Awair's device ID (devId
) and device type (devType
).
curl -X GET \
http://developer-apis.awair.is/v1/users/self/devices \
-H 'Authorization: Bearer {developer-token}'
You'll also need to request access to the Awair Developer Console to obtain your Developer Token (token
).
The Awair Developer API Documentation explains the inner workings of the Awair Developer API, but for the most part is not necessary to use this plugin.
Configuration
Configuration sample:
Add the following information to your config file (note: shown with (6) example devices: Awair, Awair Glow, Awair Mint, Awair Omni, Awair 2nd Edition and Awair Element).
"accessories": [
{
"accessory": "Awair",
"name": "Example Room 1 Awair",
"token": "AAA.AAA.AAA",
"manufacturer": "Awair",
"devType": "awair",
"devId": "123",
"serial": "example-serial_123",
"model": "Awair",
"carbonDioxideThreshold": 1200,
"carbonDioxideThresholdOff": 1200,
"voc_mixture_mw": 72.66578273019740,
"air_quality_method": "awair-score",
"userType": "users/self",
"endpoint": "15-min-avg",
"polling_interval": 900,
"limit": 12
},{
"accessory": "Awair",
"name": "Example Room 2 Awair Glow",
"token": "AAA.AAA.AAA",
"manufacturer": "Awair",
"devType": "awair-glow",
"devId": "124",
"serial": "example-serial_124",
"model": "Awair Glow",
"carbonDioxideThreshold": 1200,
"carbonDioxideThresholdOff": 900,
"voc_mixture_mw": 72.66578273019740,
"air_quality_method": "awair-score",
"userType": "users/self",
"endpoint": "15-min-avg",
"polling_interval": 900,
"limit": 12
},{
"accessory": "Awair",
"name": "Example Room 3 Awair Mint",
"token": "AAA.AAA.AAA",
"manufacturer": "Awair",
"devType": "awair-mint",
"devId": "125",
"serial": "example-serial_125",
"model": "Awair Mint",
"carbonDioxideThreshold": 0,
"carbonDioxideThresholdOff": 0,
"voc_mixture_mw": 72.66578273019740,
"air_quality_method": "awair-score",
"userType": "users/self",
"endpoint": "15-min-avg",
"polling_interval": 900,
"limit": 12
},{
"accessory": "Awair",
"name": "Example Room 4 Awair Omni",
"token": "AAA.AAA.AAA",
"manufacturer": "Awair",
"devType": "awair-omni",
"devId": "126",
"serial": "example-serial_126",
"model": "Awair Omni",
"carbonDioxideThreshold": 1200,
"carbonDioxideThresholdOff": 800,
"voc_mixture_mw": 72.66578273019740,
"air_quality_method": "awair-score",
"userType": "users/self",
"endpoint": "15-min-avg",
"polling_interval": 900,
"limit": 12
},{
"accessory": "Awair",
"name": "Example Room 5 Awair 2nd Edition",
"token": "AAA.AAA.AAA",
"manufacturer": "Awair",
"devType": "awair-r2",
"devId": "127",
"serial": "example-serial_127",
"model": "Awair 2nd Edition",
"carbonDioxideThreshold": 1200,
"carbonDioxideThresholdOff": 1000,
"voc_mixture_mw": 72.66578273019740,
"air_quality_method": "awair-score",
"userType": "users/self",
"endpoint": "15-min-avg",
"polling_interval": 900,
"limit": 12
},{
"accessory": "Awair",
"name": "Example Room 6 Awair Element",
"token": "AAA.AAA.AAA",
"manufacturer": "Awair",
"devType": "awair-element",
"devId": "127",
"serial": "example-serial_127",
"model": "Awair Element",
"carbonDioxideThreshold": 1200,
"carbonDioxideThresholdOff": 1000,
"voc_mixture_mw": 72.66578273019740,
"air_quality_method": "awair-score",
"userType": "users/self",
"endpoint": "15-min-avg",
"polling_interval": 900,
"limit": 12
}
]
Descriptions
`accessory` => The Homebridge Accessory (REQUIRED, must be exactly: `Awair`)
`name` => The accessory name that appears by default in HomeKit (REQUIRED, can be anything)
`token` => Developer Token (REQUIRED, see [Installation](#installation))
`manufacturer` => Manufacturer (OPTIONAL, default = `Awair`)
`devType` => Device Type (REQUIRED, options: `awair`, `awair-glow`, `awair-mint`, `awair-omni`, `awair-r2` or 'awair-element')
`devId` => Device ID (REQUIRED, see [Installation](#installation))
`serial` => Serial Number (OPTIONAL, default = `devType_devId`, options: `mac-address` or `devType_devId`)
`model` => Device Model (OPTIONAL, default = `devType`, options: `Awair`, `Awair Glow`, `Awair Mint`, `Awair Omni`, `Awair 2nd Edition`, 'Awair Element')
`carbonDioxideThreshold` => (OPTIONAL, default = `0` [i.e. OFF], the level at which HomeKit will trigger an alert for the CO2 in ppm)
`carbonDioxideThresholdOff` => (OPTIONAL, default = `0` [i.e. `carbonDioxideThreshold`], the level at which HomeKit will turn off the trigger alert for the CO2 in ppm, to ensure that it doesn't trigger on/off too frequently choose a number lower than `carbonDioxideThreshold`)
`voc_mixture_mw` => The Molecular Weight (g/mol) of a reference gas or mixture that you use to convert from ppb to ug/m^3 (OPTIONAL, default = `72.66578273019740`)
`air_quality_method` => Air quality calculation method used to define the Air Quality Chracteristic (OPTIONAL, default = `awair-score`, options: `awair-score`, `aqi`, `nowcast-aqi`)
`endpoint` => The `/air-data` endpoint to use (OPTIONAL, default = `15-min-avg`, options: `15-min-avg`, `5-min-avg`, `raw`, or `latest`)
`polling_interval` => The frequency (OPTIONAL, default = `900` (15 minutes), units: seconds, that you would like to update the data in HomeKit)
`userType` => The type of user account (OPTIONAL, default = `users/self`, options: `users/self` or `orgs/###`, where ### is the Awair Organization `orgId`)
`limit` => Number of consecutive 10 second data points returned per request, used for custom averaging of sensor values from `/raw` endpoint (OPTIONAL, default = `12` i.e. 2 minute average)
`url` => The Awair url to poll (OPTIONAL, default = `http://developer-apis.awair.is/v1/users/self/devices/:device_type/:device_id/air-data/:endpoint?limit=:limit&desc=true`, EDITING NOT RECOMMENDED)
`logging` => Whether to output logs to the Homebridge logs (OPTIONAL, default = `false`)
`logging_level` => How verbosely to log (OPTIONAL, default = `0`, options: `0`, `1`, `2`, `3`)
API Response
See response.sample.json
Resources
- Awair API: https://docs.developer.getawair.com/
- Homebridge: https://github.com/nfarina/homebridge
- Homebridge plugin development: http://blog.theodo.fr/2017/08/make-siri-perfect-home-companion-devices-not-supported-apple-homekit/
- List of Services and conventions: https://github.com/KhaosT/HAP-NodeJS/blob/master/lib/gen/HomeKitTypes.js
- Another Awair plugin: https://github.com/henrypoydar/homebridge-awair-glow
- Reference AQ plugin: https://github.com/toto/homebridge-airrohr
- Refenerce temperature plugin: https://github.com/metbosch/homebridge-http-temperature
- AQI Calculation NPM package: https://www.npmjs.com/package/aqi-bot
- 用Rust编写的Homebridge Spotify插件
- 用于树莓派与PIR传感器连接成运动传感器的homebridge插件
- Homebridge插件集成Shinobi
- Homebridge的Loxone插件
- Homebridge Pi恒温器插件
- 米家安防摄像头Homebridge插件
- Homebridge插件可在Apple HomeKit中使用RuuviTags
- homebridge通过wifi检测房间中的存在
- homebridge示例插件示例集合
- homebridge-smartthings SmartThings插件
- homebridge miio平台插件
- 热门的homebridge插件列表
- 将Wyze连接家庭设备支持添加到Homebridge的插件
- Homebridge-Denon-Marantz-AVR插件
- Homebridge GPIO WiringPi平台插件
- 晶振的封装类型选择,贴片还是插件?到底该怎么选? 225次阅读
- DIP插件加工注意事项 766次阅读
- PCBA加工接插件焊接式的质量控制 404次阅读
- 使用DevartExcel插件的好处 525次阅读
- Rust构建QEMU插件的框架 745次阅读
- 如何制作交互式BOM的AD插件 4355次阅读
- 插件器件的方形引脚绘制及处理方法 1363次阅读
- 分享几个vscode必备精品插件 2871次阅读
- 插件电阻的选用方法 2870次阅读
- dfrobot面包板实验插件LED插件包简介 1174次阅读
- 魏德米勒新推用于驱动系统的印刷线路板接插件 2890次阅读
- 电子接插件电镀技术 3361次阅读
- vscode常用插件有哪些 2w次阅读
- jquery插件开发实例(MSBar2D图效果、手风琴特效插件) 1988次阅读
- jquery插件写法及用法(jQuery插件开发全解析) 1w次阅读
下载排行
本周
- 1山景DSP芯片AP8248A2数据手册
- 1.06 MB | 532次下载 | 免费
- 2RK3399完整板原理图(支持平板,盒子VR)
- 3.28 MB | 339次下载 | 免费
- 3TC358743XBG评估板参考手册
- 1.36 MB | 330次下载 | 免费
- 4DFM软件使用教程
- 0.84 MB | 295次下载 | 免费
- 5元宇宙深度解析—未来的未来-风口还是泡沫
- 6.40 MB | 227次下载 | 免费
- 6迪文DGUS开发指南
- 31.67 MB | 194次下载 | 免费
- 7元宇宙底层硬件系列报告
- 13.42 MB | 182次下载 | 免费
- 8FP5207XR-G1中文应用手册
- 1.09 MB | 178次下载 | 免费
本月
- 1OrCAD10.5下载OrCAD10.5中文版软件
- 0.00 MB | 234315次下载 | 免费
- 2555集成电路应用800例(新编版)
- 0.00 MB | 33566次下载 | 免费
- 3接口电路图大全
- 未知 | 30323次下载 | 免费
- 4开关电源设计实例指南
- 未知 | 21549次下载 | 免费
- 5电气工程师手册免费下载(新编第二版pdf电子书)
- 0.00 MB | 15349次下载 | 免费
- 6数字电路基础pdf(下载)
- 未知 | 13750次下载 | 免费
- 7电子制作实例集锦 下载
- 未知 | 8113次下载 | 免费
- 8《LED驱动电路设计》 温德尔著
- 0.00 MB | 6656次下载 | 免费
总榜
- 1matlab软件下载入口
- 未知 | 935054次下载 | 免费
- 2protel99se软件下载(可英文版转中文版)
- 78.1 MB | 537798次下载 | 免费
- 3MATLAB 7.1 下载 (含软件介绍)
- 未知 | 420027次下载 | 免费
- 4OrCAD10.5下载OrCAD10.5中文版软件
- 0.00 MB | 234315次下载 | 免费
- 5Altium DXP2002下载入口
- 未知 | 233046次下载 | 免费
- 6电路仿真软件multisim 10.0免费下载
- 340992 | 191187次下载 | 免费
- 7十天学会AVR单片机与C语言视频教程 下载
- 158M | 183279次下载 | 免费
- 8proe5.0野火版下载(中文版免费下载)
- 未知 | 138040次下载 | 免费
评论
查看更多