This project contiains all the necessary scripts for a TaluBin device to be able to update its current status, mainly the weight of each compartment, the current speed, and the location, together with the images taken from the camera.
Follow the following steps thoroughly.
-
Once there is
ssh
access to the TaluBin device, clone the project to ahome
directorygit clone https://gitlab.com/talubin/talubin-bin-script.git cd talubin-bin-script git branch -M main
-
Create
.env
file in the root directory -
Copy and paste required contents from responsible individuals to
.env
file. It looks something like thisPORT=42000 DATABASE_URI=DatabaseUri BIN_ID=binId
-
Locate the
binstatus.json
file to the root directory. This file structure looks like below{ weight: { blue: 223, red: 234, other: 209.23 }, speed: 23, location: { long: 8.834, lati: 34.23 } }
-
Create
images
folder in the root directory -
Install dependencies
npm install
-
Start the app
npm start