This project is a management platform for Sinotrack ST-90x OsmAnd and Queclink devices developed using Laravel 10, PHP 8.1 and MySQL 8. This comprehensive GPS tracking solution is designed to offer robust performance and an intuitive user interface, suitable for both individual users and companies that need to manage multiple tracking devices. This platform is intended as a possible alternative to Traccar.
- Modern platform with user-friendly interface: The platform uses Laravel 10 to provide a smooth user experience and an attractive graphical interface.
- PHP 8.1 compatibility: Leverages the latest features of PHP 8.1, including performance and security enhancements. It is also compatible with higher versions of PHP.
- Data Management with MySQL 8: Uses MySQL 8.0.12 or higher for efficient and secure management of large volumes of tracking data, as well as extensive support for GIS functionality.
- Real-Time Tracking: Allows users to track the location and status of their Sinotrack ST-90x devices in real time.
- Detailed Reporting: Generates comprehensive reports that aid in decision making and data analysis.
- Alarms and Notifications: Configure custom alarms (geofence, motion, speed, etc...) for specific events related to the tracking devices. Notifications can be configured via Telegram.
- Multi-User Support: Supports the creation of multiple user accounts with different levels of access and permissions.
- Public Environment: If you wish you can generate links for individual trips and share them publicly. You can also directly share a device where all its trips will be publicly visible.
- PHP 8.1 or higher (bcmath bz2 intl mbstring opcache pdo_mysql pcntl redis sockets xsl zip)
- MySQL 8.0.12 or higher
- Redis
You can test the demo version at https://tracker-demo.lito.com.es/
-
Create the database in MySQL.
-
Clone the repository.
git clone https://github.com/ericanderson29/GPS-Tracker.git
- Copy the
.env.example
file as.env
and fill in the necessary variables.
cp .env.example .env
- Install composer dependencies (remember that we always use the PHP 8.1 binary).
./composer install --no-dev --optimize-autoloader --classmap-authoritative --ansi
- Generate the application key.
php artisan key:generate
- Regenerate the caches.
./composer artisan-cache
- Launch the initial migration.
php artisan migrate --path=database/migrations
- Launch the seeder.
php artisan db:seed --class=Database\\Seeders\\Database
- Fill Timezones GeoJSON.
php artisan timezone:geojson
- Configure the cron job for the user related to the project:
* * * * * cd /var/www/tracker.domain.com && install -d storage/logs/artisan/$(date +"\%Y-\%m-\%d") && /usr/bin/php artisan schedule:run >> storage/logs/artisan/$(date +"\%Y-\%m-\%d")/schedule-run.log 2>&1
- Create the main user.
php artisan user:create --email=user@domain.com --name=Admin --password=StrongPassword2 --enabled --admin
-
Configure the web server
DocumentRoot
to/var/www/project/public
. -
Profit!
Updating the platform can be done in a simple way with the ./composer deploy
command executed by the user who manages that project (usually www-data
).
- Clone the repository.
git clone https://github.com/ericanderson29/GPS-Tracker.git
- [OPTIONAL] Copy file
docker/.env.example
to.env
and configure your own settings
cp docker/.env.example .env
- [OPTIONAL] Copy file
docker/docker-compose.yml.example
todocker/docker-compose.yml
and configure your own settings
cp docker/docker-compose.yml.example docker/docker-compose.yml
- Build docker images (will ask for the sudo password)
./docker/build.sh
- Start containers (will ask for the sudo password)
./docker/run.sh
- Create the admin user (will ask for the sudo password)
./docker/user.sh
- Launch the Timezone GeoJSON fill (will ask for the sudo password)
./docker/timezone-geojson.sh
-
Open your web browser and goto http://localhost:8080
-
Remember to add a web server (apache2, nginx, etc...) as a proxy to add features as SSL.
-
If you are going to add or change the default ports for GPS Devices (
8091
) you must edit thegpstracker-app
properties indocker-compose.yml
to adapt them to your own configuration.
- Update the project source
git pull
- Build docker images (will ask for the sudo password)
./docker/build.sh
- Start containers (will ask for the sudo password)
./docker/run.sh
- Open your web browser and goto http://localhost:8080
- By default a server is created for protocol
H02
(Sinotrack) on port8091
. If you wish you can customize this configuration inServers
>List
. - In
Servers
>Status
, we select the server we just created and press theStart/Restart
button. - The server should appear started in the upper listing of
Servers
>Status
. - If the server does not start, we can check the logs generated in the
laravel
folder from theServers
>Logs
menu. - Now we can create a vehicle in
Vehicles
>Create
. We fill in the necessary fields and save it. - Once we have a vehicle, we go to create a device from
Devices
>List
>Create
. It is important to correctly indicate theSerial Number
as it is the identifier that the device will send to the server and by which it can be recognized. We associate it with the vehicle we just created and save. - From here, we only have to wait to receive the first connections from the device to generate the first trips.
- To configure the connection to our server for a Sinotrack device, follow the steps below.
- If you have problems receiving the connection from the device you can go to
Servers
>List
>Edit
and enable debug mode. Once the change is saved remember to restart the server inServers
>Status
.
To configure your device via SMS you can do it with the following command:
804{PASSWORD} {IP/HOST} {PORT}
You can configure the connection server in the device using either the IP or a HOST that will resolve internally BUT ONLY AT THE TIME OF RECEIVING THE COMMAND, so if the server does not have a fixed IP as soon as it changes you will stop receiving data from the device.
{PHONE}{PASSWORD} 1
896{PASSWORD}E00
710{PASSWORD}
803{PASSWORD} {OPERATOR}
804{PASSWORD} {IP/HOST} {PORT}
805{PASSWORD} {SECONDS}
809{PASSWORD} {SECONDS}
SLEEP{PASSWORD} {MINUTES}
151{PASSWORD}
011{PASSWORD}
010{PASSWORD}
777{PASSWORD-NEW}{PASSWORD-OLD}
RESTART
RCONF
php artisan user:create {--email=} {--name=} {--password=} {--enabled} {--admin}
The reset
option allows you to reset the port in case it is being used.
php artisan server:start:all {--reset}
The reset
option allows you to reset the port in case it is being used.
php artisan server:start {--port=} {--reset}