Hello, dear readers and guests of the "Notes of an Electrician" website.

In my previous publications, I introduced you to the touchscreen, controlled both manually and from the remote control.

But today I would like to draw your attention to the relay (switch) Sonoff Basic version with the ability to control directly from a mobile phone via Wi-Fi network or the Internet.

The Sonoff Basic relay is a small-sized device (88x38x23 mm) that can be easily placed behind the ceiling space, in a building niche, or in the bowl of a chandelier or lamp.

Its cost at the time of publication of the article is a little less than 300 rubles. As you understand, this is quite acceptable money, moreover, for such a modern device. I got it on the well-known Aliexpress trading platform (the link will be at the end of the article).

The kit included two protective covers with mounting screws, but, unfortunately, there were no instructions.

The Sonoff relay has the following specifications, some of which are displayed directly on its body:

  • maximum controlled load current 10 (A)
  • supply voltage from 90 (V) to 250 (V)
  • standard wireless 802.11 b / g / n
  • WPA-PSK / WPA2-PSK security protocol
  • operating temperature from 0 ° С to 40 ° С
  • weight about 50 g

Sonoff Basic relay capabilities:

  • Wi-Fi load control
  • load control over the Internet
  • load control by a set timer, both with direct and countdown
  • load control from multiple mobile phones

These are the capabilities of the Sonoff relay. It can be safely used in smart home systems and for various other needs and requirements.

First, I will tell you how to connect Sonoff, and then we will check all its declared control methods in practice.

So let's go.

Installing and connecting the Sonoff relay

To operate the Sonoff relay, it needs a supply voltage of 220 (V), which means that it can be easily installed in a convenient place for you, for example, in a chandelier bowl or directly under a stretch ceiling, as well as directly in a junction box, if there is enough space.

For fixing the relay to the surface, it has two mounting holes.

The Sonoff relay connection diagram is very simple.

On the terminals (L) and (N) from the side (Input-Input), respectively, the phase and zero of the supply voltage 220 (V) are connected. Naturally, when connecting, do not forget about.

Please note that the wires to be connected must have a cross-section of no more than 1.5 sq. Mm. But I still tried to connect conductors with a cross section of 2.5 sq.mm. As a result, a rigid (single-wire) wire can still be connected without problems, but a flexible (multi-wire) wire is already inserted into the terminal with great difficulty, so it did not even have to be flattened and deformed a lot.

For example, I used a PVS brand power cable, which just has a cross-section of 2.5 sq. Mm. At the other end of the cable there is a plug, which I will later connect to any outlet with a voltage of 220 (V).

On the terminals (L) and (N) from the side (Output-Output), respectively, the phase and zero of the load are connected.

For the convenience of connecting the load, I connected a socket to the relay output.

By the way, terminal covers not only have a protective function, but also play the role of clamps for supply wires or cables.

This is how everything turns out beautifully and neatly. The Sonoff relay is connected.

As a load, I connected an LED lamp, about in one of my articles.

Here is a simple example of a Sonoff relay connection diagram for a group of luminaires.

By the way, it is not necessary to use only a lamp or a group of lamps as a load. You can safely connect any other load to the output terminals that does not exceed the rated current of 10 (A). And if you still need to control a load with a current value above 10 (A), then it can be connected to a contactor, and with the help of a relay, you can already control the coil of this contactor.

In this regard, it can be added that when using a contactor, it is possible to control at least a single-phase load, at least three-phase, at least with an alternating current, at least a constant one.

It will look something like this.

Thus, the scope of application of Sonoff relays is very wide and varied. It can be controlled by at least one light bulb, at least by a powerful single-phase electric heater, at least by a three-phase electric motor, etc. It all depends only on your needs and requirements.

And now we will consider all the possibilities of controlling the Sonoff relay in more detail.

I will not open the relay and look at its device, there is already plenty of information on this on the Internet - look at the corresponding resources on electronics. And judging by the reviews, the performance of the relay is quite decent. By the way, who is interested to know, the relay is assembled on the basis of the famous Chinese microcontroller ESP8266.

Load control via phone over Wi-Fi

Before I talk about controlling the relay via Wi-Fi, I will say that it can be controlled manually. For this, there is a small recessed black button on its body. So, with one short press of it, the relay turns on, and when it is pressed again, respectively, it turns off. Moreover, for this it is not necessary that the relay be connected to a Wi-Fi network - it will also be controlled in Offline mode.

