Installation - WizBangCrash/esp-homekit-devices GitHub Wiki

Go to Third-Party Installation Tools

Installation with OTA

  1. Download fullhaaboot.bin.

  2. Connect your device to your FTDI adapter in flash-mode (Normally hold down device button while connecting).

  3. Use esptool.py to flash it in your device:

    First, erase flash:

    esptool.py -p /dev/<your_ESPPort> erase_flash
    

    Normally, your ESPPort will be something like /dev/tty.USB0000

    Then, set your device in flash-mode again, and flash the new firmware:

    esptool.py -p /dev/<your_ESPPort> --baud 115200 write_flash -fs 1MB -fm dout -ff 40m 0x0 fullhaaboot.bin
    

    Note: If you use an old version of esptool, you must change -fs 1MB to -fs 8m.

  4. You must configure WiFi network, and you can configure your JSON string. At this step, Some devices need additional power to work, and must be connected to mains instead USB adapter. To configure WiFi settings, device generates its own WiFi in AP mode. You must connect to it in order to setup your WiFi network. Simply take your iOS device, go to Setting -> WiFi, and search a SSID with HAA- followed of last MAC address, connect to it, and wait a few seconds until a web appears showing you all WiFi networks that the device has found. Select yours, and enter password.

  5. To finish initial setup, click Save button and wait about 7 minutes until process finish (While installation is working, device doesn't show anything, and buttons don't work). After that, LED turns on for a couple of seconds and, if you configured a JSON string, you will be able to add your accessory to your HomeKit ecosystem using Home App.

Note: If installation fails, you must start all process again from step 2.

OTA Config image

Installing from Tasmota

You can install HAA OTA from Tasmota directly uploading fullhaaboot.bin from its webUI. Once file is loaded, continue from step 4.

Using a custom server for OTA updates

By default, HAA OTA uses GitHub servers to update firmware. If you want, you can run your own HTTP web server to store and apply HAA updates Over-The-Air.

To do it, you must access to web UI Setup and set following info:

  • Custom server for updates: Hostname or IP address of your server, followed of path. Ex: mynas/haa_updates Last lash must not be pressent.
  • Port: Port used by server. Default: 443.
  • Secure connection: If checked, server must use HTTPS with SSL or TLS protocol. Default: yes.

Don't worry about using a non-SSL web server, because all necessary files are signed and verified by hardcoded public key of firmware.

In your server, you must load following files from: https://github.com/RavenSystem/haa/releases

  • haaboot.bin
  • haaboot.bin.sec
  • haamain.bin
  • haamain.bin.sec
  • haaversion
  • otamain.bin
  • otamain.bin.sec
  • otaversion

Installation without OTA

Download Home Accessory Architect haamain.bin from HAA Binary Releases, rboot.bin and blank_config.bin.

Then, continue with point 2 of Installation with OTA using this command to flash them:

```shell
esptool.py -p /dev/<your_ESPPort> --baud 115200 write_flash -fs 1MB -fm dout -ff 40m 0x0 rboot.bin 0x1000 blank_config.bin 0x2000 haamain.bin
```

Third-Party Installation Tools

Following software can be use to install HAA firmware. It is developed and supported by their respective authors. If you have any suggestion or issue, feel free to contact them in their GitHub repositories.

HomeKit setup

Once you configure your JSON string in Home Accessory Architect firmware using its Setup Mode, you will can pair your device with HomeKit.

In your iOS device, open Home App and follow normal steps to add a new accessory.

QR-Code:

HAA

Normal Code:

Pairing code image

021-82-017

Pairing setup takes about 30 seconds.

Note: If pairing fails, you can un-power your device, re-power it, and start HomeKit setup again (WiFi settings keep configured).

Capture Logs

If you want to see UART output to get logs, you can use screen command under macOS and GNU/Linux after connecting your device to computer (non 230VAC):

If you only want to watch the output of the debug logs then use the following command:

screen /dev/<your_device> 115200

To capture the debug logs into a text file for further analysis then use the following command. The logs will be recorded into a file named screenlog.0.

screen -L /dev/<your_device> 115200

To exit screen mode type: Ctl-a k and answer 'y'.

HAA OTA Logs

When device is installing or updating, you can capture logs from HAA OTA directly from your network with this command under macOS and GNU/Linux:

nc -kulnw0 45678