Giter Site home page Giter Site logo

lab-iot-homekit's Introduction

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

lab-iot-homekit's People

Contributors

valeriansaliou avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

koson

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.