But in addition to this, the button also carries other functionality, which I will discuss below.

To implement the ability to control the load via Wi-Fi and the Internet, you must install on the phone mobile app eWeLink. This application can be found for both Android and iOS devices. To facilitate the search for the application, you can use the necessary QR codes on the package.

For devices with Android app eWeLink can be downloaded for free from Google play and install it on your phone without any problems. The program interface supports Russian.

For iOS devices this application available in App Store... I have not tried to download and install this application on an iPhone or iPAD, so whoever tried this application on iOS devices, please write down the results in the comments.

After installing the eWeLink application, you will need to register immediately, indicating the country and your email address... In this case, the phone must be connected to the Internet.

After that, a verification code will be sent to the mail (valid for 30 minutes), which must be entered in the corresponding line "Email code". On the same page, you must enter a password to enter your future account (at least 8 characters).

By the way, letters reach the mail services Mail.ru and Mail.yandex.ru (Yandex-mail) without any problems. But as far as I am aware, letters with a verification code do not always reach the Gmail.ru mail service (Google mail), so take this into account.

Then it is necessary to pair the relay and the router by holding (for 5 seconds) the same button on the switch body, after which a green LED will blink on the relay. We put a tick on the first connection mode and click "Next".

Now you need to select our Wi-Fi network from the list and enter the password from it. In order not to enter the password each time, you can check the "Remember password" checkbox. Click "Next", after which the search for our device and its registration will begin (in time it took me no more than 2-3 minutes).

After successful pairing, the relay automatically transmits data to the Chinese cloud (Amazon AWS or Coolkit), which makes it possible to control it over the Internet. But I will return to this a little later.

As you can see, our relay is now displayed in the list of all devices (so far it is the only one in the list, but others will appear very soon).

When the relay is online, the green LED on its housing is always lit. As soon as the LED starts blinking, then the connection with the router or the Internet is lost. It is precisely by this indicator that it is convenient to determine whether the relay is in the network (Online) or not (Offline).

While I was testing this device, I did not notice any problems with losing the network. The device is always online and responds stably to control commands.

Now you can try to turn on the relay through the phone. To do this, click on "Relay 1". Immediately a red inscription appeared that it was necessary to update the eWeLink application, although the update was not displayed on Google Play.

We go into the device settings (three dots in the right corner) and see that the application has the current version 1.5.2, and more a new version 1.5.5. Click on the "Download" icon and the application update begins. After the update, the red inscription disappears, and in the settings we can see a new one current version 1.5.5.

Remember !!! The main condition for the operation of the relay is the availability of Internet access.

If Internet access suddenly disappears, a green LED will start blinking on the relay housing, and the application will display the Offline mode on its tab, i.e. not available for control.

So, to turn on our "Relay 1", you need to enter it and click on the round virtual button in the center of the screen. Moreover, you can control the relay from the general list of all devices by clicking on the corresponding small button (on the left). In general, as you like it.

When the relay is off, the button is white with a fill around it gray background... When the relay is on, the button changes its color to green, and the background around it turns blue.

In addition to banal control principles, you can set the time for switching on or off the relay by timer by setting the appropriate date and time for its control.

Moreover, it was surprising that the relay operates according to a given timer even when it is offline (Offline), which means that all the specified timer programs are stored directly in the memory of the relay.

Click on the "Add timer" button and go to the timer settings page. Each timer is configurable to either turn on the relay or turn it off. There are two options for setting the timer:

  • one-time (one-time operation at a specified date and time)
  • repeated (periodic triggering at a specified date and time, including specifying specific days of the week)

In addition to the countdown timer, there is a countdown timer. Very useful functionality for specific purposes. It is configured similarly to a direct timer, only with the possibility of a single actuation.

In addition to forward and backward timers, there is a cyclic timer in the Settings tab (three dots in the right corner).

In this tab, you can configure various options for the relay triggering cycles. I will not talk about this in detail, tk. everything is simple and intuitive here.

The total number of configured timers, including the cyclic timer, can be no more than 8. And be careful, because when the time of different timers overlaps each other, none of them may work !!!

Also, in the settings, you can specify in which position the relay will remain if the 220 (V) power is suddenly disconnected from it. There are three options here. By setting the appropriate checkboxes, you can choose that when the 220 (V) power supply reappears, the relay can either turn on, or turn off, or remain in its original state.

