Skip to content

ream88/homekit-sonoff-lights

Repository files navigation

homekit-sonoff-lights

This is my take on Sonoff powered ceiling lights. Following projects inspired me, so be sure to check them out as well:

Setup

Ensure Python is installed:

asdf install
pip install esptool pyserial
asdf reshim python

git submodule update --init --recursive

The Docker build will take a while (~30 min), so grab a coffee:

docker-compose build

Usage

Update the Wi-Fi config in src/wifi.h:

#define WIFI_SSID "ssid"
#define WIFI_PASSWORD "password"
export ESPPORT=/dev/cu.usbserial-1420

The proper device can be found running ls /dev/*usb*. For an ESP connected via an UART use the /dev/cu.usbserial-* device, for USB use /dev/tty.usbserial-*.

export SDK_PATH=`realpath ./esp-open-rtos`
docker-compose run --rm rtos make -C src all

Please ensure to put the Sonoff in flash/programming mode by pressing the button before connecting the UART cable.

make -C src flash

Troubleshooting

If there are any problems writing the firmware try resetting the Sonoff:

make -C src erase_flash

To monitor the Sonoff, you can use the following:

make -C src monitor

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published