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
What is it?
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.
- Auto rebooting of the raspberry.
- Auto call to the EPITECH API and GET a Json at every hours with crontab -e.
- Auto refresh every 5 minutes whether the Intranet is down.
Colours of the light:
- : The room will be occupied in 30 minutes.
- : The room is occupied. (An activity is currently in this room).
- : The room is free.
- Last version of NodeJS.
- Axios v0.8
Just about everything you need is setup for you.
- Import the project into the Raspberry and unzip it.
- Set an internet connection to IONIS or plug it in ethernet.
- Copy launch.sh in the root of your raspberry and add this line in the .bashrc "./launch.sh" and please make that a terminal launch automatically after a reboot (on a RPI3 , add @lxterminal in the auto-start file)
- Get your autolog at this adress (https://intra.epitech.eu/admin/autolog) and replace the token in "YOUR_AUTOLOG_HERE" var in json/index.js. All the job will be done for you !
In case of index.js in the light repository doesn't work after a successful reboot :
- Launch get_rooms.sh at the root of the EpiLight repository
- Please go in the Light repository and launch this command: "sudo node index.js" and let the script run.
In case of crontab failed :
- Set this line after doing a crontab -e -> 0 * * * * "$(command -v bash)" -c 'cd /home/pi/EpiLight && sudo ./get_rooms.sh'
Inside the repository, you can find some files : The JSON folder will contain:
- Call to the Epitech API
The Light folder will contain:
- Each connection associed to the light and the room.
This project is the property of EPITECH.