The second innovation project in EPITECH. 🆕 🎉.
This project was made in NodeJS and combined with a Raspberry PI3 with <3 by Hugo WALTER, Kévin FERCHAUD, Clément DA-PURIFICACAO and Maxime BOURMAUD
EPILIGHT is a system able to connect to the EPITECH Intranet and display a light whether a room is free or taken in the 2 stages in EPITECH NANTES.
Current features:
- Auto rebooting of the raspberry.
- Auto call to the EPITECH API and GET a JSON at every hour.
- Auto refresh every 5 minutes whether the Intranet is down.
Colours of the light:
: The room will be busy in 30 minutes.
: The room is busy. (An activity is currently in this room).
: The room is free.
Just about everything you need is setup for you.
- Set an internet connection to IONIS or plug it in ethernet.
# Pull the project
$ git clone https://github.com/HugoWALTER/EpiLights.git
# Get your autolog at this address (https://intra.epitech.eu/admin/autolog) and replace the token into the service.
$ nano epilight.service and replace YOUR_TOKEN_HERE with your autolog
# Install dependencies
$ npm install
# Copy service into systemd
$ cp epilight.service /etc/systemd/system/epilight.service
# Enable service
$ systemctl enable epilight.service
# Start service
$ systemctl start epilight.service
All the job will be done for you !
In case of index.js in the EpiLights repository doesn't work after a successful reboot :
- Please check the status of the service ("systemctl status epilight.service")
- Please go in the Epilights repository and launch this command: "node index.js" and let the script run.
In case of the connection crashed :
- An auto-refresh condition is setup for you to call the intranet each minute to update the rooms.
A room is missing ?
- Only add the room in the config.js and setup GPIO port for the room
Inside the repository, you can find some files : The JSON folder will contain:
- Call to the Epitech API
The Manager folder will contain:
- Each connection associated with the light and the room.
The config.js file will contain:
- Naming of the rooms in Epitech Nantes and their GPIO port