Skip to content

RavenCore v1

José Antonio Jiménez Campos edited this page Jan 14, 2022 · 6 revisions

IMPORTANT NOTICE

This version of RavenCore firmware is NOT available because Maxim Kulkin's HomeKit framework version used by RavenCore v1 had a network security issue which allows unsecured and unauthorized connections (It was fixed in newer versions). This means that an attacker could give orders to an accessory simply by being within the network. And accessing a WiFi network protected only by a shared secret is relatively easy using brute force attacks by GPU. If you keep using RavenCore v1, it is recommended to update to RavenCore v2 (HAA) as soon as possible.

RavenCore v1 will not be updated anymore. Reasons are because code is obsolete and incompatible with new libraries version, adapted now to work with new features of Home Accessory Architect firmware (aka RavenCore v2), and update all code is a hard work that would take a lot of time.

Introduction

RavenCore v1 (aka RC) was an unified firmware for several Sonoff devices and others, with OTA updates and some user settings.

Resetting device to factory defaults

Within first minute since device boots, wait about 5 seconds to allow device to boot completely, and then toggle any switch quickly (from Home App or from external switches) at least 10 times.

All configured settings has been removed and device is restarting. This removes HomeKit and WiFi settings, and your device will go to Access Point mode next time in order to reconfigure WiFi (Now device is called RavenCore- followed of last MAC address), but NOT remove OTA repo settings.

Reconnecting to WiFi network

If WiFi network becomes unreachable, device will keep searching WiFi automatically until it can connect again when WiFi becomes available.

User settings

RavenCore can be customized using Eve for HomeKit App.

Common Settings

Show Setup [Default: ON]

Reboot required when changed. An automatic reboot is performed when set to ON after 5 secs.

Show a virtual accessory that let you to configure your main accessory.

VERY IMPORTANT:

It is highly recommended that you disable it when you finish the configuration.

Board Type [Default: 1]

Reboot required when changed.

You can choose between those board types:

  1. Sonoff classic board layout: Uses GPIO14.
  2. Sonoff new board layout: Uses GPIO2 instead GPIO14. Device type 10 has swapped relay and button GPIOs.
  3. Shelly board layout: You must configure board and device type BEFORE connecting Shelly to 230VAC.
  4. Sonoff new board layout: Uses GPIO3/RX instead GPIO14.
  5. Shelly 2.5.
  • GPIO0 and GPIO2 must be free or high in order to let ESP device to boot.

Device Type [Default: 1]

Reboot required when changed.

You can choose between those device types:

  1. Switch 1ch
  2. Switch 2ch
  3. Socket + Button
  4. Switch 4ch
  5. Thermostat
  6. Switch Basic + TH Sensor
  7. Water Valve
  8. Garage Door
  9. Socket + Button + TH Sensor
  10. ESP01 Switch + Button
  11. Switch 3ch
  12. Window Covering
  13. Lock Mechanism
  14. RGB/W Lights
  15. Stateless Button

Button Filter [Default: 0]

Reboot required when changed.

Determines the grade of hardness of the interferences filter used to manage buttons, toggles and reed sensors.

0 is the softest value, with a quick response, and 200 is the hardest with a slow response. Higher values are recommended when sensors are used instead buttons (garage door and lock mechanism).

Reboot [Default: OFF]

When set to ON, a reboot is performed after 5 secs.

WiFi IP Addr

Shows actual IP address for device WiFi network interface.

WiFi Reset [Default: OFF]

Reboot required when changed.

Set it to ON to remove actual WiFi settings with the next reboot. Device will enter in AP mode so you can connect to it and reconfigure WiFi settings.

Firmware Update [Default: OFF]

When set to ON, after 5 secs device reboot and load OTA firmware that search for new version of firmware in GitHub. If a new version is found, it will be downloaded and installed (This process can take some minutes). After you activate it, close EVE App, open Home App and wait until accessory become responsive again.