By the way, this is a very handy feature. Just remember the nuance that, when the 220 (V) power supply disappears and reappears, for some reason it always turns on, even when it is in the off state. And imagine that you are not at home, the voltage in the network "blinked" a little and the controller turned on the chandelier on its own. Such an incident will not happen here, since in this case, everything can be customized to suit your needs.

In addition to the above, all devices connected to you in the eWeLink application can be grouped together and combined in various scenarios.

Is it possible to control the relay from several phones at once?

Can! Naturally, in this case, the eWeLink application must be installed on each phone.

There are two options here. The first option is to enter the eWeLink application under the same name and password from different phones and control the relay.

True, if you enter the application on one phone, and then at the same time enter the application under the same username and password, but on another phone, then an error will occur on the first phone and the application is automatically exited. In this case, the second phone remains in the application and you can use it to control devices.

At the same time, I would like to note that when the relay is controlled from one phone, its status is displayed almost instantly on all phones that are connected to it.

Load management over the Internet

In addition to controlling the relay via a phone via a Wi-Fi network, it can also be controlled via the Internet from anywhere in your location, i.e. absolutely from anywhere in the world where there is Internet access.

So, to control the circuit breaker via the Internet, you need to enter the same eWeLink application under your name and password that you specified during registration. And then everything is by analogy. The same application, the same settings, the same control buttons, etc., the only difference is that you are not at home in the range of your Wi-Fi network, but at a distance of hundreds and thousands of kilometers from home.

A little about the cloud.

However, you will not be able to control the relay without the Internet. control goes not through a local network, but through the Internet, i.e. the same Chinese cloud that I mentioned above. And it doesn't matter if the control is via Wi-Fi or the Internet, the control always goes through the cloud, and access to the cloud requires Internet access.

In this regard, various craftsmen have already figured out how to untie this device from the Chinese cloud or make control only through a local home network. Who cares, then this information can be found on certain resources.

By the way, if you need a similar device, but with the additional function of radio control from the remote control, you can order the Sonoff RF relay.

If you want to control the load where there is no Internet at all, then you can use the Sonoff G1 relay (GSM / GPRS with SIM card support). Also, this manufacturer has available relays with temperature and humidity sensors Sonoff ТН10 / ТН16 and two-channel (for controlling two independent loads) Sonoff Dual relays.

In general, the manufacturer Sonoff has many different devices, I will tell you about some of the most interesting and significant ones on the pages of my site, so subscribe to the newsletter so as not to miss interesting releases.

You can buy Sonoff relay here:

  1. Sonoff Basic: https://goo.gl/jXyNm3
  2. Sonoff RF (radio controlled): https://goo.gl/TRPqN6
  3. Sonoff G1 (GSM / GPRS with SIM card support): https://goo.gl/EkpTdp
  4. Sonoff TH10 / TH16 (temperature and humidity sensor): https://goo.gl/MWAL5p
  5. Sonoff Dual (two-channel): https://goo.gl/a7rV56

And already by tradition, a video based on the materials of the article, where you can more clearly see the configuration and control of the Sonoff relay:

Yes, operating system will allow you to find nearby networks and connect to them, but what about add-ons? What if you need to have detailed information over all the Wi-Fi networks around you, need to fix your network problems, turn your laptop into a portable Wi-Fi hotspot, or stay safe on public hotspots? Windows won't help you with all this.

That's why we found six apps for you. They do everything that Windows can't, and more. Five out of six apps are free, while the sixth is not expensive at all.

MetaGeek is an excellent tool for finding and collecting information on Wi-Fi networks in the area where your computer is located. It is also useful in solving problems with your own Wi-Fi network.

For all found Wi-Fi networks, InSSIDer shows the MAC address of the router, the manufacturer of the router (if the program can determine it, it usually can), the channel used, SSID or public name of the network, security type, network speed, and the like. In addition, the program shows the current signal strength of the network.

How would you use the program to solve problems with your wireless network? Seeing that a nearby network with a strong signal is operating on the same channel as you, you would change the channel of your network (most routers will allow this) to avoid potential conflicts.

The program also allows you to identify the “dead zones” of your area, where there is no sufficiently reliable Wi-Fi signal. To do this, just walk around your home or office with InSSIDer enabled. In the future, you can either avoid these places, or try to rearrange your router.

