Ravencore: make compatible AppHomeKit an ESP8266 component (Sonoff, Shelly etc.)

6 minutes of reading
  • RiproSet the firmware of an ESP8266 SOC home automation component with Ravencore firmware to make it directly compatible with Appthe HomeKits
  • Difficulty level: medium
  • Riprofirmware grammation
GUIDE more indicated for:

All environments

Notes and disclaimer
  • qualsiasi eventuale modifica agli impianti domestici dev'essere progettata ed realizzata SOLO da personale qualificato;
  • any changes implemented in probefore is a propersonal responsibility as well as a profirst risk and danger (the contents of the present page are purely educational);
  • any changes implemented in proprior to a device it voids the guarantee, quality approvals and certifications.
Driving review: 1.0


Every electronic device contains broadly a small piece of softwareCalled firmware, which determines its functions and behavior. Our car is equipped with different firmware; it has one, the washing machine, our remote control, even a clock radio has a profirst firmware.

esp8266 wifi

Devices based on SOC ESP8266 (a processor equipped with Wi-Fi rather in vogue for its low cost, limited size and great versatility) i'm not far behind: all mount a profirst firmware, usually written and compiled by proconductor. A classic example comes from the line devices ITEAD Sonoff "Smart Home" o Shelly "Home Automation Systems " which, mainly, mount this SOC (System-On-a-Chip).

Using a similarity, riprogrammare (o flash) the firmware of a device it's like overwriting a whole VHS videotape. Well: the devices that mount the ESP8266 they easily lend themselves to this reproming, which, for the most part, is carried out in order to equip the components with additional (or in any case different) functionalities from the factory ones.

It is the case of free alternative firmware written for devices based on ESP8266 SOC: they are implemented to "free" the devices from the factory firmware and implement, apptogether, many additional features. This guide illustrates how to reprogramming an ESP8266 device in order to render it directly compatible with Appthe HomeKits through the adoption of the firmware esp-homekit-devices (also known as Ravencore).

Works With Appthe HomeKits

The Ravencore firmware, developed under an Open Source license by the independent developer José A. Jiménez, is expressly designed to equip devices based on ESP8266 SOC with the possibility of being managed through Appthe HomeKits - which rappit has an advantage and a disadvantage at the same time.

A digression on the subject is important.

Apple HomeKit it's a provalue jet designed by Appin order to make personal domotics "easy". The idea, initially well defined by Apple, ha stunted very in recent years to evolve (and the WWDC 2019 no made us change our mind), to the point that others pronot only did home automation jets reach it, but they have abundantly surpassed it in terms of user experience, flexibility, compatibility with the components of an ever wider market. Just think of the enormous success di Home Assistant.

A component made compatible with a alone standard (medium closed) as Apple HomeKit is an approccio may advisable, which is why Ravencore (which remains an excellent one projet) is not among our favorite alternative firmware: projets like Sonoff-Tasmota o Espurna, in fact, they are widely preferable for the wide margin of maneuver (today's and future) guaranteed by them thanks to the adoption of prostandard open tocolli such as MQTT. It is also true that the use of Ravencore allows to control directly and quickly all devices that adopt it (and in any case you always have time to change firmware - provided that the devices are not mounted on systems not easily accessible) through Appthe HomeKits.

However of great interest for the quality of the procast, Ravencore deserves widely this guide.


For macro-passages, the proyielding is the following:

Download Ravencore

First you need to download to your computer appnow the Ravencore package, composed from three separate rows:

Nb Make a note of the folder where you are prosaw to download the three files.


At this point it is necessary connect the device via adapter USB / TTL taking care to set it simultaneously in "flash" mode. There prolink cedura is the usual described in ours MasterGuide; as regards instead how prosee to set the flash mode, such procedura varies from device to device.
As regards the Sonoff, on inDomus we have a guide .

Once connected and set to "flash" mode, check the communication port and write it down.

Firmware upload

Now it is possible to carry out, via the same procedure via esptool, writing the Ravencore firmware on the device.
Via computer terminalappto which the device is connected via the USB / TTL adapter, raggiungere the path in which has prosaw to save the three files which make up the Ravencore firmware and then execute the following command:

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

taking care to replace "/ Dev / <porta_USB_TTL>"With the door on which the adapter is attached (eg."COMx"Or"/ Dev / tty-usbserial-xxxx"Often"/dev/tty.USB0000“).

Then execute the command for prosee the writing on the device. When finished, disconnect the USB / TTL adapter from the computer and the device.

After successful disconnection, prosee to power the device to turn it on; wait then about five minutes: at the end, the device LED (if present) will flash for a couple of seconds.

ATTENZIONE: In case of Shelly line device prowatch the board continue to use the USB / TTL adapter e no the 220v power grid. This can only be done at the end of the guide, or when the type of board has been chosen through "Eve". Otherwise, the board will come damaged inexorably.

Access the device

At this point - via an iOS smartphone / tablet (no one forbids doing so by using others, but would make little sense given the purpose of using Ravencore) - connect to the W-Fi displayed by the device appena "Ravencorizzato": the SSID (the name of the network) will present the prefix "LCM-”Followed by a part of the MAC address Wi-Fi of the device:

Once connected, appa form will appear where you can enter information vital to the device:

  • access coordinates to the home W-Fi;
  • repository for mostnameautomatic firmware update.

First, choose the proman Wi-Fi and enter the password. In the following field "OTA repository" insert "RavenSystem / ravencore"; finally in the field "OTA binary file" insert "main.bin"

Finally, click on "Join"

The device will restart a provvederà to independently access the Wi-Fi domestic.

Add the device to "Home"

Now the device will be pronto to be associated with ours app "Home" via iPhone / iPad.
Taking care that the iOS device is connected to it Wi-Fi of the device equipped with Ravencore firmware, at theapp "Home" click on "Add device" and frame, with the camera of the iOS device, the following code:

Pairing Code - Ravencore HomeKit

At this point theapp show the list of detected devices, among which ours will be present Sonoff equipped with Ravencore firmware, easily recognizable by the label with prefix “Ravencore-”And suffix related to proprio MAC address:

Nb The device will be recognized as not certified: click on "Add anyway" for progive over.

At the end of the proprocedure 'sapp "Home" will allow you to refine the "switch" accessory configuration (its name, whether to include it in your favorites, etc.) and, at the end, it will display it as usual at its interface.

Configuration via "Eve"

Completed the first configuration above the device will be correctly surveyed at Appthe HomeKits.

What is missing is, based on the physical type of device, one correct device configuration compared to yours features (presence of sensors, of different relays etc.) and the expected behavior (possible inching, self-locking, etc.)

Compared to other firmware, Ravencore allows configuration of features and functionsnameof devices that adopt it through the use of aapp iOS call Elve "Eve", note among other things for the ability to administer HomeKit and enable more detailed and complete automations than it is possible to do, basically, through theapp "House of Appthem.

Once "Eve" is launched appwill appear on the screen the list of devices surveyed so far at Appthe HomeKits, including the recently added Ravencore device, flanked by another element, called "Setup", which will allow you to configure the specific features of the device:

In the screen that appwill be presented many different voices, some of which are quite intuitive, others less so:

Elvato Eve - Ravencore Configuration

The most interesting fields are certainly "Actual Dev Type","Board Type" and "Device Type": These are items that allow us to identify which, specifically, the physical device in use.

Logo Appthe HomeKitsATTENZIONE: remember that there is on our FORUM community an ad hoc section dedicated to Appthe Homekits, for any doubt, question, information on the specific merit of these components.

inDomus telegram channel