Skip to content

💡 HomeKit-powered home automation IoT projects, running on ESP32.

License

Notifications You must be signed in to change notification settings

valeriansaliou/lab-iot-homekit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 

Repository files navigation

lab-iot-homekit

Some HomeKit-based IoT experiments. An ESP32 board is required to run the code.

Requirements

All projects have the following common requirements:

  • Arduino IDE
  • An ESP32 board (mine is: ESP32-WROOM-32)

As well, all projects are built on the top of the HomeSpan library. Therefore, once flashed on a board, they should be connected to WiFi and paired following HomeSpan Getting Started and Command-Line Interface docs.

Before any project can be compiled and flashed to an ESP32 board, you must prepare your Arduino IDE with the following:

Projects

Air Conditioner Remote

Abstract

The goal of this project is to convert a traditional portable air conditioning unit (that can cool and heat) into a connected AC that can be controlled from HomeKit. The AC unit was opened and the ESP32 was interfaced with the logic board using an infrared emitter.

Guidelines

The retrofit performed is very simple, as no AC components have to be modified, the ESP32 is basically simulating the IR remote controller that is provided with the AC unit, emitting mocked IR signals to the IR receiver PCB contained in the AC unit.

A small custom board should be built, with an IR emitter diode mounted on it, connected to the ESP32. The ESP32 manages a state machine of which state the AC unit is in, and which IR signals should be sent to change its current state to any desired state. The temperature sensor used is a DHT11.

The following libraries are being used, and should be installed from the Arduino IDE:

Sprinkler Tank Water Level

Abstract

The goal of this project is to measure the water level in a tank used for plant watering, using an ultrasonic sensor. The water level is periodically reported via a battery service to HomeKit (as there is no water level service, as of 2022).

Guidelines

This project requires an HC-SR04 ultrasonic sensor to be attached to the ESP32 board, with the following pin connections:

  • Sensor TRIG to ESP32 PIN 22
  • Sensor ECHO to ESP32 PIN 21
  • Sensor GND to ESP32 GND
  • Sensor VCC to ESP32 VCC

The following resistance values are used to obtain the ECHO value:

  • R1 of 330 ohms
  • R2 of 470 ohms

The custom board that should be built follows the same schematics as described here.

The CAD files for the sensor casing parts are also provided in this project. They should be 3D printed on a SLA printer (mine is: Formlabs Form 3).

Result

Water level sensor in the Home app Periodic water level reporting

Models

ESP32 casing Sensor casing

About

💡 HomeKit-powered home automation IoT projects, running on ESP32.

Topics

Resources

License

Stars

Watchers

Forks