Regardless of what you need - to solve problems with your network or find Wi-Fi hotspots to connect - InSSIDer is the program that you will want to download and try.

Price: Free
Compatibility: Windows XP, Vista and 7 (32- and 64-bit)
Download InSSIDer

Here is another great program for finding Wi-Fi networks and providing information on them, such as their distance from you. A radar-like screen shows all nearby hot spots. A separate panel offers detailed information on all found hot spots, including signal strength, network type (for example, 802.11n), router manufacturer, transmission channel, etc.

Next to the radar, the panel provides even more detailed information on the network you are currently connected to, including your personal IP address, external IP address, DNS, gateway information, and more.

Why use Xirrus Wi-Fi Inspector over MetaGeek InSSIDer? For example, because the Wi-Fi Inspector's simpler layout makes it easier to present information on hotspots. The program also shows the relative physical distance of you from the hotspot. And, probably, no one will deny the usefulness of the radar itself.

However, InSSIDer is better than Xirrus Wi-Fi Inspector in terms of getting more detailed information on surrounding Wi-Fi networks.

Price: Free
Compatibility: Windows XP SP2 +, Vista and 7
Download Xirrus Wi-Fi Inspector

Is beautiful free program, which allows you to turn a Windows 7 computer (the program only works with Windows 7) into a Wi-Fi hotspot, which can then be used by nearby devices - such as a smartphone or colleagues' tablets.

Of course, the computer itself that you would like to convert into a Wi-Fi hotspot must be connected to the Internet and support Wi-Fi. At the same time, the connection to the Internet does not have to be wired at all (although it does not interfere), because the Wi-Fi card of a computer can perform a double function - on the one hand, it acts as a Wi-Fi receiver, and on the other, as a transmitter.

Setting up a hotspot is simple: Once connected to the internet, launch Connectify, give your hotspot a name and set a password. After that, the Wi-Fi card of your computer will start broadcasting a Wi-Fi signal to which other devices can connect. It is worth noting that your computer will operate using the Wi-Fi protocol for which it was created. In addition, it will also support earlier protocols. So, for example, an 802.11n signal will allow connecting devices with 802.11b / g / n.

Setting a password will restrict outsiders' access to the Internet. The hotspot signal itself is protected by WPA2-PSK encryption.

You can even use Connectify to set up a local network without an external Internet connection. Run the program as a hotspot and nearby devices will be able to connect to its network, even if you have no Internet access. This can be used, for example, for transferring files within a workgroup or for multiplayer games.

It's worth noting that connecting my Mac to a Windows 7 computer based hotspot and Connectify caused me problems. However, other computers and devices connected without problems.

The century of progress and high technologies is already knocking on every home. Today, every home has a computer, as well as a bunch of mobile devices: tablets, smartphones, netbooks, transformers (netbooks with a removable touch screen or tablets with docking stations) and other devices. It is not surprising that already now many have the ability to control various devices through. From lighting to other household electrical appliances. Such installations are called "Smart House" and were known already in the early 2000s, but only gained popularity among ordinary users today, when wireless technologies became available to a wide mass of users.

Some general information

It should be noted right away that to control light, TV, refrigerator, air conditioner, microwave oven or any other electrical appliance, we need a special station or relay. They are different types, with different features and functions. For example, the cheapest devices are made in the form of an outlet with a remote control. remote control... That is, you plug the "Wireless Socket" into a regular outlet (to connect to the power supply). V wireless device turn on the compressor for the pond (for example, sunsun aco overview, etc.), and using the remote control you can turn it off or on. Everything is very easy and very simple!

But there are more expensive and advanced devices that allow you to control household appliances through special applications on tablets and smartphones. In this case, the connection can occur both in the local network and remotely via the Internet.

As you understand, it is simply impossible to describe everything in one article, so we will analyze only two types of Smart Home devices. Controlling computer functions via Android via Bluetooth.

"Wireless" socket

The word "wireless" here means that you can connect to it via Wi-Fi and regulate its operation. Let's consider how such gadgets work, using the example of a device from the Edup company. This is a Chinese company, but it produces fairly high quality products.

How to use such an outlet?

  1. We connect the device to the power supply network (to a regular outlet).
  2. There is a button on top of the device. Press and hold it until the Wi-Fi indicator starts blinking (if you hold the button, but another icon is constantly blinking, then release the button and press briefly again). Thus, we switched the device to the mode of searching for Wi-Fi networks in order to bind to the router.

