Using sonoff basic R4 with 2 way switch

Hi, this is done using a new feature called ‘magic switch mode’ in sonoff basic r4.
You will need to:

  1. Bridge wires to both switches as below

  2. Install sonoff basic R4 on the light fixture/fan.


Magic switch mode should be enabled by default in the ewelink app.

When pressing the switch, this should toggle the relay while sonoff basic stays online the entire time.

Does this work with custom firmware?
a) Tasmota is still being worked on.
b) For ESPhome, use this external component by ssieb

external_components:
  - source: github://ssieb/custom_components@sswitch
    components: [ magic_switch ]
    refresh: 1min

magic_switch:
  pin: 5
  on_switch:
    - light.toggle: light_1
1 Like

Can you help me with sonoff basic
r4. I ve installed the r4 on light fixture but, now I
don’t know how to make this magic mode
to work from the switch. I have double
switch and i want only one light to control
with basic r4. This is my light switch and
wiring diagram from sonoff. I dont know
where to be the jumper wire. Or is this switch suitable for this to work

You’ll need a 2 way switch, which has 3 terminals on each gang like this