RioT is an end-of-year project by students at HETIC. The aim of this project is to provide a data capture, storage and analysis solution to make our environment, here in Building A at our school, less energy-intensive and more comfortable.
Front | Back |
---|---|
- Docker
- Php 8.1.2
- Composer
- Symfony 5
- Make
make init
make migrate
make insert-data
make bash
php bin/console lexik:jwt:generate-keypair
chown -R www-data:www-data /var/www
chmod -R 775 /var/www
cp .env .env.local
In .env.local change the variable 'API_MQTT' to
- For Mac chip M1, and other:
http://host.docker.internal:8585/sensor
- For Mac chip Intel :
http://localhost:8585/sensor
API_MQTT
APP_ENV
APP_SECRET
DATABASE_URL
GET /api/user/all
Parameter | Type | Description |
---|---|---|
token |
string |
Required. Your auth token |
GET /api/users/:userId
Parameter | Type | Description |
---|---|---|
token |
string |
Required. Your auth token |
userId |
string |
Required. User target id |
GET /api/user/by?key=value
Parameter | Type | Description |
---|---|---|
token |
string |
Required. Your auth token |
key |
string |
Required. A key |
value |
string |
Required. A value |
Get states of the whole building
GET /states
Get state of place by Id
GET /states /:placeId
Parameter | Type | Description |
---|---|---|
placeId |
string |
Required. Place Id taget |
Get voltage of the whole building
GET /voltage
Get voltage of place by Id
GET /voltage/:placeId
Parameter | Type | Description |
---|---|---|
placeId |
string |
Required. Place Id taget |
Get notification
GET /notification
Get sensor
GET /sensor
Methods POST
POST /api/login_check
Body | Type | Description |
---|---|---|
email |
string |
Required. Your email |
password |
string |
Required. Your password |
POST /api/user
ROLE_ADMIN
Parameter | Type | Description |
---|---|---|
Bearer token |
string |
Required. Your auth token |
Body | Type | Description |
---|---|---|
first_name |
string |
Required. First Name |
last_Name |
string |
Required. Last Name |
email |
string |
Required. Email |
password |
string |
Required. Password |
admin |
bool |
Required. True or False |
POST /api/switch/vent
POST /api/switch/heater
POST /api/switch/climatisation
ROLE_ADMIN
Parameter | Type | Description |
---|---|---|
Bearer token |
string |
Required. Your auth token |
Body | Type | Description |
---|---|---|
place_id |
string |
Required. Place Id |
value |
int |
Required. Value we want to set |
POST /switch/light
ROLE_ADMIN
Parameter | Type | Description |
---|---|---|
Bearer token |
string |
Required. Your auth token |
Body | Type | Description |
---|---|---|
place_id |
string |
Required. Place Id |
ShutDown all device or TurnOn all device
POST /api/switchAll/:action
ROLE_ADMIN
Parameter | Type | Description |
---|---|---|
Bearer token |
string |
Required. Your auth token |
Body | Type | Description |
---|---|---|
action |
string |
Required. For shutdown all : shutdown; For TurOn all : turnOn |
PUT /api/user/update/:userId
ROLE_ADMIN
Parameter | Type | Description |
---|---|---|
Bearer token |
string |
Required. Your auth token |
userId |
string |
Required.User target id |
Body | Type | Description |
---|---|---|
first_name |
string |
Optionnal. First Name |
last_Name |
string |
Optionnal. Last Name |
email |
string |
Optionnal. Email |
password |
string |
Optionnal. Password |
DELETE /api/user/delete/:userId
ROLE_ADMIN
Parameter | Type | Description |
---|---|---|
Bearer token |
string |
Required. Your auth token |
userId |
string |
Required. User target id |
- Github: @DimitriChauvel
- Github: @TisoOfficiel
- Github: @polinzz
- Github: @Nerilus
- Github: @Doud75
- Github: @anthony-rgs