-
-
Notifications
You must be signed in to change notification settings - Fork 11
Home
Welcome to the esp-homekit-sonoff-mini wiki!
This accessory firmware uses an over the air mechanism (OTA) to download and install pre-compiled firmware directly to your device from GitHb
The OTA mechanism was created by @HomeACessoryKid, I’ve included some quick start instructions below, but if you want to know how it works and see the source code it can be found here:- https://github.com/HomeACcessoryKid/life-cycle-manager
The simplest way to get up and running involves two stages:-
- Stage 1 - flashing the OTA firmware to your device
- Stage 2 - connecting the device to your WiFi and telling it to flash the accessory firmware form GitHub
To install the OTA firmware we need to download bootloader from the latest release:-
- bootloader.bin from here:- https://github.com/maccoylton/esp-homekit-sonoff-mini/releases
NOTE at this time we have been unable flash our bootlader using the Sonoff DIY mode, instead it requires a physical connection, which can be done either by soldering or by making a flashing jig.
You then need to erase and flash this file to your device as follows, I assume here you have esptool.py installed and know how to put you device into flash mode:-
esptool.py -p /dev/cu.usbserial erase_flash
esptool.py -p /dev/cu.usbserial --baud 230400 write_flash -fs 8m -fm dout -ff 40m 0x0 bootloaer.bin
Stage 2 - connecting the device to your WiFi and telling it to flash the accessory firmware from GitHub
When your device restarts, it will be operating as a Wifi access point, connect to the device with your iOS device, by selecting it in settings->wifi. You will then be promoted with a configuration web page:-
- select your WiFi by clicking on it
- enter your WiFi password
- enter the GitHub directory - maccoylton/esp-homekit-sonoff-mini
- enter filename - main.bin.
- LED GPIO should be set to 13
- click the join button
The device will now re-boot, connect to your Wifi network, download and flash the main.bin file from the latest release from the repository github.com/maccoylton/esp-homekit-sonoff-mini. Once this is completed the device will reboot again and be ready to be paired like any standard HomeKit Accessory.
To update your accessory firmware to the latest release, in the accessory you will see a firmware update switch, set this to on and the latest version of the firmware will be automatically downloaded and flashed. The accessory will reboot once the flash has completed, if no updated flash is available, it will revert back to the current version already installed.