Used components:
- ESP8266 ESP-01 Microcontrollers
- Microcomputer running ARM linux
- Wifi router
- Relay
- 3.3v to 5v converter
- Power adapter and stabilizator for esp microcontroller
- Patience
- Lights and light bulbs control
- Heater control
- Cooler control
- Stove control (SIEMENS stove Reverse Engineered :p )
- Curtain control
- TV remote control
- Smart sockets
- Window control
- Water pump control (Water sensor used)
- Current measurement
- Water flow measurement
- CCTV security
- Fingerprint sensor access control (door builtin)
- Fingerprint sensor access control (wireless)
- RFID NFC card access control (Door builtin)
- SIM900 SMS message control option
- PIR security sensor devices
- Face recognition service
ESP-01 devices have two active pins - Led output (GPIO 2) and Switch (GPIO 0)
Connect those pins in a correctly by schematics and record ESP's ip-address. Add ip address to a database of python server app. Send JSON command to a linux server and let him execute the rest thing.
check ip addresses to be used check devices and device commands
Adafruit Fingerprint Sensor pinout
API Testing commands
teting /control/
curl --header "Content-Type: application/json" \
--request POST \
--data '{"command":"test_local","state":1,"action":""}' \
http://127.0.0.1:5000/esp/
testing /control/?args
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 request to raspberry for test:
http://192.168.1.252/esp/ArgToDB/?device_key=<device_key>&command=<sensor_command>&value=<value of water, example 112>
PIR sensor workflow
The command that sensor sends from controllino to raspberrypi
action should change here
The command that triggers the mode of pir work
curl --header "Content-Type: application/on" --request POST --data '{"command":"pir_led_selector_command","state":0,"action":""}' http://192.168.1.252:5000/esp/JsonToArg/
If you change state to 1, Then pir will work