Now we turn to the tablet or smartphone (with the help of which the remote control). In our case, the app is called Edup Wi-Fi. After installing the application on your tablet, you will have to register.

After that, go to the application using your username. But now there will not be a single device in it: the fact is that you need to add equipment manually, so we exit the application.

Now open the settings of your smartphone (tablet) and go to the "Wi-Fi" section. We turn on the adapter. When the system offers a list of available devices to connect, find your "wireless" outlet and connect to it. The connection we need is named "Wifino1". After we have connected to the device, we return to the Edup WiFi application.

Here you need to click the "Settings" button, which is located at the very bottom of the screen on the right. Next, click "Initialize Device". Above, information about the connected device will be displayed: and the name.

Below you will need to enter the name of your Wi-Fi network in the field. You need to enter exactly as indicated in the router, with all characters, uppercase or lowercase letters, and so on. The name must match absolutely. And, accordingly, we enter the password for your Wi-Fi network.

After that we press the "Start" button. The phone will start sending the required commands to the Wi-Fi socket. You just have to wait for the pairing to be completed. When this happens, the indicator on the outlet itself, which was previously blinking, will stop blinking and will remain on continuously.

Now when you enter the Edup WiFi app again, the Devices section will contain your wireless socket connected to the router. Opposite the name there will be a button, when pressed, the device will turn on or off. As you can see, managing your household appliances via Wi-Fi is a fairly simple and quick process.

"Wireless" relay

The second gadget that will allow you to control the light in the house via Wi-Fi is a relay. This equipment is more powerful, which can withstand more high loads... In this case, everything works directly. That is, the relay itself distributes Wi-Fi, to which you need to connect and then launch the appropriate application and control the operation of the relay in the program.

You don't need to make any special settings. The relay is supplied with setup instructions and a disk with the necessary software. In fact, a relay is virtually indistinguishable from a socket. But if you can control the outlet via the Internet, then the relay requires a direct connection via Wi-Fi or Bluetooth.

There are other options for "Smart Homes" with which you can configure the control of all household electrical appliances at once. But the cost of such equipment will be appropriate and affordable to few people.

Using the Wi-Fi menu, you can quickly connect to a nearby wireless network.

If your network is not listed, make sure the router is close and others can connect to this access point. It could also be. To connect to a hidden network, select Connect to another network.

The signal strength of each of the nearby networks is displayed next to its name. The more dark bars, the stronger the network signal.

enter password

Access to networks with a lock next to their name, password protected... After selecting the network, enter its password in the appeared login window. If you do not know the password, ask the owner of the Wi-Fi network you are trying to connect to.

Connecting to a Wi-Fi network using a mobile device

Depending on the service plan you're using, an iPhone or iPad with a cellular connection may provide an Internet connection for your Mac. When your iOS device is near your Mac, it appears in the Wi-Fi menu as an available connection.


  1. From the Apple menu, choose System settings».
  2. In the System Preferences window, click Network.
  3. Select Wi-Fi from the list of available network connections.
  4. Check the box next to Show Wi-Fi status in menu bar.

Network creation

If you want to create a temporary Wi-Fi connection between your Mac and another device, you can create your own network using the Wi-Fi menu.

  1. Click the Wi-Fi menu and select Create Network.
  2. Enter network details such as network name and channel.

When you create a computer-to-computer network, the menu icon changes to a computer icon (). When finished, click the Wi-Fi menu again and select Disable.

Original: How to manage a WiFi connection from the command line
Author: Adrien Brochard
Publication date: August 14, 2014
Translation: A. Krivoshey
Date of transfer: December 2014

When you install a new Linux distribution on your computer, it is always recommended to first connect it to the internet using a wired network. There are two good reasons for this: firstly, there may not be a suitable driver for your wireless adapter in the distribution kit, and secondly, if you install a system without a graphical interface, setting up Wi Fi in the command line scares many. I always try to avoid communicating with Wi Fi on the command line. However, there is no place for fear in the Linux world. If you don’t know anything, this is a great reason to study this subject. So I overcame myself and decided to master Wi Fi control in the Linux command line.

