Language: EN

tu-casa-domotica-con-los-dispositivos-sonoff-de-itead

Your smart home with Itead's Sonoff devices

Today we are going to look at Itead’s Sonoff products, very interesting devices that offer an attractive and very affordable alternative for turning your home into a smart home.

There is no doubt that smart homes and IoT are trending. Some popular examples include controlling lighting, climate control, monitoring energy consumption, or intrusion, fire, or water leak alarms, among many other examples.

Major manufacturers like Samsung, Apple, or Philips are well aware of this trend and are developing their solutions for smart homes and IoT. However, in general, they are excessively expensive, closed, and with immature development.

In contrast to the early attempts by major manufacturers, the range of Sonoff products from Itead is positioned as a low-cost and very well-implemented alternative, which is why it is gaining great popularity.

This small (by comparison) company has managed to develop a growing family of cheap devices that work perfectly and are easy to use, and that we can integrate into our home ourselves to add a domotic component.

Additionally, Sonoff products have integration with major voice assistants such as Google Home or Alexa. We can even integrate them with other cloud services through the popular IFTTT application.

Finally, for more advanced users and makers, it is possible to overwrite the original firmware of the Sonoff device and program our own code, or use one of the alternative firmware developed by the community. Let’s take a look at some of the main products.

Let’s see a list of some of the devices in the Sonoff family and the options we have for their use from the mobile application.

Sonoff Devices

WiFi Relay

Surely the main and most well-known component of the Sonoff family is the WiFi-controlled relay. Its use is very simple, we simply power the device from the primary, and on the secondary it will receive current when the relay is activated.

sonoff-rele

The relay also incorporates a button to switch the relay manually. In addition to being convenient in various situations, it is an essential measure to protect us from possible WiFi failures.

There are other variants, such as the one that incorporates a temperature and humidity sensor, for example to automatically activate a fan, or a humidifier, open a window, control the temperature of an aquarium, or activate an alarm, an irrigation system, etc., or those that incorporate an RF remote control.

sonoff-rele-variante

On the other hand, there are also 4 or 8-channel relay modules that allow us to turn on multiple devices easily.

Additionally, we also find a wide variety of plastic boxes, some of them waterproof and suitable for outdoor use, to house the Sonoff relay.

sonoff-cajas

WiFi Switch

If we want to control the lighting in our house, perhaps the most suitable device in the Sonoff series is the WiFi-controlled switch. There are variants of single, double, or triple switches.

sonoff-interrutpor

This switch behaves similarly to a normal touch button, that is, we can activate the switch manually. But it adds the possibility to turn on, turn off, and know the status of the light point.

The aesthetics are quite pleasant (although there will be tastes for everything). It has a protective glass with a blue light that shows the status of the switch. The switch is touch-sensitive, so it has no moving parts.

It should be noted that the switch requires its own power supply (AC230V), but in most of the switches in our homes we only have one of the phases. Therefore, we must run an AC cable from the nearest junction box.

There are no switched or crossed versions. But it is not necessary, as we can achieve this behavior through WiFi functionality. (in fact, we could even control a lamp by acting on the switch without the cable even reaching it!)

WiFi Bulb Holder

A simple option to automate any light point, a simple socket that we place between the bulb and the original socket, and allows us to turn it on or off from our mobile phone.

sonoff-casquillo

This option is very simple, and can be useful, for example, if we cannot run the power to the previous switch, if we want to take a light point from a power outlet, or even to be able to turn off only some of the lights in a lamp.

WiFi Plug Socket

This option is the simplest for controlling the on/off of any device connected to a power outlet. A WiFi-controlled socket, which we place between the power outlet and the electrical device.

sonoff-enchufe

It is interesting to note that, since the application allows us to time the WiFi device, this simple device also replaces traditional timers.

WiFi-RF Gateway

A very interesting device, which allows us to control radio frequency devices controlled with a 433Mhz remote control, such as some air conditioners, alarm systems, etc.

sonoff-pasarela-rf

When setting up this device, we must press the buttons on the remote control that we want to “clone”. The gateway will learn the signals, and we can use the same functions as with the remote control.

However, it will not work with garage remotes or other security remotes, as they use a rotating code (precisely so that they are not copied).

