Skip to content

HomeKit ready air quality monitor based on a Heltec HTIT-W8266 (WiFi Kit 8) development board with built-in OLED display and a Plantower PMS7003 sensor via Arduino.

Notifications You must be signed in to change notification settings

pqhf5kd/arduino_pms7003

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

arduino_pms7003

HomeKit ready air quality monitor based on a Heltec HTIT-W8266 (WiFi Kit 8) development board with built-in OLED display and a Plantower PMS7003 sensor via Arduino. Outputs data via http/json and on OLED screen. HomeKit support includes "Air Quality", as well as PM 2.5/10 Densities.

WiFi setup

After flashing, on first boot, the device will start in Access Point mode to allow you to setup your WiFi.

Connect to the access point named ESPP8266-<uniqueid> and it will redirect you to a webpage that will allow you to select your SSID and enter your password.

Once this is configured, it will restart into WiFi client mode and connect to your local network.

WiFi configuration stored locally and will not reset across power cycles/reboots.

MDNS

Device will come up and broadcast multicast dns for ESPP-<uniqueid>.local and _http._tcp.80.

You can discover the uniqueid by running dns-sd -B _http._tcp on MacOS.

$ dns-sd -B _http._tcp
Browsing for _http._tcp
DATE: ---Sat 12 Sep 2020---
14:55:28.605  ...STARTING...
Timestamp     A/R    Flags  if Domain               Service Type         Instance Name
14:55:28.607  Add        3   4 local.               _http._tcp.          ESP8266-4a9f
...

JSON output

Device will also output data via http/json. You can run curl http://ESP8266-<uniqueid>.local to view. Use to pull data, consume, graph, etc

$ curl http://ESP8266-4a9f.local
{ "Hostname": "ESP8266-4a9f", "Data": { "PM1.0": "14", "PM2.5": "24", "PM10": "30"}}

HomeKit

Device will be accessible to pair with HomeKit.

To pair from Home app, click +, Add Accessory, I Don't Have a Code or Cannot Scan. It will show up under Nearby Accessories.

By default, pairing code is 867-53-069 and can be modified in my_accessory.c

Due to the nature of HomeKit, reporting is done as levels 0-5, where 0-5 = Unknown, Excellent, Good, Fair, Inferior, Poor

Thresholds are currently set as: (still tweaking to reflect reality/cross referenced from Temtop 1000S)

PM2.5HomeKitDescription
NA0Unknown
0-121Excellent
13-352Good
36-553Fair
56-1504Inferior
151+5Poor

Wiring

    __usb__                               _____
  -|       |- GND ----------------- GND -|     |
  -|       |- 5V ------------------ VCC -|     |
  -|       |-                    |-  RX -|     |
  -|       |-                |---|-- TX -|_____|
  -|       |-                |   |       PMS7003
  -|       |-                |   |
  -|       |-                |   |
  -|       |- TX (GPIO1/TXD0)-   |
  -|       |- RX (GPIO3/RXD0)----|
  -|       |-
  -|       |-
  -|_______|-
   HTIT-W8266

Parts

You can find parts pretty easily on Amazon, but they are cheaper from overseas/AliExpress (Non sponsored links)

HTIT-W8266

PMS7003

Reference

About

HomeKit ready air quality monitor based on a Heltec HTIT-W8266 (WiFi Kit 8) development board with built-in OLED display and a Plantower PMS7003 sensor via Arduino.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 88.5%
  • C 11.5%