cd server;
# will drop the old database automatically.
./setup_db.sh
cd server;
pip install -r requirements.txt;
python3 server.py
cd fire-detect;
pip install -r requirements.txt;
# start all camera devices
./start_devices.sh DeviceA DeviceB DeviceC DeviceD DeviceE
cd hardware;
# start all temperature devices
# start real device
python3 temperature_device.py DeviceA
# start mock devices
./start_devices.sh DeviceB DeviceC DeviceD DeviceE
cd console;
yarn;
yarn run dev;
http://localhost:5173/console/
cd fire-detect;
./stop_devices.sh DeviceB DeviceC;
cd hardware;
./stop_devices.sh DeviceB DeviceC;
# wait for 5 seconds, then we see DeviceB and DeviceC are offline
cd fire-detect;
./start_devices.sh DeviceB DeviceC;
cd hardware;
./start_devices.sh DeviceB DeviceC;
# then refresh web console, we can see they are online
cd fire-detect;
./stop_devices.sh DeviceA DeviceB DeviceC DeviceD DeviceE;
cd hardware;
./stop_devices.sh DeviceA DeviceB DeviceC DeviceD DeviceE;