Sonoff Basic R2 Switch Module (BASICR2)
Sonoff Basic R2
GPIO #Component
GPIO00 Button1
GPIO01 User
GPIO02 User
GPIO03 User
GPIO04 None
GPIO05 None
GPIO09 None
GPIO10 None
GPIO12 Relay1
GPIO13 Led1i
GPIO14 None
GPIO15 None
GPIO16 None
Configuration (old format, will be converted to new template when applied)
{"NAME":"Sonoff BASICR2","GPIO":[17,255,255,255,0,0,0,0,21,56,0,0,0],"FLAG":0,"BASE":1}
Use code BLAKADDER when buying from itead.cc for a 10% discount.

Use code BLAKADDER23 when buying from mediarath.de Tasmota category and a minimum order value of 50€ for a 10% discount. The code is valid until end of 2023.

Around November 2018, Itead changed the layout of the Sonoff Basic (issue #4515). Later on, Itead made a few board revisions with noticeable layout changes. New boards are labelled as Sonoff RF R2 POWER V1.x. Easily discerned from original Sonoff Basic since its using wires instead of thick solder traces for mains power.

GPIO14 is no longer broken out to a contact on the PCB. Instead you can use GPIO2 labeled as IO2 on the board. Take care that GPIO2 is not being pulled low when the device is booting. Otherwise, the device will not boot into its regular operational mode.

Alternatively, you can use use GPIO3 which does not have any boot function restrictions. However, both of these GPIOs are pulled high momentarily after boot. This means that any connected device may “blink” when the Sonoff is powering up.

Unlike GPIO3, the GPIO2 PCB contact is not prepared for a pin. You will need to solder your cable directly on the board. Be careful. Too high a temperature or long heating can damage the contact and its connectivity. You should also make sure that there is no tension on the cable. Affix the cable with a cable tie and perhaps some hot glue.

  • GPIO2 = IO2 (no pullup)
  • GPIO12 = RELAY
  • GPIO13 = LED1


label front back chip


V1.3 PCB V1.3 PCB

Image from elty.pl.

For version 1.3, you may need not to cross TX and RX lines. Works for version 1.3-2022.03.09.


LEDs are now blue and red (previously green and red). V1.4 PCB V1.4 PCB back

Image and more info from creationx.de

Serial Flashing

Please see the Hardware Preparation page for general instructions.

Sonoff Basic connection diagram

You need to access the serial interface. The four serial pins (3V3, RX, TX, GND) are labelled. Hold the button while powering to enter flash mode, GPIO0 is also connected to the KEY pad. The LED remains off until the flashing process is done and the board is rebooted.

Alternative to IO2

As an alternative to IO2 you can remove the bi-colour LED and use GPIO13 as input

use gpio13

You can remove the thick wires from the PCB to use the screw connection on the output side for low voltage. Then add a screw terminal next to the relay for the LINE OUT. This keeps all high voltage on one side of the board