Hello, friends
In today’s review, I will talk about a very interesting smart socket BlitzWolf BW-SHP2 — which has every chance of becoming the best choice for use in a smart home running Home Assistant.
Buy BlitzWolf BW-SHP2 Wi-Fi outlet on Aliexpress

Introduction
In the first part of the review, I will talk about the capabilities of this outlet out of the box, the second part of the review will be devoted to its integration with Home Assistant, for this you need to make a little effort — nothing complicated, but you need a soldering iron.
Let’s start with the main parameters, because of which this gadget attracted my attention
Voltage range — 110–240 V
Maximum load current — 16 A
Maximum load power — 3840 watts
Control Interface — 2.4 GHz Wi-Fi
Management application — Smart Life, Tuya Smart, integration with Amazon Alexa, Google Assistant and IFTTT.
Supply
The outlet is supplied in a simple box, green with white. Bangood store, from which the parcel came, responsibly reacted to the packaging, everything came safe and sound. Of the identification marks — the name of the model, the manufacturer’s logo and a sticker with brief parameters on one of the ends of the box.


Inside the box, in addition to the outlet, there is still a small instruction in English. Frankly, I never opened it.

Design
The device is made in the socket format, Type F, or Schuko with a grounding contact. At the top there is a single button, combined with an LED indicator.


Everything is made very high quality from special non-combustible plastic, the plug is thick — for very old old outlets you may have to slightly expand the holes.
The grounding contact — through from the main outlet, its presence in combination with the ability to work with currents up to 16 A, will make it possible to use this outlet with very powerful devices.


It keeps tightly in the socket, does not stagger, does not fall out. Everything looks quite aesthetically pleasing.

application
For control, out of the box, the Smart Life or Tuya Smart application is offered. They are identical, but Tuya has integration with Home Assistant. To add a new device, you need to go to the sockets section and start the connection wizard. From the first start, the socket itself goes into pairing mode, if this did not happen, hold down the button on the socket for 5 seconds.



After that, you need to enter the connection parameters to the Wi-Fi network, wait for the connection process to complete, and select a location. All this reminds Mihome.



I will not describe the plug-in in detail, everything is standard here — manual on and off control, timer, setting the shutdown time. A device through a tuya smart account syncs with Amazon Alexa, Google Assistant and IFTTT



An interesting tab is Electrics. It has the current voltage values in the mains, the load — not only the power in watts, but also the current value in Amperes, daily value in kW * h, monthly values.
By going to the menu of the month of interest — you can see the values of consumed energy by day. This is the most interesting thing to drag out in the Home Assistant.


Home assistant
Those who follow my reviews know that the Tuya Smart application has support in the Home Assistant — for this, you need to write your account settings in the configuration.yaml file. And all devices are automatically pulled into the system.
But unfortunately, not everything is so simple — the outlet really appears in the Home Assistant — but only as a switch and that’s it


Parameters such as power, voltage and current are not transferred to the Home Assistant. Therefore, you need to look for other ways.

Flashing
Naturally, such an interesting outlet was noticed long before me. It is supported by such popular alternative firmware as Tasmota or ESPUrna. These are excellent and applicable firmware but they do not quite suit me — as they are managed through the MQTT broker.


The problem is not the broker, especially since I use it actively, but because with this scheme, the socket is rigidly attached to one server, but I don’t need it — I use several, today three, functionally mirrored servers, each of which is capable of fully managing the entire smart home alone. This provides redundancy, fault tolerance and the possibility of painless tests. But it also requires the possibility of parallel control of any device, each of the servers. Therefore, I will use the ESP Home platform. I spoke in more detail about its installation in this video.
Disassembly
To begin with, the socket needs to be disassembled, and here the first difficulty begins — the screws fastening the case have a triangular notch for the screwdriver bit. The complete bit from the mijia wiha 24 in 1 set — perfectly suited for this task, the set once again helped me out and proved its usefulness


The case is opened, so the inner world of the hero of our review looks like. As for me, the build quality is at a high level, and from experience I can say that the Blitzwolf brand really makes excellent products. Relay — valid for 16 A, operating voltage up to 250 Volts


The device’s brain is an ESP 8285 controller combined with a wi-fi module. It does not say that it is 8285, I had to google a little — it is necessary for firmware.

As far as I understand, this microcontroller is responsible precisely for the energy monitoring function

Connection
In search of pinouts, I found out that there are at least two hardware revisions, I got the second one. At least I did not have to find out experimentally.

I simplified the connection a bit — by soldering the power and ground contacts not to the comb of the controller, but to the signed conclusions on the board.

TX and RX are two central contacts, on the other side there are 6. I remind you that you need to connect to the programmer as follows — power and ground to the contacts of the same name, and the data bus — on the contrary — the TX controller on the RX programmer and similarly with another pair.

To put the controller into flashing mode, you need to solder the jumper — on the back of the module — output I00 to GND — ground.

The hardware preparations are completed, in fact, the soldering itself took 5 minutes, much faster than finding the necessary information, we proceed to create the firmware.

USB to TTL UART converter on the PL2303 chip — ALIEXPRESS
Create firmware
In the ESPHomeLib dashboard — create a new project and name it somehow.

Next, select the hardware platform — Generic ESP 8285 module

We indicate the name of the wi-fi network and the password for connecting to it, as well as enter the password to connect to the device.

The final step in creating a project

And now the programmer with the outlet connected to it is plugged into the USB port — in my case, the Raspberry PI 3B odoplatnik

In the dashboard in the upper right, select the firmware method through the programmer and click Upload

As they once wrote when installing Windows — sit back and wait. While the necessary libraries are downloaded, the binary is compiled — it may take about ten minutes. The firmware itself is poured pretty quickly.


