A Homekit-enabled IR hub to control all your IR devices.
- Install Docker on your host machine.
- Pull and run the Docker image:
docker run -it nn708/esp-homekit-irhub
If your host machine runs Linux, you can add parameter
--device=/dev/<tty_on_your_host_machine>:/dev/ttyUSB0 -e ESPPORT=/dev/ttyUSB0
to expose your ESP8266 device to the container. In some cases, you need to add-e FLASH_MODE=dout
(See https://github.com/espressif/esptool/wiki/SPI-Flash-Modes for more information). - In the Docker container, run
to compile the code. To flash your device, use:
cd ir_hub make
Then debug through serial port:make erase_flash make flash
make monitor
If you are using Windows or macOS, copy the binary file onto your host machine and flash it outside of the container.
- It is recommended to use Ubuntu, although it may work on other opreating systems.
- Install these development tools:
Then
sudo apt-get update
sudo apt-get install make unrar-free autoconf automake libtool gcc g++ gperf \ flex bison texinfo gawk ncurses-dev libexpat-dev python-dev python python-serial \ sed git unzip bash help2man wget bzip2 libtool-bin
- Clone esp-open-sdk, and then compile it:
git clone --recursive https://github.com/pfalcon/esp-open-sdk.git cd esp-open-sdk make
- Add generated toolchain directory (something like
/path/to/esp-open-sdk/xtensa-lx106-elf/bin
) to your PATH. - Download esp-open-rtos:
Then set environment variable ESP_OPEN_RTOS to the esp-open-rtos directory.
git clone --recursive https://github.com/Superhouse/esp-open-rtos.git
- In some cases, you need to change the flash mode (See https://github.com/espressif/esptool/wiki/SPI-Flash-Modes for more information):
export FLASH_MODE=dout
- Connect your ESP8266 to your computer, then set environment variable ESPPORT pointing to your ESP8266, for example:
And make sure you can write to it by adding your user to group dialout:
export ESPPORT=/dev/ttyUSB0
sudo usermod -a -G dialout <your_user>
- Clone this repository and sync all submodules:
git clone https://github.com/NN708/ESP-Homekit-IRHub.git cd ESP-Homekit-IRHub git submodule update --init --recursive
- Change to ir_hub directory:
Then you can compile it using:
cd ir_hub
To flash your device, use:make
Then debug through serial port:make erase_flash make flash
make monitor
- Store accessory information in flash, to make users able to add or delete accessories without editing source code.
- Add more accessories, and let users download accessory configurations from online servers.
Licensed under the MIT license.