NederlandsKlik deze knop voor de Nederlandstalige website

Sonoff Basic: cheap and hackable DIY WiFi switch

If you think the Sonoff S20 is already an incredibly cheap WiFi switch, then you don’t know the Sonoff Basic yet. For about half the price of an S20, you can already switch a device on or off via WiFi. Where the S20 goes for 10 euros over the virtual counter, the Basic is usually available for around 5 euros on the various Chinese websites.

Like the S20 you can use this switch operate with the eWeLink app (Android / iOS), or with Google Home Assistant, Amazon Alexa, Nest or IFTTT. If you do not want to operate it with a “cloud” -based app or service, the Basic is also easy to hack.

Sonoff Basic: cheap and hackable DIY WiFi switch - unboxing
Sonoff Basic: cheap and hackable DIY WiFi switch – unboxing

The package contains the switch, manuals in English, German and Chinese, and a bag with screws. With these screws, you can attach the cover caps (which also act as strain relief) to the Basic. The Sonoff that we are reviewing here is the second version of the Basic, the “RF R2 Power V1.0”.

Connecting the Sonoff Basic

Unlike the S20, the Sonoff Basic is not plug-and-play, but more a do-it-yourself switch. Where you can simply plug the S20 into a socket, you have to fit the Basic into the wiring. For example, if you want to switch a table lamp, you must place the Sonoff Basic in the wire between the lamp and the plug. You do this as follows:

  1. Cut the wire and strip the ends (not too far).
  2. Find out what the wire color coding is for your country. For most European countries, the neutral wire is blue and the live wire is brown. For the US,  the neutral wire is white and the live wire is black.
  3. Connect the piece of wire with the plug to the Sonoff input: the neutral wire on the terminal marked with N and the live wire on the terminal marked with L.
  4. The piece of wire with the lamp connected to it in the same way at the on the output, also here the neutral wire on terminal N and the live wire on terminal L.
  5. Attach the cover caps (strain relief) to the Sonoff and screw them in. Insert the plug into a socket and check with the push button on the switch whether it works properly.

The Basic has no ground connection. If you still want to switch a device that has grounding, then you will have to route the earth wire outside the Sonoff.

If you have connected everything properly, you can now link the Sonoff to the app.

Linking Sonoff Basic to the eWeLink app

The procedure is described in the English manual. If you want a more detailed description, you can also read the chapter “Link Sonoff S20 to eWeLink app” in the previous article ” Sonoff S20 Smart Socket: easy home automation “, the procedure is the same.

In short, the procedure comes down to this:

  1. Download the eWeLink app for Andriod or iPhone.
  2. Open the app and register a new account, or log in if you already have one.
  3. Plug the plug of the Basic into the socket.
  4. Press the button on the Basic for 7 seconds until the LED starts to flash quickly.
  5. Click on the ‘+’ at the bottom of the screen in the app.
  6. Select on the next screen ‘Quick Pairing Mode’, then ‘next’.
  7. Choose your WiFi network, enter the WiFi password and press ‘next’.
  8. The app will now ‘pair’ with the Basic. If pairing fails, try again. If it still does not work, choose “Try Compatible Pairing Mode”.
  9. If the pairing is successful, you can give the device a name, for example, “Sonoff Basic”. Then press ‘Complete’.

Hackability

The Sonoff Basic is based on the ESP8285 WiFi chip. This is an ESP8266 with 1 MiB flash memory already built in, so a cheaper single-chip version. And also with this device, the serial port on the PCB is available, so that offers possibilities for flashing an alternative firmware.

PCB, top view
PCB, top view

The connection points for GND, 3V3, Tx and Rx are indicated on the PCB on the back.

PCB, serial connection pads
PCB, serial connection pads

By flashing an alternative firmware such as Tasmota on the switch, you can include it in your own IoT network. Then you can, for example, control it via MQTT with Node Red. The possibilities for home automation are endless, we will get to work with it in the next article.

Specifications

  • Voltage range: 90-250v AC(50/60Hz)
  • Max current: 10A
  • Max Wattage: 2200W
  • Dimensions: 88 x 38 x 23mm (L x W x H)
  • Enclosure Material: Fire-retardant ABS
  • Wireless Standard: 802.11 b/g/n
  • Security Mechanism: WPA-PSK/WPA2-PSK
  • Weight: 51.0g

SONOFF® S20 10A 2200W WIFI Wireless Remote Control Socket
Tested and recommended by OneGuyOneBlog.com:

SONOFF® S20 10A 2200W WIFI Wireless Remote Control Socket
Banggood.com

2 Comments