Of course, there are several ways to connect over Wi Fi on the command line. However, for the purposes of this post, I will try to apply the basic method: one that only uses the programs and utilities included in the "default packages" of any distribution. Obviously, the advantage of this method is that it can potentially be reproduced on any computer with any Linux. Its disadvantage is that it is quite complex.

So first, it is assumed that you have the correct drivers loaded for your wireless network card. Without this, nothing will work.
Then you can check which network interfaces wireless connections support with the command:

Typically, the wireless interface is called wlan0. There are, of course, exceptions, but for the purposes of this tutorial, I will use a common notation.
Just in case, check that the interface is turned on:

$ sudo ip link set wlan0 up

When you know that your interface is working, you can search for available wireless networks with the command:

$ sudo iw dev wlan0 scan | less


From the output, you can find out the name of the network (SSID), the signal strength and the type of security used (that is, WEP, WPA / WPA2). There are two options here. The simplest and easiest if the network is not secure. In this case, you can immediately connect to it:

$ sudo iw dev wlan0 connect

If your network uses WEP encryption, it's also quite simple:

$ sudo iw dev wlan0 connect key 0:

But if your network uses WPA or WPA2, things get more complicated. In this case, you need to use the wpa_supplicant utility, which is not always preinstalled on the system. You need to open the file /etc/wpa_supplicant/wpa_supplicant.conf and add the following lines to it:

Network = (ssid = "" psk = "" priority = 1)

I recommend adding them to the end of the file and making sure other configurations are commented out. Be careful as both ssid and password are case sensitive. You can enter the name of the access point instead of ssid, and wpa_supplicant will replace it with the corresponding ssid.

After completing the configuration, run this command in the background:

$ sudo wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf

Now you need to get the IP address using the command:

$ sudo dhcpcd wlan0

If done correctly, you should get a new IP address via DHCP and the process will run in the background. You can always check for a connection with the command:


In conclusion, I think mastering this method is well worth the effort. You can never be sure that you always have a graphical interface or a wired connection available, so it is important to be prepared for these situations. As stated earlier, there are many ways (Network Manager, wicd, netcfg, wifi) to manage your wireless connection. I have chosen the most general method, although in certain cases the utilities that I have used may not be available, and you will need to download them first. On the other hand, there are much more advanced programs that are definitely not included in the default package, but make the configuration process a lot easier. It's a good idea to learn the basics anyway.

Wireless data transmission technology local area networks Wi-Fi appeared in 1998 thanks to the engineer of the Australian laboratory of radio astronomy CSIRO John O'Sullivan. The first standard for the wireless communication protocol IEEE 802.11n was approved in 2009.

During its development, Wi-Fi technology has gained widespread popularity, primarily due to the lack of the need to use wires when connecting to a network. And if initially Wi-Fi technology was used to connect wearable and handheld computers, now this technology has penetrated both cameras and household appliances, and in multimedia devices, and in control devices. Wireless sensors of various physical quantities - temperature, pressure, humidity, etc. are widely used. Monitoring and control devices " smart home»Equipped with Wi-Fi modules, can carry out their functions from any point where a local wireless network is available, and if this network through a router has the ability to access the global network - and from any point where there is Internet. With the help of his smartphone connected to the Internet (via Wi-Fi or GSM), the user can not only browse websites, but also control household appliances located at any distance from him.

The standard Wi-Fi network scheme contains at least one access point that forms a wireless network with a known identifier (SSID) and encryption parameters, to which at least one client is connected. An access point can be either a specialized device or one connected to global network a router equipped with a wireless radio module. Also, for example, a laptop or smartphone equipped with Wi-Fi modules and connected to the network using a cable or GSM technology, respectively, can act as an access point.

In this review, we will consider some modules offered by Master Kit that use wireless Wi-Fi technology... Some modules are intended for use in DIY projects, come as a printed circuit board with components and do not have enclosures, while others are made as complete devices and are designed to be used out of the box. It should be noted that each of the considered devices is a client of the wireless network, therefore, an access point is required to connect them to the network. You also need to pay attention to which network the device connects to - local or global. Many Wi-Fi devices use portals located on the global network to communicate with other such devices and exchange information. This method of communication makes it possible to simplify the connection, since it does not require a permanent dedicated IP address of the global network and relatively complex network settings such as NAT (port forwarding) for external access to the local network located behind the router's firewall.

For ease of comparison, the main characteristics of the devices are summarized in the table at the end of the review.

