IoT container for Raspberry Pi that handles door opening and luminosity. For storing event data, it consumes IoT server REST API via IoT client.
- Detect door opening and turn on the light if it's dark.
- Detect door closing and and turn off the light.
- Poll luminosity and turn of the light if it's dark and the door is opened.
- Create events in IoT server via via IoT client.
- Door Magnetic Sensor
- LDR
- 0.1uF Capacitor
- 4 x 220Ω Resistor
- 4 x LED
$ npm start
$ npm run lint
$ npm run build
$ docker build -t iot-raspi-door .
Image available on Docker Hub
Configuration:
- Create a
.env
file with this variables
$ ./run-production.sh