Building Automation & SMART HOME based on ESP8266 microcontrollers & Raspberry pi platform

Home (building) automation may decrease home maintenance costs or reduce wasting and definitely increases comfort of the household members

Reason of the project:

Creation of this project has been motivated by author's hobby. Electronics, programming and networking it's a great mix when almost everything may be done especially having Internet of Things (IoT) support.


Project approach:

This project does not use "ready to go" devices dedicated for home automation. The project is based on microcontrollers ESP8266 which may be freely programmed in programming languages, like in this case, C++. Thanks to that ESP8266 may be used in many roles and do whatever you want.


Place of implementation:

This project has been implemented in two-floored house with basement. It also covers backyard, garden and estate gate and gateway. It does use home WiFi network. Portable module may be used everywhere on our Globe where GSM coverage exists.


Technologies used:

  • Hardware platform: RaspBerry PI.
  • Operating System: Linux.
  • IoT based approach.
  • ESP8266 microcontrollers.
  • Devices communication based on WiFi 2.4 GHz (TCP/IP stack) and wired.
  • Programming languages: C,C++,C#.
  • Programming environment: Arduino IDE.
  • Database: SQLite.
  • API: JSON.
  • EasyIoT framework.
  • Integration with GSM network.
  • PBX support, using IVR and caller white-listing (access control), based on Asterisk software.
  • Integration with Google Sheets for data collection and automated analyses (outside/inside temperature humidity, device statistics).
  • Artificial Intelligence (AI): Google Assistant with IFTTT


Main features:

  • Scalability.
  • Ability to integrate with any device (e.g. amplifier, went, TV, garden pump, lockers etc.).
  • User Interface (UI) for control through Mobile, Tablet or PC (EasyIoT Server).
  • Integrated with Google Assistant (controlling devices by voice commands).
  • Graphs of stored data in User Interface.
  • Designed to limit WiFi radiation.
  • Real Time on-boarded with Daylight saving time support.
  • Went, heating and dry control and automation:
    • kitchen: cooking went triggered manually or by automation. Trigger up in automation mode: temperature above stove higher 5° C than local environment ( floot level). Went efficiency: up to 750 m³/h (500 Pa). Trigger down: opposite. Automation modes: active, not active.
    • bathroom went automation. Trigger up: Relative humidity (RH) higher than 70% however Absolute Humidity (AH) in bathroom must be less than AH outside & no human presence detected for at least 10 minutes. Trigger down: RH lower than 55% or AH bathroom same or less as AH outside or by virtual button (active for 15 min). Automation modes: active, not active.
    • toilet: 10 minutes went triggered by manual button.
    • bedroom: triggering dehumidifier if humidity higher than comfort level (PN-78/B-03421).
    • Went mode #1: whole level: went triggered by Virtual button for programmed time (went efficiency: up to 1060 m³/h). Low temperature air injection protection.
    • Went mode #2: whole level. Dedicated for warm, summer nights to have cool fresh air for better sleep. Trigger up: temperature inside higher than 3° C than outside and is higher than 25° C and not lower than 18° C.
  • Devices control:
    • Radio/amplifier control: manual button, virtual button and time triggered up. Trigger down: timer or button (virtual or manual).
    • Light control based on virtual button + dusk sensor to trigger lights (energy saving).
    • Night light (soft light) control.
    • Garden pump control:
      • Direct control through UI or Automation used: turn ON garden pump every X hour(s) for Y minutes (up to 59 minutes). Electricity tariff mode: Electricity tariff mode ON then garden watering between 10 PM and 6 AM and between 1 PM and 3 PM as agreed with Electricity supplier (electricity saving mode).
  • Gas and Carbon Monoxide detection.
  • Leak detection.
  • Estate gate and gateway automation control based on GSM with IVR and white-listing, Virtual and physical buttons.
  • Weather station: twilight, rain, temperature, humidity, barometer sensors.
  • Using 5 V power supply with micro USB socket (compatible with mobile chargers or power banks).
  • Portable module to perform and log measurements anywhere in the world.


In deployment & planned features:

  • Integration with central heating system.
  • SMS and email notification.
  • Home alarm based on PIRs + laser sensor for backyard (in deployment).
ESP8266
Pic. 1. Micro-controller ESP8266
Pic. 2. Own made electronic board
Pic. 3. Electrical relay (230V) combined with ESP8266
Pic. 4. Raspbery PI platform
Pic. 5. Asterisk software Logo