本文主要解释如何将wifi空气质量检测仪YNM3000接入homeassistant系统,阅读时间大概五分钟。 关于开源气体检测仪YNM3000 介绍,请参考[开源气体检测仪YNM3000 项目介绍]([https://www.kancloud.cn/lewei50/ourair/472273](https://www.kancloud.cn/lewei50/ourair/472273)) # 实际效果 ## 硬件效果 ![YNM3000](https://leweidoc.oss-cn-hangzhou.aliyuncs.com/lewei50/img/YNM3000-2-20180418-6.jpg) ## 接入HomeAssistant 系统 ![home assistant](https://leweidoc.oss-cn-hangzhou.aliyuncs.com/lewei50/img/HA-20191122-6.jpg) 可以监控与采集的数据包括 温度,湿度,PM2.5,AQI,HCHO,CO2。 # 接入教程 ## 1 安装HomeAssistant 系统 参考网络相关教程 ## 2 下载源码放到 custom_components 目录下 [源码地址:https://github.com/lewei50/homeassistant/tree/master/custom_components/devicebit](https://github.com/lewei50/homeassistant/tree/master/custom_components/devicebit) ![](https://leweidoc.oss-cn-hangzhou.aliyuncs.com/lewei50/img/HA-20191122-8.jpg) ![](https://leweidoc.oss-cn-hangzhou.aliyuncs.com/lewei50/img/HA-20191122-1.jpg) ![](https://leweidoc.oss-cn-hangzhou.aliyuncs.com/lewei50/img/HA-20191122-2.jpg) ## 3 修改configuration.yaml,在sensor:下添加 ```yaml sensor: - platform: devicebit host: 192.168.1.13 name: ynm3000 ``` ![](https://leweidoc.oss-cn-hangzhou.aliyuncs.com/lewei50/img/HA-20191122-7.jpg) ## Reference - [1 AirMonitor with HomeAssistant](http://lwkits.com/doc/htmonitor/product-introduction.html) - [2 WTH series catelogue](http://lwkits.com/doc/htmonitor/product-catelogue.html) - [3 YNM3000 program](https://github.com/lewei50/esp8266-arduino/tree/master/YNM3000)