-
Notifications
You must be signed in to change notification settings - Fork 173
How to Run
If you do not wish to see speed camera verbose tracking data you can run menubox.sh
cd ~/speed-camera
./menubox.sh
Edit config.py and verify variable verbose = True
cd ~/speed-camera
./speed-cam.py
There are several ways to start speed-cam.py and/or webserver.py
-
./run.sh can run speed-cam.py and websever.py as background tasks using supervisorctrl service. This will attempt autostart if running. Logs are sent to /var/log/ ./run.sh install creates 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 webserver.py are running. Disable any cron jobs or other boot startup processes. For details see link above. -
./menubox.sh is a whiptail menu system that has menu picks to stop, start and display status
-
./speed-cam.py or ./websever.py runs scripts directly from command line. Useful for debugging. Also eg python3 speed-cam.py
-
./speed-cam.sh or ./webserver.sh will start, stop, status programs as background tasks so you can exit ssh or terminal session and continue running in background
To run speed-cam.py as a background task or on boot from /etc/rc.local then
cd ~/speed-camera
./speed-cam.sh start
or to run on boot edit /etc/rc.local file using nano editor per command below
sudo nano /etc/rc.local
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 start
exit 0
Edit the speed-cam.sh script to suit your needs per comments.
Note you may need to change the sleep delay time if rc.local does not run script
successfully at boot, since services may need more time to start.
To Run using python3 perform the following (Note you must have opencv setup for python3) NOTE: IMHO operation under python3 is not faster compared to python2. I recommend you run under python2
sudo apt-get install -y python3-pip
sudo pip-3.2 install -y Pillow
python3 ./speed-cam.py
if you get opengl error then install support library per following command then reboot.
sudo apt-get install libgl1-mesa-dri
also on raspberry pi 3's activate opengl support using
sudo raspi-config,
From 9 Advanced Options select AA GL Driver then enable driver and reboot
Wiki Home
Description, Issues, Features
How to Install or Upgrade
How to Run
How to Calibrate
Change Settings and Plugins
How to Tune Motion Tracking
Setup RTSP Camera
rclone Remote Storage File Transfer
How to View Speed Data
How to Generate Graphs
How to Run speed-search.py
How to Start on Boot
How to use run.sh
watch-app.sh Remote config
How to Manage Sqlite3 Database
How to move speed-camera to ext drive
How to use OPENALPR with speed camera
Github Repo