Smart Home – Control everything with ESP8266 Series (Part 2)

Tram Ho

overview

In part 1, I briefly introduced the hardware, as well as the pairing.
In this section I will introduce how each part works!
Okay, let’s go!

Operation model

  1. This is the model I use in this series. There are many other ways to implement it, but at the learning level, “instant noodles” I choose this way! Later there will be other series offline!
  2. Let’s go into how it works.
    1. The hardware components that we listed in part 1 are considered as “end-users”, it subscribes to a server.With what value we turn on the device, with what value we will turn off (this is in the code), because So the problem of how to change that value? Okay, if you understand, you already know how to “isolate” hardware and software.
    2. How to change something on the server? Maybe you have more envisioned. Through API alone, simple … There are API already, then we make Mobile App, Web, .. to control is too normal, right?
    3. Examples of models used Realtime Database nay.minh of Firebase-this service to make you always heard qua.Minh to the subscriber ESP8266 status field values on do.Voi status = 0 control relay operation -> lights .with status = 1 control relay off -> turn off the lights. After that I build Android App, Web, Google Assistant, .. to influence this status value (this document reading is easy then .hehe)

summary

In this section, I introduced the most basic and simple operation of a device called smart-control via internet, wifi. In the next section, I will introduce how to code on ESP8266 to turn on and off simply over wifi.

Share the news now

Source : Viblo