homekit-bridge
Introduction
A HomeKit gateway specially designed for embedded devices, it allows you to connect non-HomeKit devices to HomeKit through simple configuration.
Code style
HomeKit bridge supports code style checking, the checker is cpplint, a command line tool that checks for style issues in C/C++ files according to the Google C++ Style Guide.
Build
Clone the repo
Add
--recursive
to initialize submodules in the clone.
git clone --recursive https://github.com/KNpTrue/homekit-bridge.git
Platform Linux (Ubuntu)
-
Install dependencies:
$ sudo apt install cmake ninja-build clang libavahi-compat-libdnssd-dev libssl-dev python3-pip $ pip3 install cpplint
-
Compile and run:
$ mkdir build $ cd build $ cmake -G Ninja .. && ninja $ ./platform/linux/homekit-bridge
-
Run the example
$ ./platform/linux/homekit-bridge -d example_scripts
Platform ESP
-
Set up the host environment and ESP-IDF (v4.3-beta3) as per the steps given here.
-
ESP-IDF currently uses MbedTLS 2.16.x, whereas HomeKit ADK requires 2.18. A branch mbedtls-2.16.6-adk is being maintained here which has the required patches from 2.18, on top of 2.16.6. To switch to this, follow these steps:
$ cd $IDF_PATH/components/mbedtls/mbedtls $ git pull $ git checkout -b mbedtls-2.16.6-adk origin/mbedtls-2.16.6-adk
-
You can use homekit-bridge with any ESP32 or ESP32-S2 board. Compile, flash and connect to console as below:
$ cd /path/to/homekit-bridge/platform/esp $ export ESPPORT=/dev/tty.SLAB_USBtoUART # Set your board's serial port here $ idf.py set-target <esp32/esp32s2> $ idf.py flash $ idf.py monitor
-
Use
join
command to configure Wi-Fi:esp32 > join "<ssid>" "<password>"
Usage
TODO