Skip to content

hixfield/HixCO2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HixCO2

Build with PlatformIO Software released Hardward

A WIFI connected CO2 sensor based on the ESP8266 microcontroller and MH-Z19 CO2 sensor. A 128x64 I2C oled display also shows the current measurements. Its measurements are pubished via MQTT and in my home system are received via a raspberry pi running Mosquitoo, Nodered, InfluxDB and Grafana. Overview of all components

Improvements

  • Configuration of WIFI SSID/PWD via web interface
  • Design a PCB and 3D printed enclosure

MQTT

Publishing

{room}
   └─── HixCO2
           └─── {deviceTag}
                     └─── device
                     │       └─── count
                     │       └─── room
                     │       └─── device_type
                     │       └─── device_version
                     │       └─── device_tag
                     │       └─── device_name
                     │       └─── wifi_ssid
                     │       └─── wifi_ip
                     │       
                     └─── status
                     │       └─── count
                     │       └─── wifi_rssi
                     │       └─── co2
                     │       └─── temperature
                     │
                     └─── influxdb

influxdb topic publishing contents

To make the import in the influxdb from Node-RED as easy as possible the influxdb topic publishes a json document that can immediatly imported using the influxdb in node. They only thing required is to convert it to a json object via the To json node. Node-RED influxDB import

Following the influxdb in node the json is an array where:

  • the first element contains the measurements
  • the second element contains the tags
  [
   {
      "co2"           : 4564,
      "temperature"   : 45,
      "wifi_rssi"     : -45
   },
   {
      "device_type"   : "HixCO2",
      "device_version": "2.5.8",
      "device_tag"    : "at_door"
      "room"          : "office",
      "wifi_ssid"     : "public_wifi"
   }
  ]

Subscribing

This device does not subscribe to any topics

Configuration web interface

Config web interface

  • Once connectted to the WIFI a normal browser can be used to configure the MQTT details.
  • Just go the the device's ip address with your browser
  • Password is intitially set as bornem1973.
  • At this moment the WIFI SSID and password are hardcoded in the src/secret.cpp file

About

CO2 sensor for my home automation project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published