dride-core
is a single executable that create the framework to connect to Dride Fleet and App.
Please email us the following config information and we will send you a custom build of dride-core
We've included a demo version of dride-core into this example, it should be used only for testing purposes.
VideoDirMain = "/FULL_PATH_HERE/recordings"
VideoDirSub = "/FULL_PATH_HERE/recordings"
VideoDirEMR = "/FULL_PATH_HERErecordingsEMR"
VideoDirSnapshots = "/FULL_PATH_HERE/snapshots"
ConfigPath string = "/FULL_PATH_HERE/config/settings.json"
- Unit local ip should be 192.168.10.1
- Make sure this packages are installed on your kernel
- FFMPEG
- sed
- hostapd
- Video record should be placed in the following directory structure
.
├── dride-core (place in /usr/sbin/dride-core)
├── config (place in /usr/sbin/)
│ └── settings.json
├── recordings
│ ├── 1649970986
│ │ ├── event.json*
│ │ ├── route.geojson
│ │ ├── thumbs*
│ │ │ └── 0.webp
│ │ └── videos
│ │ ├── 0.mp4
│ │ └── 1.mp4
│ ├── 1650459754
│ │ ├── event.json*
│ │ ├── route.geojson
│ │ ├── thumbs*
│ │ │ └── 0.webp
│ │ └── videos
│ │ ├── 0.mp4
│ │ └── 1.mp4
└──── recordingsSub
└── 1650900000
├── event.json*
├── route.csv
├── route.geojson
├── thumbs*
│ └── 0.webp
└── videos
├── 0.mp4
└── 1.mp4
- Items makred with '*' are automatically generated by dride-core
This file should run upon boot.
# init db with default settings from settings.json
dride-core db init
# will cleanup issue list, they will be populated on each boot
dride-core issues init &
# update setting file on boot
dride-core onBootRefreshSettings
# make sure we enough free space
dride-core cleaner once
# Start Dride Core cleaner (will remove old videos to make room for new ones)
# if you dont have cron in your system you can run dride-core as cron service `/usr/sbin/dride-core cleaner` but for performance reasons it's prefered to use cron.
(crontab -l 2>/dev/null; echo "* * * * * /usr/sbin/dride-core cleaner once") | crontab -
# Start Dride Core event button listener
dride-core buttonListener &
# Start Dride Core ws
/usr/sbin/dride-core ws & /usr/sbin/dride-core monitor $! &
# Ensure emergency video queue is being emptied and transferred to the designated location of emr videos
# if you dont have cron in your system you can run dride-core as cron service `/usr/sbin/dride-core emrVideoTask` but for performance reasons it's prefered
mkdir -p /squashfs/mnt/extsd/recordingsEMR
mkdir -p /squashfs/mnt/extsd/snapshots
(crontab -l 2>/dev/null; echo "*/2 * * * * /usr/sbin/dride-core emrVideoTask once") | crontab -
# Ensure all videos have a thumbnail, this will run every 60 seconds
# if you dont have cron in your system you can run dride-core as cron service `/usr/sbin/dride-core ensureThumbs` but for performance reasons it's prefered to use cron.
(crontab -l 2>/dev/null; echo "* * * * * /usr/sbin/dride-core ensureThumbs once") | crontab -