Sometimes, device keep in OTA process (no AP mode and no response). If you push device button and LED doesn't turn on, device is in OTA, and the only way without refresh is to wait 5 minutes, power off and on again, and wait 5 minutes, doing this until device button turn on led again, indicating that device has loaded RavenCore firmware instead OTA firmware.

You can check the firmware version number in details of your device, in Home App.

If you flash Sonoff RavenCore firmware directly without OTA procedure, this option will not be available.

Firmware HAA [Default: OFF]

When set to ON, replaces the current RavenCore firmware with the last version of Home Accessory Architect firmware when you trigger "Firmware Update" to ON.

Be careful and check if HAA firmware has all functions that you need.

If you flash Sonoff RavenCore firmware directly without OTA procedure, this option will not be available.

Log output [Default: 1]

Reboot required when changed.

If you are using your device connected to 230VAC, it is recommended set this to 0.

Custom option to select log type:

  1. OFF
  2. UART
  3. Not in use/Reserved

Init State SW[1-4] [Default: 0]

This option let you to setup initial state of each switch:

  1. Off
  2. On
  3. Last state
  4. Opposite to last state

Reverse SW[1-4] [Default: OFF]

Configure relay to set the opposite state of the HomeKit switch.

External Toggle[1-2] [Default: 0]

Reboot required when changed.

Use an additional button or switch connected to GPIO14 and GROUND. It incorporates a software filter to avoid AC interferences.

  1. Not used
  2. Use a button or a tactile touch
  3. Use a mount-wall toggle switch

Inching Time[1-4] [Default: 0]

Configure the activation time for a momentary turn on of relay 1-4. Not available for all device types.

Set it to 0 to disable.

Dummy Switch [Default: OFF]

Reboot required when changed.

When set to ON, it creates a virtual HomeKit switch that doesn't control any relay, and appears as an additional accessory. It is useful for complex automations.

Important: Dummy Switch has a different function when is used with Garage Door or Lock Mechanism device type.

Init State DM and Inching Time DM can be configured in the same way that normal switches.

1. Switch 1ch

A single HomeKit Switch. Works well with any Sonoff model and Shelly-1 to control 1 relay.

2. Switch 2ch

A dual HomeKit Switch. Works well with Sonoff Dual, Touch T1 2CH, Shelly 2 and Shelly 2.5.

In Sonoff Dual, internal pins for BUTTON 0 and BUTTON 1 work and can be configured with External Toggle option. And built-in button can trigger relay 1 with a single press, and relay 2 with double press.

In Sonoff Touch T1 2CH, External Toggle 1 and 2 must be set to 1 in order to built-in touch buttons work.

Important note: Using External Toggle 1 = 2 must require additional hardware to avoid set to LOW BUTTON 0 (GPIO0) and enter in flash mode (See Board Type to get a software solution).

3. Socket + Button

A single HomeKit Socket combined with a Stateless HomeKit Button. Ideal for Sonoff S20, S22 and S26, but you can use a Sonoff Basic or TH too.

The Stateless HomeKit Button is part of another accessory called "Stateless Switch", which has 3 events configurable by the user in the Home App (Single press, double press and long press).

To use the normal function of the button to toggle socket on/off, you must use a long press of 3 seconds.

4. Switch 4ch

Creates an accessory with 4 HomeKit switches, for Sonoff 4CH/Pro.

With Sonoff 4CH Pro, set DYP switches as follow:

  • S6: 1
  • K5: all 1
  • K6: all 0

5. Thermostat

A fully working HomeKit Thermostat, reading temperature every 30 seconds by default. For Sonoff TH and S22, with temp/hum sensor.

If you connect a heater, select Heat mode; and if you connect a cooler, select Cool mode. Auto mode doesn't work because Sonoff TH/S22 has only 1 relay.

You can select operating mode using a single press of the Sonoff button. LED will tell you the selected mode:

  • OFF: 1 LED flash
  • HEAT: 2 LED flash
  • COOL: 3 LED flash

