Interface an TFA Dostmann CO2 Monitor with ESP8266 (in our example a WEMOS D1 Mini) to connect it to the "Internet of Things". It publishes the CO2 measurement and temperature to a configured MQTT topic.
It also implements Home Assistant Auto Discovery.
- Rename settings.h.example to settings.h
- Open up your arduino IDE
- Edit the settings.h to match your setup
- Upload the compiled result to your Wemos D1 Mini
Add a pin header to the existing PCB. Left to right: GND, Clock, Data, 5V:
Wire up your Wemos with 4 wires, connected to 5V, G, D2 and D1:
Now connect your Wemos D1 mini to your co2 monitor:
Since we're using WiFiManager, after flashing, the EPS8266 will open up a WiFi Hotspot to configure Wireless credentials. Just connect to it using a wifi-capable device and you should be automatically redirected to the configuration page.
The ESP8266 will also default to AP mode if the configured wifi is unavailable. You might want to set a password for the AP mode in your settings.h
If USE_HA_AUTODISCOVERY
is set and mqtt is configured correctly,
you should find a new device with CO2 + Temperature entities in your Home Assistant installations devices section.
- Arduino/ESP8266
Don't use D4 and D3, because it causes power-on issues with wemos d1 mini: https://www.forward.com.au/pfod/ESP8266/GPIOpins/index.html