Skip to content

How to Run

Claude Pageau edited this page Mar 2, 2025 · 39 revisions

Admin with menubox.sh

If you do not wish to see speed camera verbose tracking data you can run menubox.sh

cd ~/speed-camera
./menubox.sh

How to Run and view verbose log messages

Edit config.py and verify variable VERBOSE = True

cd ~/speed-camera
./speed-cam.py
or
./speed-web.py

Ctrl-c to Exit scripts.

If running in background under supervisorctl you can view tail of logs per

./speed-cam.sh log
or
./speed-web.sh log

How to Run

There are several ways to start speed-cam.py and/or speed-web.py

  1. ./speed-cam.sh start can run speed-cam.py and speed-web.sh for speed-web.py as background tasks using supervisorctrl service. ./speed-cam.sh install and ./speed-web.sh install create symbolic links from ~/speed-cam/supervisor to /etc/supervisor/conf.d folder. This is required to initialize supervisorctl.
    IMPORTANT: Make sure no other instances of speed-cam.py and/or speed-web.py are running. Disable any cron jobs or other boot startup processes. For details see link above.

  2. ./menubox.sh is a whiptail menu system that has menu picks to stop, start and display status

  3. ./speed-cam.py or ./speed-web.py runs scripts directly from command line. Useful for debugging. Also eg python3 speed-cam.py

  4. ./speed-cam.sh or ./speed-web.sh will start, stop, restart, install, status, edit, view logs for background tasks so you can exit ssh or terminal session and continue running in background. For Details See supervisor Readme.md

To run speed-cam.py as a background task or on boot from /etc/rc.local then

cd ~/speed-camera
./speed-cam.sh edit
or 
./speed-web.sh edit 

change autostart=true  

Then add line below before the exit line then ctrl-x y to save and reboot to test

/home/pi/speed-camera/speed-cam.sh status

How to Change Settings