Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

mikebionic/IoT-Switch

Open more actions menu

Repository files navigation

Smart Home ESP Controllers Registration and Control Project

Latest production-ready version: 09/2020 – 06/2022 Deployment: Smart Home automation system in "16-njy Tapgyr" and "Gorjaw" residential areas.

Smart Home System


Overview

A complete Smart Home automation platform built on ESP8266 microcontrollers and an ARM-based Linux server. The system supports local and remote control, integrates with multiple IoT devices, and features security, monitoring, and automated comfort adjustments.

Core features:

  • MQTT-like device communication between IoT modules and a Raspberry Pi server.
  • Automatic local network mode when connected to home Wi-Fi; internet-based remote control when away.
  • Flexible device integration — from lights and curtains to heaters, ovens, and security systems.
  • Multi-layer security with fingerprint, RFID, and motion detection.

Used Components

  • ESP8266 ESP-01 Microcontrollers
  • Microcomputer (ARM Linux, e.g., Raspberry Pi)
  • Wi-Fi router
  • Relays
  • 3.3V → 5V converter
  • Power adapter & voltage stabilizer for ESP modules
  • SIM900 GSM module (for SMS alerts)
  • Various sensors: PIR, water leak, gas, temperature, current, and flow measurement.
  • And yes — a bit of patience.

Devices & Systems in the Project

  • Lights & light bulbs
  • Heater & cooler
  • Stove (SIEMENS stove reverse-engineered)
  • Curtains
  • TV remote control
  • Smart sockets & window control
  • Water pump control (with water sensor)
  • Current & water flow measurement
  • CCTV security
  • Fingerprint access control (built-in & wireless)
  • RFID/NFC card access control
  • SIM900 SMS control option
  • PIR security sensors
  • Face recognition service

Security Features

  • Entrance doors equipped with RFID and fingerprint sensors.

  • Automatic logging of entry events with timestamp and captured photo.

  • Motion detection with failed-attempt recognition.

  • Instant alerts to the mobile app and via SMS for:

    • Unauthorized access
    • Fire, gas, or water leak detection
  • Backup power for continued operation during power outages.


Example Device Integrations

  • Kitchen devices controlVideo | Cooker
  • Curtain controlVideo | Curtains
  • Lights controlVideo | Lights

Documentation


ESP8266 Pinouts & Hardware References

ESP8266-01 ESP8266-01

NodeMCU ESP8266 NodeMCU

A4988 Stepper Driver A4988

Adafruit Fingerprint Sensor Fingerprint Sensor


API Testing Examples

POST control command

curl --header "Content-Type: application/json" \
     --request POST \
     --data '{"command":"test_local","state":1,"action":""}' \
     http://127.0.0.1:5000/esp/

POST JSON to arguments

curl --header "Content-Type: application/json" \
     --request POST \
     --data '{"command":"test_local_json","pins":[{"command":"switch_mirror","action":"1"},{"command":"switch_AI","action":"activate"}]}' \
     http://127.0.0.1:5000/esp/JsonToArg/

Browser GET example

http://192.168.1.252/esp/ArgToDB/?device_key=<device_key>&command=<sensor_command>&value=<value>

PIR Sensor Workflow

From Controllino to Raspberry Pi:

http://192.168.1.252:5000/esp/ArgToDB/?command=pir_sensor&device_key=ESP_ARDU_MASTER&isMaster=1&action=0

(action changes depending on sensor state)

Trigger PIR mode:

curl --header "Content-Type: application/json" \
     --request POST \
     --data '{"command":"pir_led_selector_command","state":1,"action":""}' \
     http://192.168.1.252:5000/esp/JsonToArg/

Mobile App Screenshots

Morty Proxy This is a proxified and sanitized view of the page, visit original site.