After a successful firmware, just in case, I still did not solder the contacts, I just turned off the programmer and removed the jumper. After that I connected it to the network. About a minute later, the project showed online status.

Due to the fact that this outlet has already been investigated earlier, it was not difficult to find its pinout, which is necessary to create a config. I used this description –

To create energy monitoring sensors, I used an example from the ESPHomeLib project website

As a first approximation, I got such a config file. The passwords are actually in the clear, I replaced them with asterisks, I specified manual receipt of the IP address for the network parameters, turned on the web server, added a relay switch on the GPIO14 pin and, for example, the conclusions for the HLW8012 sensor.

The next firmware was already in the air. After it, I unsoldered the contacts and assembled the socket into the case, so the calibration stage began.

Calibration
After this firmware, a web server became available at the outlet address, with a relay control button and voltage, current and power sensors. Which without tuning gave absolutely insane values, how do you like the voltage in the network at 564 Volts?
For calibration, I used a household wattmeter — which at that moment showed approximately 228 Volts, in our network the voltage is really above the norm always. I’m unlikely to achieve absolute accuracy, but such monitoring will be enough


The socket and the power meter were connected to the same socket, the same loads were used.

According to the instructions on the project website, two attributes voltage_divider and current_resistor are used for calibration. They have default values, which must be changed during calibration.

It is easy to calculate that if at 564 Volts the attribute parameter is 2351, then for the correct value it should be reduced by more than half. For several attempts, empirically, I managed to bring the value to the wattmeter as close as possible. In my case, voltage_divider is 945.
The second question is about double the power. Following a similar principle, but using the current_resistor attribute and the default value of 0.001, the desired value is selected.


Until the maximum power value is obtained.

More precisely, it can be adjusted at a powerful load — for example, an electric kettle. The parameters are almost identical at low load, at large they show a very decent difference — about 10%.


As a result of several changes, I settled on a value of 0.00218 which gave an almost identical indicator with a power meter.

This is the final version of the configuration file, which I stopped at the moment.
esphomeyaml: <br /> name: blitzshp2 <br /> platform: ESP8266 <br /> board: esp8285 <br /> <br /> wifi: <br /> ssid: 'Network name' <br /> password: ' network password '<br /> manual_ip: <br /> static_ip: 192.168.0.92 <br /> gateway: 192.168.0.1 <br /> subnet: 255.255.255.0 <br /> <br /> # Enable logging <br /> logger: <br /> <br /> # Enable Home Assistant API <br /> api: <br /> password: 'connection password' <br /> <br /> ota: <br /> password: 'connection password' <br /> <br /> <br /> web_server: <br /> port: 80 <br /> <br /> switch: <br /> - platform: gpio <br /> name: "bw_relay" <br /> pin: GPIO14 <br /> id: relay <br /> sensor: <br /> - platform: hlw8012 <br /> sel_pin: <br /> number: GPIO12 <br /> inverted: True <br /> cf_pin: GPIO04 <br /> cf1_pin: GPIO05 <br /> current_resistor: 0.00218 <br /> voltage_divider: 945 <br /> current: <br /> name: "bw_current" <br /> unit_of_measurement: A <br /> voltage: <br /> name: " bw_voltage "<br /> unit_of_measurement: V <br /> power: <br /> name:" bw_power "<br /> unit_of_measurement: W <br /> change_mode_every: 1 <br /> update_interval: 10s <br />cf_pin: GPIO04 <br /> cf1_pin: GPIO05 <br /> current_resistor: 0.00218 <br /> voltage_divider: 945 <br /> current: <br /> name: "bw_current" <br /> unit_of_measurement: A <br /> voltage: <br /> name: "bw_voltage" <br /> unit_of_measurement: V <br /> power: <br /> name: "bw_power" <br /> unit_of_measurement: W <br /> change_mode_every: 1 <br / > update_interval: 10s <br />cf_pin: GPIO04 <br /> cf1_pin: GPIO05 <br /> current_resistor: 0.00218 <br /> voltage_divider: 945 <br /> current: <br /> name: "bw_current" <br /> unit_of_measurement: A <br /> voltage: <br /> name: "bw_voltage" <br /> unit_of_measurement: V <br /> power: <br /> name: "bw_power" <br /> unit_of_measurement: W <br /> change_mode_every: 1 <br / > update_interval: 10s <br />unit_of_measurement: V <br /> power: <br /> name: "bw_power" <br /> unit_of_measurement: W <br /> change_mode_every: 1 <br /> update_interval: 10s <br />unit_of_measurement: V <br /> power: <br /> name: "bw_power" <br /> unit_of_measurement: W <br /> change_mode_every: 1 <br /> update_interval: 10s <br />
As for the value of the current strength, I did not touch it, although it is not displayed correctly. In extreme cases, if I need it, then in a second we can make a sensor that will divide the value of the power sensor by the value of the voltage sensor, thereby giving current.
Integration
Home Assistant is fully compatible with ESPHome, and automatically detects a new device, which will be available in the Settings — Integration menu. By clicking on a new device, you can, although not necessarily, register its IP address, or you can leave a name, the main thing is to register the password specified when creating the binary. After that, all sensors and switches will be available.


Using a ready-made power sensor, I created an energy monitoring card, according to the principle described in the video — Energy Monitoring in Home Assistant, and decided to use it to analyze the energy consumption of the washing machine.
Conclusion
Apart from the moments associated with flashing and calibration — this is a very interesting version of the outlet for integration into the Home Assistant system, which will be used not only for management, but also for monitoring — both the consumption and activity of the devices. A relay on 16A, allows you to use it even with very powerful loads. Thanks for attention.