Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mmontes11/iot-raspi-door
IoT container for Raspberry Pi that handles door opening and luminosity
https://github.com/mmontes11/iot-raspi-door
babel docker es6 internet-of-things iot javascript js ldr-sensor magnetic-sensor nodejs npm raspberry-pi raspi sensor
Last synced: 3 days ago
JSON representation
IoT container for Raspberry Pi that handles door opening and luminosity
- Host: GitHub
- URL: https://github.com/mmontes11/iot-raspi-door
- Owner: mmontes11
- License: mit
- Created: 2018-04-10T16:47:41.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-17T21:32:09.000Z (almost 2 years ago)
- Last Synced: 2024-11-08T07:07:12.765Z (about 2 months ago)
- Topics: babel, docker, es6, internet-of-things, iot, javascript, js, ldr-sensor, magnetic-sensor, nodejs, npm, raspberry-pi, raspi, sensor
- Language: JavaScript
- Homepage:
- Size: 426 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# iot-raspi-door
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
IoT container for Raspberry Pi that handles door opening and luminosity.
For storing event data, it consumes [IoT server](https://github.com/mmontes11/iot-server) REST API via [IoT client](https://github.com/mmontes11/iot-client).### Features
* 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](https://github.com/mmontes11/iot-server) via via [IoT client](https://github.com/mmontes11/iot-client).### Components
* [Door Magnetic Sensor](https://www.adafruit.com/product/375)
* [LDR](https://www.adafruit.com/product/161)
* 0.1uF Capacitor
* 4 x 220Ω Resistor
* 4 x LED### Wiring
![wiring](https://raw.githubusercontent.com/mmontes11/iot-raspi-door/develop/wiring/wiring.png)
### Development
```bash
$ npm start
```### Lint
```bash
$ npm run lint
```### Build Image
```bash
$ npm run build
$ docker build -t iot-raspi-door .
```### DockerHub
Image available on [Docker Hub](https://hub.docker.com/r/mmontes11/iot-raspi-door/)
### Production
Configuration:
* Create a `.env` file with this [variables](https://github.com/mmontes11/iot-raspi-door/blob/develop/src/config/production.js)```bash
$ ./run-production.sh
```