If sensor fails, relay turn off automatically and LED will flash 5 times.

Type [Default: 0]

Reboot required when changed.

  1. Heater/Cooler
  2. Heater
  3. Cooler

Init State TH [Default: 0]

This option let you to setup initial state in thermostat target state:

  1. Off
  2. Heat
  3. Cool
  4. Last state

TH Sensor Type [Default: 2]

Reboot required when changed.

Select the temp/hum sensor type connected to your device (GPIO14/GPIO2):

  1. DHT11
  2. DHT22
  3. DS18B20
  4. Si7021

TH Period [Default: 30]

Reboot required when changed.

Select the interval between sensor reads, in seconds. From 3 to 60 seconds.

Offset HUM [Default: 0]

Select an offset humidity to calibrate sensor.

Offset TEMP [Default: 0]

Select an offset temperature to calibrate sensor.

Deadband [Default: 0]

Select a deadband temperature between 0 and 3ºC to adjust how thermostat works.

6. Switch Basic + TH Sensor

Creates a HomeKit Switch, a Temperature sensor, and a Humidity sensor. For Sonoff TH and S22, with temp/hum sensor.

TH Sensor Type [Default: 2]

Select the temp/hum sensor type connected to your device (GPIO14/GPIO2):

  1. DHT11
  2. DHT22
  3. DS18B20
  4. Si7021

TH Period [Default: 30]

Reboot required when changed.

Select the interval between sensor reads, in seconds. From 3 to 60 seconds.

Offset HUM [Default: 0]

Select an offset humidity to calibrate sensor.

Offset TEMP [Default: 0]

Select an offset temperature to calibrate sensor.

7. Water Valve

Use your device as a HomeKit Water Valve or Irrigation System, with a built-in timer. It supports Shelly1 and any Sonoff with one relay.

Valve Type [Default: 0]

Reboot required when changed.

Select the water valve type icon to show:

  1. Water Valve
  2. Sprinkler
  3. Shower
  4. Tap

Has Stop [Default: ON]

Reboot required when changed.

Enable the internal timer to stop automatically.

8. Garage Door

Converts you device into a HomeKit Garage Door Controller.

You must use a Sonoff SV with isolated relay. Instead, you can use other Sonoff model, like Basic or TH with isolated relay (you must do it cutting tracks) with only a sensor for closed status attached to GPIO14.

Connections:

  • GPIO14 -> Door closed sensor.
  • GPIO4 -> Door opened sensor (Optional, but recommended).
  • GPIO5 -> Door obstruction sensor (Optional. When obstruction is detected, relay is disabled).
  • Relay (isolated) -> Action push button of your garage door mechanism.

At least closed sensor is necessary because if you don't use it, HomeKit doesn't know real door status when it is opened with a RF remote or wall push-button. And the idea is the possibility to get notifications when your garage door is opened, for security purposes.

When obstruction sensor is triggered, HomeKit system is notified and relay is disabled to avoid possible damages until obstruction is removed.

If Dummy Switch is enabled, it is used to secure your garage door.

Has Opened Sensor [Default: 0]

Reboot required when changed.

Indicates if a sensor is connected to GPIO4 to control door status when is completely opened.

Sensor type:

  1. Not used
  2. NO: Normal-Opened
  3. NC: Normal-Closed

Has Stop [Default: ON]

If your garage door stops when is moving and you push action button, you must set it to on.

Sensor Close NC [Default: OFF]

Reboot required when changed.

If your GPIO14 sensor is NO (Normal-Opened), set it to OFF; but if your sensor is NC (Normal-Closed), set it to ON.

With Button-Control [Default: OFF]

By default, built-in Sonoff Button (GPIO0) only works to perform a factory reset (Holding it for 10 seconds); but if you want to use it for control your garage door, set it to on. It's recommended to keep it turning off to avoid any kind of interference and avoid undesired openings, for security purposes.

