Smart Room Control and Data Collect Service
-
api: Main API Server
- Flask API Server
- Data Collection
- Device Control
- User Management
-
Redis Server
-
Grafana
-
Relative Projects
-
controller: A/C Controller
- Socket Server
- Receive Command
- Token Authentication
- IR Remote Control
-
sensor: Sensors
- Data Collectction
- Thermo Sensor
- Smart Meter
- CT Sensor
Document: apiary.apib
Online Document: smart-room document
- python 3.7
- docker 19.03.6
Update submodule files
git submodule update --init --remote
When DB schema update, don't forget to update the submodule version
git submodule update --remote
- Create environment file
cp sample.env .env
- Installing Packages & Entering environment
make dev
pipenv shell
- Starting external components
make service_up
- Migrating database
python api/manage.py db init
python api/manage.py db upgrade
- (Optional) Shut down external services
make service_down
- (Optional) Version freeze to generate
requirements.txt
pipenv lock --requirements > requirements.txt
- build docker image
make build
- update the .env file
- run docker-compose
docker-compose up -d
- Add Gateway
- Add Sensor
- Start to upload data with gateway token