Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork6
Arduino wrapper for ESP-IDF HomeKit library
License
Brawrdon/esp-homekit-arduino-sdk
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This library provides the officialESP-IDF HomeKit SDK (#fac2032) for ESP32 devices running the Arduino framework.
Version 2.0.0 is in active development and will be available soon!
Note: This wrapper uses a version of the SDK which can't be used in commercial products due to it not being MFi certified, feel free to use it in your hobby projects though!
If you're usingPlatformIO, update yourplatformio.ini file's dependancies or use thepio command in the directory containing yourplatformio.ini file:
pio lib install'ESP32 HomeKit SDK for Arduino'The packages uploaded to PlatformIO's repository and used by the Arduino IDE will contain the complete library, as the build script will be run before packaging. You can use the Arduino IDE to install the library by downloading the prebuilt ZIP file in the Releases section.
At the moment, only a temperature sensor with a default value can be created. I'm in the process of adding the ability to read / write to a sensor, as well as adding all other available sensors.
#include<Arduino.h>#include<WiFi.h>#include<ESP32HomeKit.h>constchar *ssid ="ssid";constchar *password ="password";/*This example provides a basic connection to HomeKit.You can't read/write values at the moment but it's coming I promise.*/voidsetup(){Serial.begin(9600);WiFi.begin(ssid, password);while (WiFi.status() != WL_CONNECTED){delay(1000);Serial.println("Establishing connection to WiFi..");}Serial.println("Connected to network.");HAPAccessoryhapAccessory("ESP32 Fan");hapAccessory.Setup("EspFan01","Espressif","001122334455","0.0.1","1.0.0", HAP_ACCESSORY_SENSOR);HAPTemperatureSensorhapTemperatureSensor("Temperature",10.0);hapAccessory.AddService(hapTemperatureSensor.Service);hapAccessory.Register();HAPCorehapCore("111-22-333","ES32");hapCore.Start();}voidloop(){/* Main loop code*/}
If you want to make edits to the library, run thebuild.sh script. It will clone the ESP-IDF HomeKit SDK repository, copy the required source files and modify them to work with Arduino's build chain. The modified files aren't commited as I don't think I need to host copies of the SDK's source in this repository, or in a fork, since the changes for the port are minimal.
- Add Arduino API wrappers to make it easier to use.
- [] Add other sensors.
- [] Better documentation.
About
Arduino wrapper for ESP-IDF HomeKit library
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.