Working Time [Default: 20]

If an opened sensor is not used, it's necessary to set the time that garage door need to perform a complete opening operation. Requires Has Opened Sensor = OFF. The time is in seconds.

9. Socket + Button + TH Sensor

For Sonoff S22 with temp/hum sensor.

The Stateless HomeKit Button is part of another accessory called "Stateless Switch", which has 3 events configurable by the user in the Home App (Single press, double press and long press).

To use the normal function of the button to toggle socket on/off, you must use a long press of 3 seconds.

TH Sensor Type [Default: 2]

Select the temp/hum sensor type connected to your device (GPIO14/GPIO2):

  1. DHT11
  2. DHT22
  3. DS18B20
  4. Si7021

TH Period [Default: 30]

Reboot required when changed.

Select the interval between sensor reads, in seconds. From 3 to 60 seconds.

Offset HUM [Default: 0]

Select an offset humidity to calibrate sensor.

Offset TEMP [Default: 0]

Select an offset temperature to calibrate sensor.

10. ESP01 Switch + Button

For ESP01 with a button connected to GPIO0 and a relay connected to GPIO2.

The Stateless HomeKit Button is part of another accessory called "Stateless Switch", which has 3 events configurable by the user in the Home App (Single press, double press and long press).

To use the normal function of the button to toggle socket on/off, you must use a long press of 3 seconds.

11. Switch 3ch

For Sonoff Touch T1 3ch.

12. Window Covering

A fully stand-alone driver to manage windows, doors and window coverings (rolling shutters).

For Sonoff Dual, Touch T1 2CH, Shelly 2 and Shelly 2.5.

It requires to use a motor with automatic end stops.

With External Toggle 1, you can configure the way that both external buttons/switches will work. Remember that for Sonoff Touch, you must set it to 1 in order to built-in touch buttons work.

Type [Default: 0]

Reboot required when changed.

  1. Window Covering (Rolling Shutter)
  2. Window
  3. Door

Time Open [Default: 30]

Reboot required when changed.

Time necessary to completely open from a fully closed status.

Time Close [Default: 30]

Reboot required when changed.

Time necessary to completely close from a fully opened status.

Boost [Default: 0]

Change only when window covering is fully closed.

By default, position is calculated as linear. With this option, you can modify the curve of the percentage to calculate the real position of a rolling shutter when it has a drum to roll it.

13. Lock Mechanism

A HomeKit lock mechanism accessory that activates a relay to open electro-locks. Focused to use in a Sonoff SV, but compatible with any one-relay Sonoff model, or Shelly 1.

If Dummy Switch is enabled, it is used to secure your lock mechanism.

Has Opened Sensor [Default: 0]

Reboot required when changed.

Creates an additional HomeKit contact sensor. It must be connected to GPIO4 to control open/close status.

Sensor type:

  1. Not used
  2. NO: Normal-Opened
  3. NC: Normal-Closed

14. RGB/W lights

A PWM compatible color light or led strip device (Shelly RGBW2, Magic Home...).

If you use a Shelly RGBW2, you can set Device Board = 3 to use the external switch.

Pins R, G, B, W

Reboot required when changed.

Set the GPIOs used by RGBW pins. If W pin is not used, set it to 0.

GPIOs 6, 7 and 8 are not allowed.

Shelly RGBW2 pins:

  • R: 15
  • G: 12
  • B: 14
  • W: 4 (optional, set to 0 if your LED strip does not use white channel).

Boost [Default: 0]

Increase the intensity of the colors.

Set the color boost level from 0 to 100%.

15. Stateless Programmable Button

The Stateless HomeKit Button is an accessory that has 3 events configurable by the user in the Home App (Single press, double press and long press). Button must be connected to GND and selected GPIO (Pin W).

Pin W

Reboot required when changed.

Set the GPIO used by button.

GPIOs 6, 7 and 8 are not allowed.

Clone this wiki locally