Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mikebionic/iot-switch
IoT app with using ESP8266 microprocessors and Linux backend REST server
https://github.com/mikebionic/iot-switch
arduino esp-01 esp8266 flask iot nodemcu opencv plc python smartcity smarthome sqlalchemy web-api
Last synced: about 1 month ago
JSON representation
IoT app with using ESP8266 microprocessors and Linux backend REST server
- Host: GitHub
- URL: https://github.com/mikebionic/iot-switch
- Owner: mikebionic
- Created: 2020-10-13T17:24:49.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-05-11T18:45:37.000Z (over 2 years ago)
- Last Synced: 2024-10-12T16:55:21.353Z (2 months ago)
- Topics: arduino, esp-01, esp8266, flask, iot, nodemcu, opencv, plc, python, smartcity, smarthome, sqlalchemy, web-api
- Language: CSS
- Homepage:
- Size: 24.4 MB
- Stars: 9
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Smart Home Esp controllers registration and control project
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## Device and Systems of the project:
+ [x] Lights and light bulbs control
+ [x] Heater control
+ [x] Cooler control
+ [x] Stove control (SIEMENS stove Reverse Engineered :p )
+ [x] Curtain control
+ [x] TV remote control
+ [x] Smart sockets
+ [ ] Window control
+ [x] Water pump control (Water sensor used)
+ [x] Current measurement
+ [x] Water flow measurement
+ [x] CCTV security
+ [x] Fingerprint sensor access control (door builtin)
+ [x] Fingerprint sensor access control (wireless)
+ [x] RFID NFC card access control (Door builtin)
+ [x] SIM900 SMS message control option
+ [x] PIR security sensor devices
+ [x] Face recognition service--------------
## Documentations:
[Server Side (enUS)](/documentation/server-side_enUS.md)
[Server Side (ruRU)](/documentation/server-side_ruRU.md)
[Server Side (tkTM)](/documentation/server-side_tkTM.md)
[Smart Home (enUS)](/documentation/smart-home_enUS.md)
[Smart Home (ruRU)](/documentation/smart-home_ruRU.md)
[Smart Home (tkTM)](/documentation/smart-home_tkTM.md)
---------------
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.---------------
# Compile and run the ESP8266 microprocessor code
> check ip addresses to be used
> check devices and device commands**Esp8266-01** pinout
![ESP8266-01](datasheet/esp8266-01.png)**NodeMCU-Esp8266** pinout
![NodeMCU](datasheet/NodeMCUesp8266.png)**A4988 Stepper driver** pinout
![A4988](datasheet/A4988.jpg)**Adafruit Fingerprint Sensor** pinout
![Adafruit fingerprint sensor](datasheet/fingerprint-sensor-pinout.jpg)----------------
**API Testing commands**
> teting /control/
```bash
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
```bash
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:
```url
http://192.168.1.252/esp/ArgToDB/?device_key=&command=&value=
```-----
PIR sensor workflow
> The command that sensor sends from controllino to raspberrypi
http://192.168.1.252:5000/esp/ArgToDB/?command=pir_sensor&device_key=ESP_ARDU_MASTER&isMaster=1&action=0
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