Anyone tested the MH-Z16 CO2 Sensor with ESPhome?

Hi there!

I see that ESPhome has support for the MH-Z19 CO2 sensor. But I have a MH-Z16 sensor. Do you know if and how I can use it?

Thank you so much!
ygreq

Manual: https://raw.githubusercontent.com/SeeedDocument/Grove-CO2_Sensor/master/res/MH-Z16_CO2_datasheet_EN.pdf

Here is how it looks like

Did you ever have any luck with this? I came here to ask the same question.

Nope! No solution as of now. If you find one, please write about it here

The only thing I know is that ESPhome offers the possibility to build custom sensors. So if you are a good coder, you should try your skills :slight_smile:

1 Like

Sadly I’m not…

Since I couldn’t find any solution for the MH-Z16 I decided to order a Sensair S8 and ESP32 to try out with ESPHome.

I am using MH-Z16 CO2 sensor in ESPhome. I simple selected SW for MH-Z19 CO2 sensor. I connected it to esp32 pins GPIO16 and 17.

Add this to your ESPhome yaml file:

uart:
  rx_pin: GPIO16
  tx_pin: GPIO17
  baud_rate: 9600
      
# Example configuration entry
sensor:
  - platform: mhz19
    co2:
      name: "MH-Z19 CO2 Value"
    temperature:
      name: "MH-Z19 Temperature"
    update_interval: 60s
    automatic_baseline_calibration: false      

Good luck!

1 Like

Interesting! I will give it another go!

Thank you, @kavsek