ENVISION is a IoT web application for visualizing your working environment. It gets environmental data by using Raspberry pi 3 and some sensors. This repo is the backend of ENVISION.
ENVISION provides two features,
-
Provide comfort index calculated from sensory data
-
Data visualization of your working environment
Demo Page is here! You can check demo IoT project!
If you want to try ENVISION on your local machine, follow the instructions below.
- Clone this repo
git clone https://github.com/egurinko/envision.git
- Install all dependencies
cd envision
yarn
If you just clone this repo and you immediately would like to use it, use heroku to deploy. All environemtal setting is set for heroku.
-
Go to heroku and make an app with your cloned repo
-
Use add-ons of m-lab mongoDB
-
Get database url and database name
-
Set environmental variable
MONGO_URL = <YOUR DATABASE URL>
DB_NAME = <YOUR DB NAME>
-
Added .env file. It's same as infrastructure setup #4
-
Build and start server
yarn build
yarn start
- /api/envs
- POST
request.body should be array. Inside of array, it should have type property to distingish what it is. type property become table name too. value is just a value.
[ { "type": "CO2", "value": 900 }, { "type": "temperature", "value": 23.4 } ]
- GET Get the all types of data from mongodb. But it get recent 1 hour data.
- POST
- /api/comfort
- POST
It's for cron job to calculate comfort index. You don't have to use this endpoint for sending sensory data.
[ { "key": "CO2", "value": 0.7 }, { "key": "temperature", "value": 0.6 } ]
- GET Get the all types comfort index and total comfort index like below.
- POST
It's for cron job to calculate comfort index. You don't have to use this endpoint for sending sensory data.
- Frontend
Vue/Vuex/Vuetify - BACKEND
Express/mongodb/node-cron - INFRASTRUCTURE Heroku/mLab MongoDB
- SENSORS
Raspberry pi 3 (CO2, temprature, humidity, weight, lux, pressure, color temperature)