Skip to content
My Account

Electronics

Temperature and Humidity for Homebridge with an ESP-01

An ESP-01 with a DHT11 that answers a web request with the temperature and humidity as JSON, for Homebridge.

  • Homebridge
  • Archived
  • 1 min read
No ratings yet, be the first.

Archived project

The GitHub repository for this project is archived: it is read-only and no longer updated. What follows describes the project as it was, so check for a newer alternative before you build it.

A temperature and humidity sensor for Homebridge, on an ESP-01 with a DHT11. The module answers a web request with the readings as JSON.

Homebridge is a program that runs on a computer such as a Raspberry Pi, and makes devices that do not support HomeKit show up in the Apple Home app. This project dates from the Homebridge years, before the native HomeKit firmware of this site. For how the site builds HomeKit devices today, see HomeKit or Matter for your ESP32.

Diagram of an ESP-01 with a DHT11 sensor and an FTDI adapter on a breadboard

How it works

The DHT11 is on GPIO2. The ESP-01 runs a web server with two addresses:

AddressAnswer
/A line of text that says where to read the sensor
/dhtJSON with temperature in degrees Celsius and humidity in percent

Homebridge reads the second address to show the temperature and the humidity in the Home app.

Good to know

  • The sketch is version 1.0.3. Its header says GNU General Public License version 2 or later, and the repository has no licence file, so this article describes it and does not copy the code.
  • The repository has the Fritzing file for the diagram as well.
  • The repository is has no licence file.
  • Apple, HomeKit and Homebridge are trademarks of their owners. This project is not made or approved by them.

The project is in the APPLE-HOMEBRIDGE-TEMPERATURE-HUMIDITY-LEVEL repository on GitHub.

Advertisement
All projects

More projects

Keep building.

Electronics, 3D printing and CNC builds, documented from the first idea to the last screw.

All projects