Skip to content
maccoylton edited this page Mar 29, 2021 · 2 revisions

Welcome to the esp-homekit-wired-thermostat wiki!

OTA Instructions

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 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

Stage 1 - installing OTA firmware to your device

To install the OTA firmware we need to download bootloader from the latest release:-

NOTE flashing the bootloader requires a physical connection, which can be done either by soldering or by making a flashing jig.

ESP Connections for flashing

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-wired-thermostat
  • 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-wired-thermostat. 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 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.

Code for pairing is 111-11-111