Simple room occupancy observer IoT system based on two PIR modules and node server. blah blah blah...
npm run server
npm run client
Hardware:
- ESP8266 NodeMCU v3
- PIR HC-SR501
Server:
- Express
- Redux
- Socket.io
Client:
- Hyperapp
- nodejs
- Arduino IDE
Used third party libs:
ArduinoJson https://github.com/bblanchon/ArduinoJson
esp8266 https://github.com/esp8266/Arduino
- Install Arduino IDE ( https://www.arduino.cc/en/main/software )
- Install ArduinoJson ( https://github.com/bblanchon/ArduinoJson )
- Open Arduino IDE
- Go to Manage Libraries from Sketch -> Include Library menu (in topbar)
- Search for ArduinoJson
- Select version 5.x
- Install
- ...
- Profit
- Install esp8266 ( https://github.com/esp8266/Arduino#installing-with-boards-manager )
- Should be good
Test data for POST to /update
{
"id": 10,
"deviceId": 15,
"status": "occupied"
}