Another interesting use of the RF gateway is to add a variety of wireless sensors. Many cheap alarm systems incorporate sensors (motion, door opening, flooding, fire). They are not normally large alarm systems, but with the gateway we can incorporate these sensors and use them for other purposes (such as turning on a light, or whatever we imagine).

SC WiFi Station

A very interesting device, which incorporates light level, sound, dust, air quality, temperature, and humidity sensors, in a compact format.

sonoff-sc

It is designed both to monitor the state of our home at all times and from anywhere, and to perform automatic actions (turn on or off other devices, send an alert, etc.) when a variable exceeds a value.

What we miss

The Sonoff range is quite complete and growing rapidly. But, to say something, we miss the IR gateway, which allows us to control devices controlled by infrared remotes (the TV, my air conditioner, the Roomba).

We also miss a WiFi thermostat, which allows us to turn the boiler on or off, change the setpoint. It would be a great addition to the family, especially combined with the Sonoff SC, and would rival other thermostats such as the famous Nest.

So, you know Itead! Get working. We want a thermostat and an IR gateway!

Sonoff Application

The control of all Sonoff devices is done through a single mobile application available for Android and iPhone. Its simplicity and good performance is one of the strengths of the Sonoff range.

Once the application is downloaded and our user account created, we must pair the devices we have. Here, the simplicity of the solution stands out, especially when compared to other IoT products from “major brands” (I have tried some, and pairing was a real horror).

sonoff-emparejar

All devices in the series incorporate a pairing button and an LED indicator. When pressed, the light on the device will start flashing, and we can search for it from the mobile application.

After a few seconds, the application will find the new device and add it to our window. That easy!

Depending on the type of device we have added, it will create a widget in the application with the actions it can perform.

sonoff-aplicacion

We can share the devices with other people, so that all family members can use them. We can even share but set permissions for certain actions, for example in the case of children.

On the other hand, the application takes care of updating the device’s software. If there is a new version of the software available on a device, it will notify us, and we can update the firmware in seconds with just the press of a button.

The application also allows us to add timers and countdowns to control all devices. For example, we can automatically turn off all lights at a certain time, turn on an irrigation system, among many other uses.

sonoff-temporizacion

Another very interesting option is the “Scenes” function, which are flows of actions that are triggered when an event occurs. For example, if motion is detected, turn on these two devices, or if I press this switch, also turn on this relay.

sonoff-escenas

If we combine all the functions, the amount of options we can perform is practically infinite. Especially if, as we mentioned, it is possible to add integration with voice assistants, or more complex workflows through IFTTT.

Reprogramming the Device

If all the available options in a standard way are not enough for you, or if you love tinkering with your best maker spirit, it is possible to reprogram these devices with your own code.

If we look inside the Sonoff devices, they mount an Espressif processor like the well-known ESP8266 or the ESP8285, both already known in the blog, and that we can reprogram with the same tools as an Arduino.

The advantages of reprogramming the device are several. Customize behavior, integrate it with our own projects, add sensors or actuators (motors, servos, etc). We also gain in security and privacy, and protect ourselves from the day that Itead’s servers stop working.

However, we also lose some things, such as integration with certain cloud services and (unless you have a server set up) access from outside the local network.

Reprogramming the Sonoff device is an advanced procedure, which requires soldering (a little, but it requires), and knowledge of computer science, especially to give the best use to the available options. However, the task has been greatly simplified thanks to firmware designed by the community for Sonoff devices, such as ESPurna developed by Xose Perez, or Tasmota developed by Theo Arends.

On the other hand, we can use these devices even for functions other than those they were used for. In fact, a Sonoff relay is a good way to buy and modify an ESP8266 that we can plug into AC230V, in a compact plastic box, which we can add to our electronic and robotics projects.

Conclusion

The Sonoff range is a simple and inexpensive way to domotize the home. The normal options give us an almost infinite number of combinations, especially if we take into account the timing function and the scenes.

In addition to the usual and well-known relays, we have a large number of less known devices, such as switches, power outlets, a sensor station, and an RF gateway that allows us to add many more sensors. Although we miss a thermostat and an IR gateway.

For more daring users, it is possible to reprogram the devices with one of the firmware developed by the community, and integrate them with other Open Source developments (Home Assistant, your MQTT server).

Finally, we can also use these devices as a programmable processor (usually the relay) and include it in our electronic and robotics project.

As you can see, these are very interesting devices with endless possibilities. In future posts, we will look at the process of changing the firmware of Sonoff devices.