Skip to content

DHT MQTT sensor on ESP8266 for Home Assistant

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENSE
Unknown
COPYING
Notifications You must be signed in to change notification settings

bastianraschke/dht-sensor-esp8266-homeassistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DHT MQTT sensor on ESP8266 for Home Assistant

Features

  • DHT11/DHT21/DHT22 sensor firmware for ESP8266 (e.g. NodeMCU)
  • Easy integration to Home Assistant
  • Encrypted MQTT communication with TLS 1.1
  • Deep sleep is supported for low power consumption
  • Customizable data send interval

Project application

Here you see the firmware used on a NodeMCU to measure temperature and humidity values in my appartment:

DHT11 sensor connected to ESP8266 running MQTT client

Configuration

The firmware must be configured before flashing to ESP8266. Rename src/Firmware/sketches/Production/config-sample.h to src/Firmware/sketches/Production/config.h and change the values like desired.

Example configuration for Home Assistant

This example must be added to the sensor block of your configuration.

- platform: mqtt
  state_topic: '/sensor/api/1/id/AAAABBBB/state/'
  name: 'Temperature'
  unit_of_measurement: '°C'
  value_template: '{{ value_json.temperature }}'

- platform: mqtt
  state_topic: '/sensor/api/1/id/AAAABBBB/state/'
  name: 'Humidity'
  unit_of_measurement: '%'
  value_template: '{{ value_json.humidity }}'

About

DHT MQTT sensor on ESP8266 for Home Assistant

Resources

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENSE
Unknown
COPYING

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published