-
Notes:
- In the RaspberryPi machine, you may run commands with
sudo
privillage
- In the RaspberryPi machine, you may run commands with
-
How to run the project:
- git clone ...
- go to the cloned directory
- run command
npm i -f
- npm run build
- start using one of the following:
-
npm run start -- --command=os --args=none
-
npm run start -- --command=cooler --args=periodically
-
npm run start -- --command=cooler --args=set-on
-
npm run start -- --command=cooler --args=set-off
-
npm run start -- --command=rig --args=group-a,reset
-
npm run start -- --command=rig --args=group-b,reset
-
npm run start -- --command=rig --args=group-a,set-on
-
npm run start -- --command=rig --args=group-b,set-on
-
npm run start -- --command=rig --args=group-a,set-off
-
npm run start -- --command=rig --args=group-b,set-off
-
npm run start -- --command=board --args=reset
-
npm run start -- --command=internet --args=none
-
npm run start -- --command=motion --args=none
-
npm run start -- --command=sms --args=none
-
-
Set-up startup:
- Run command
npm i pm2 -g
- Run
pm2 startup
then execute the result of the command (something likesudo env PATH...
) - Go to the project directory
- Run the following commands of node in order to add to pm2
- pm2 start --name os_boot "npm run start -- --command=os --args=none"
- pm2 start --name cooler_periodically "npm run start -- --command=cooler --args=periodically"
- pm2 start --name internet_check "npm run start -- --command=internet --args=none"
- pm2 start --name motion_check "npm run start -- --command=motion --args=none"
- Run
pm2 save -- force
- You may use
pm2 monit
orpm2 list
to see what is running in pm2 - You may use
pm2 delete N
orpm2 delete all
to delete application(s) from pm2 - You may use
pm2 stop N
orpm2 stop all
to stop application(s) from pm2
- Run command
-
TODO:
- Convert
Utils.consoleLog
to a class namedlogger
- Add section to run raspberry only on raspbian linux
- Convert