Skip to content
earlthesquirrel edited this page May 25, 2020 · 8 revisions

Welcome to the esp-homekit-motion-sensor wiki!

Getting Started

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 Installing pre-built firmware OTA

The simplest way to get up and running involves two steps:-

  • Step 1 - flashing the OTA firmware to your device
  • Step 2 - connecting the device to your WiFi and telling it to flash the accessory firmware from GitHub

Step 1 - installing OTA firmware to your device

To install the OTA firmware we need to download the bootloader.bin file from here:-

https://github.com/earlthesquirrel/esp-homekit-motion-sensor/releases

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 bootloader.bin

Step 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 - earlthesquirrel/esp-homekit-motion-sensor (if you want to change, just fork and set up a similar structure)
  • Enter filename - main.bin.
  • 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. Once this is completed the device will reboot again and be ready to be paired like any standard HomeKit Accessory.

Updating pre-built firmware OTA

To update your accessory firmware to the latest release, in the accessory you will see a firmwareupdate 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.

Clone this wiki locally