My smart home on ESP8266, part 2

The beginning of this series of articles can be found here .





I continue my research in terms of creating a base on the basis of which you can quickly create a smart home without soldering. As I already said, this base is designed for an ordinary application programmer, for example, a front-developer who does not want to delve into the jungle of radio electronics and does not want to solder (well, maybe at a minimum), because there is no time for this. But he wants to create his own devices that can easily be connected to his server and all issues can be solved in a way that he is familiar with from the nature of his work, that is, programming, and on a PC.





So, for the first version of this base, the ESP8266 chip was chosen, on the basis of which the entire smart home will be built.





ESP8266

The ESP8266 microcontroller is self-sufficient, easily programmed as an Arduino (that is, it is C ++ and the Arduino IDE), has Wi-Fi on board, is compact and there are many modifications for different needs. There is also its development, this is ESP32, which is more powerful. In general, the ideal controller. The only drawback is the supply voltage (not five volts, but 3.3 volts).





You can connect different sensors and actuators to the ESP8266 controller via wires (and quite long, several meters) using protocols such as 1-Wire, I2C. Why these particular protocols? Because they are very simple and popular (thanks to Arduino).





That is, the sensor or device is connected via a wire to the ESP8266, which in turn connects via Wi-Fi to your server. The server can be written in any language, for example, on the NodeJS platform. But it is advisable to use ready-made servers, which I will talk about later. Your server will allow you to customize any logic for the smart home.





ESP8266 . . ESP8266 . / . . (, ) ESP8266. ESP8266. 80 , ( , 2.4 ).





. :





Smart home components

-: ESP8266, ESP Easy ( ESP8266), MQTT- ( WQTT.ru ), - WQTT.ru ( , , ), Node RED, MQTT- . Homebridge Homekit.





, homebridge . MQTT- Node RED. .





. MQTT- . ESP Easy Node RED. , .





, ESP8266 GPIO2. . , . : DHT11 BMP085 ( ). 





( Node RED) , Homekit .





. :





Test device

Troyka Wi-Fi ( ESP8266 ESP-12F) . ESP8266. DHT11 , BMP085 , I2C- ( ESP Easy).





, :





Schematic diagram (on part U3, I showed the built-in LED)
( U3 )

. , , , . . .





Arduino, Arduino ESP8266. , 3.3 , . 5 β€” . . HTTP- MQTT-. , .





. . MQTT-.





MQTT-

MQTT- , . - WQTT.ru MQTT- 200 ( , ).  https://www.wqtt.ru/  . , , . Node RED. , . , , WQTT . , . :





Table of devices and sensors on wqtt.ru
wqtt.ru

. , .. .





, MQTT- .





-, . . - .





, ( ) . . MVC, M, Node RED C, V. , .





-, . , , . ESP_Easy/BMP085/Temperature. ( ESP_Easy) ( 5 ) BMP085. Node RED . , Homekit.





, MQTT- . . , .





We have assembled the device. No firmware yet. The broker is set up. Next, we will connect the Node RED, flash the controller and put it all together.








All Articles