We will start our review with DIY-modules Master Kit using Wi-Fi technology.

  1. - Wi-Fi relay with thermometer and two relays.

The device is based on the widespread Wi-Fi module ESP8266. The module is a microcontroller equipped with a wireless interface. It supports IEEE 802.11 b / g / n standards, with WEP and WPA / WPA2 encryption. The module also has 11 user-accessible I / O ports and wired communication interfaces SPI, I2C, I2S, UART and a 10-bit ADC. Several free development kits (SDKs) are available with a compiler and libraries to take advantage of the ESP8266's capabilities.

All this made it possible to create a modern device for mobile control of various electrical appliances using smartphones or tablets.

As already noted, the module is designed to work in local networks. If it is necessary to use access to the global network, then the following device will help with this.

  1. - Internet relay with a thermometer and two relays using the MQTT server.

The Network Protocol MQTT (Message Queue Telemetry Transport) is a lightweight protocol for transferring data between devices and runs over TCP / IP. This protocol uses a behavioral messaging design pattern known as publisher-subscriber, is very easy to use and easy to administer, does not create heavy loads on communication channels and successfully works in the presence of problems in these channels, and also does not impose restrictions on the format of the transmitted data. MQTT is designed for low-power embedded devices, so it requires minimal processing power that microcontrollers can handle. Thus, the MQTT protocol is, along with some other similar protocols, for example MODBUS or RS-485, an excellent tool for implementing the functions of the "Internet of Things" - IoT.

Remote control of two relays, 2000 W each;

Reception and transmission to the network of readings of two DS18B20 temperature sensors connected to it;

Receiving and transmitting readings of DHT11 or DHT22 humidity sensors, analog sensors using the built-in ADC.

But, in addition, it provides data reading from sensors and control of built-in relays via the Internet at any point, there is a connection to the global network. When working in the global network, a free MQTT server is used, by default, but another one can be used.

  1. If the previous two devices use the capabilities of the ESP8266 microcontroller, then the module has its own more powerful microcontroller of the STM8 series and is a device for collecting and transmitting data over Wi-Fi.

The use of the STM8 microcontroller made it possible to implement a very wide functionality in a small volume. The module is, on the one hand, a complete device for collecting data on consumed household resources, such as water, heat, gas, electricity, and on the other hand, it is a multifunctional device for monitoring and controlling executive modules and mechanisms.

The device collects data from the sensors and meters connected to it according to the established schedule and transmits this data to the server for further processing and use.

Up to 8 devices can be connected to one device in any combination:

Water meters;

Gas meters;

Electricity meters (when installing an additional CAN or RS-485 interface module);

Temperature sensors, for example;

Water leakage sensors, for example;

Liquid level sensors;

Gas leakage sensors;

Actuators (shut-off and control valves with an electric drive), for example, a ball valve with an electric drive.

When using additional built-in modules of RS-485 or CAN interfaces, in addition to the 8 devices listed above in the description, up to 8 Mercury-type electricity meters can be connected to one module, in addition to the 8 devices listed above.

Modules can be combined to increase the number of served data collection channels.

The device collects data from meters and sensors and transmits them to a server located in Russia according to the schedule set in the settings. In normal mode, data is sent once a day with hourly detail. If an emergency is detected (the water meter has turned off, a leak has occurred, the battery runs out, etc.), the device communicates immediately and informs the owner about it using PUSH or E-MAIL notifications... A personal account of each user is organized on the server.

V personal account you can specify on what day and hour the server will automatically send readings every month. Readings can be sent in the following ways: as PUSH notifications, in the form of E-MAIL, directly to the MOS.RU portal. Forget the hassle of manual monthly readings!

Alternatively, you can simply watch the readings and graphs on your mobile phone, tablet or computer using a browser or mobile application for iOS and Android.

The module is powered by three AA alkaline batteries, duration autonomous work at least 3 years. When the charge level drops below 10%, a PUSH or E-MAIL notification will be sent to the user.

The device communicates with the server using an Internet connection via a private or public encrypted Wi-Fi network. Two networks can be used: main and backup. In the absence of communication, the device collects and stores an hourly log for 1 month, when it is resumed, it transmits data to the server. In any abnormal situation (the device does not communicate, there is a leak, a break in the communication line to the sensor or meter, etc.), the server will send you a PUSH or E-MAIL notification.