Code Monkey home page Code Monkey logo

esp32-homekit's Introduction

esp32-homekit

This project is impemented Apple Homekit Accessory Protocol(HAP) to ESP32. You can make your own Homekit accessory with ESP32 with this project.

This project is modified from younghyunjo, which is not working on my esp32 devkitc/wrover-kit. So I modify it to make it work on my board.

Examples(new)

examples/led:

Using LEDC to control the light, which can dim the brightness.

examples/led-rgb:

Using LEDC to control the light, which can dim the brightness and the light color. This case uses the hsi2rgb algorithm, which is referred to lightbulb.c.

examples/led-strip:

refer to ESP32-NeoPixel-WS2812-RMT, and implement the led strip control.

examples/temphumi-ds18-gpu:

Using serial port LCD to display the status and connect to homekit.

Resource

Prerequisite

The esp32-homekit is using esp-idf libraries and build. Please download ESP-IDF and the corresponding compiling tools.

Configuration

WiFi

esp32-homekit uses WiFi as tranmission layer. To connection WiFi, you MUST config WiFi ssid and password.

  1. Open examples/switch/main/main.c
  2. Change EXAMPLE_ESP_WIFI_SSID, and EXAMPLE_ESP_WIFI_PASS
#define EXAMPLE_ESP_WIFI_SSID "123"
#define EXAMPLE_ESP_WIFI_SSID "12345678"  

Or you you can change it bymake menuconfig and change the App WiFi config.

Build

$ cd examples/switch
$ make -j8
$ make flash monitor -j8

Setup Code

While pairing accessory and iOS devices, You must enter Setup Code at HOME App. The default setupt code is

053-58-917

Then you can control your device by Home app or Siri.

makefile的一些说明

  • 在$(patsubst %.c,%.o,$(dir) )中,patsubst把$(dir)中的变量符合后缀是.c的全部替换成.o,任何输出。

    makefile中的patsubst

esp32-homekit's People

Contributors

rillhu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

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.