Giter Site home page Giter Site logo

gaskoo1 / gps-tracker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from eusonlito/gps-tracker

0.0 0.0 0.0 10.23 MB

GPS Tracker platform for Sinotrack ST-90x, OsmAnd and Queclink devices built with Laravel 10 + PHP 8.1 and MySQL 8. Plataforma GPS Tracker para dispositivos Sinotrack ST-90x, OsmAnd y Queclink creada con Laravel 10 + PHP 8.1 y MySQL 8.

License: MIT License

Shell 0.08% PHP 86.52% HTML 0.56% Blade 12.81% Dockerfile 0.04%

gps-tracker's Introduction

Castellano

GPS Tracker (Laravel 10 + PHP 8.1 + MySQL 8)

Open source GPS device management platform 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 simple alternative to Traccar.

Supported Devices

  • Sinotrack: Confirmed ST-90X models using the Sinotrack protocol.
  • Coban: TK303G model confirmed using GP103 protocol.
  • Concox and JimiLab: JM-LL01 model confirmed via GT06 protocol.
  • Queclink: Confirmed model GV500MA using Queclink protocol.
  • OsmAnd: Using HTTP OsmAnd protocol.

Features

  • 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.

Requirements

  • PHP 8.1 or higher (bcmath bz2 intl mbstring opcache pdo_mysql pcntl redis sockets xsl zip)
  • MySQL 8.0.12 or higher
  • Redis

Demo

You can test the demo version at https://tracker-demo.lito.com.es/

Local Installation

  1. Create the database in MySQL.

  2. Clone the repository.

git clone https://github.com/eusonlito/GPS-Tracker.git
  1. Copy the .env.example file as .env and fill in the necessary variables.
cp .env.example .env
  1. Install composer dependencies (remember that we always use the PHP 8.1 binary).
./composer install --no-dev --optimize-autoloader --classmap-authoritative --ansi
  1. Generate the application key.
php artisan key:generate
  1. Regenerate the caches.
./composer artisan-cache
  1. Launch the initial migration.
php artisan migrate --path=database/migrations
  1. Launch the seeder.
php artisan db:seed --class=Database\\Seeders\\Database
  1. Fill Timezones GeoJSON.
php artisan timezone:geojson
  1. 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
  1. Create the main user.
php artisan user:create [email protected] --name=Admin --password=StrongPassword2 --enabled --admin
  1. Configure the web server DocumentRoot to /var/www/project/public.

  2. Profit!

Upgrade

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).

Docker Installation

  1. Clone the repository.
git clone https://github.com/eusonlito/GPS-Tracker.git
  1. [OPTIONAL] Copy file docker/.env.example to .env and configure your own settings
cp docker/.env.example .env
  1. [OPTIONAL] Copy file docker/docker-compose.yml.example to docker/docker-compose.yml and configure your own settings
cp docker/docker-compose.yml.example docker/docker-compose.yml
  1. Build docker images (will ask for the sudo password)
./docker/build.sh
  1. Start containers (will ask for the sudo password)
./docker/run.sh
  1. Create the admin user (will ask for the sudo password)
./docker/user.sh
  1. Launch the Timezone GeoJSON fill (will ask for the sudo password)
./docker/timezone-geojson.sh
  1. Open your web browser and goto http://localhost:8080

  2. Remember to add a web server (apache2, nginx, etc...) as a proxy to add features as SSL.

  3. If you are going to add or change the default ports for GPS Devices (8091) you must edit the gpstracker-app properties in docker-compose.yml to adapt them to your own configuration.

Docker Upgrade

  1. Update the project source
git pull
  1. Build docker images (will ask for the sudo password)
./docker/build.sh
  1. Start containers (will ask for the sudo password)
./docker/run.sh
  1. Open your web browser and goto http://localhost:8080

Initial Configuration

  1. By default a server is created for protocol H02 (Sinotrack) on port 8091. If you wish you can customize this configuration in Servers > List.
  2. In Servers > Status, we select the server we just created and press the Start/Restart button.
  3. The server should appear started in the upper listing of Servers > Status.
  4. If the server does not start, we can check the logs generated in the laravel folder from the Servers > Logs menu.
  5. Now we can create a vehicle in Vehicles > Create. We fill in the necessary fields and save it.
  6. Once we have a vehicle, we go to create a device from Devices > List > Create. It is important to correctly indicate the Serial 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.
  7. From here, we only have to wait to receive the first connections from the device to generate the first trips.
  8. To configure the connection to our server for a Sinotrack device, follow the steps below.
  9. 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 in Servers > Status.

Device connection

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.

Common Sinotrack ST-901 SMS commands

Configuring the Phone from which you can connect to the device

{PHONE}{PASSWORD} 1

Set the time zone to UTC to delegate the time adjustment to the platform.

896{PASSWORD}E00

Enable GPRS Mode

710{PASSWORD}

Configure APN Operator

803{PASSWORD} {OPERATOR}

Configure Server

804{PASSWORD} {IP/HOST} {PORT}

Configure frequency in seconds of sending position reports with the car ignition on

805{PASSWORD} {SECONDS}

Configure frequency in seconds of sending position reports with the car ignition off

809{PASSWORD} {SECONDS}

Set timeout before switching to SLEEP mode when the car is stopped

SLEEP{PASSWORD} {MINUTES}

Deactivate call in case of alarm

151{PASSWORD}

Enable Device Low Battery SMS

011{PASSWORD}

Disable Device Low Battery SMS

010{PASSWORD}

Password change

777{PASSWORD-NEW}{PASSWORD-OLD}

Device restart

RESTART

Show current configuration

RCONF

Platform Commands

User Creation:

php artisan user:create {--email=} {--name=} {--password=} {--enabled} {--admin}

Start or Restart all configured servers:

The reset option allows you to reset the port in case it is being used.

php artisan server:start:all {--reset}

Start or Restart only one server port:

The reset option allows you to reset the port in case it is being used.

php artisan server:start {--port=} {--reset}

Screenshots

Screenshots are in english, you can change the system language to spanish.

screencapture-tracker-2023-11-22-09_36_09 screencapture-tracker-2023-11-22-09_36_27 screencapture-tracker-trip-2023-11-22-09_36_37 screencapture-tracker-trip-59-2023-11-22-09_37_23 screencapture-tracker-trip-59-stat-2023-11-22-09_37_30 screencapture-tracker-trip-59-map-2023-11-22-09_37_38 screencapture-tracker-trip-59-position-2023-11-22-09_37_47 screencapture-tracker-trip-59-merge-2023-11-22-09_37_54 screencapture-tracker-refuel-2023-11-22-09_38_13 screencapture-tracker-refuel-58-2023-11-22-09_38_20 screencapture-tracker-maintenance-2023-11-22-09_38_25 screencapture-tracker-maintenance-2-2023-11-22-09_38_30 screencapture-tracker-maintenance-2-item-2023-11-22-09_38_35 screencapture-tracker-maintenance-item-2023-11-22-09_38_40 screencapture-tracker-vehicle-2023-11-22-09_38_45 screencapture-tracker-vehicle-1-2023-11-22-09_38_50 screencapture-tracker-vehicle-1-device-2023-11-22-09_38_56 screencapture-tracker-vehicle-1-alarm-2023-11-22-09_39_02 screencapture-tracker-device-2023-11-22-09_39_08 screencapture-tracker-device-1-2023-11-22-09_39_13 screencapture-tracker-device-1-transfer-2023-11-22-09_39_20 screencapture-tracker-device-map-2023-11-22-09_39_30 screencapture-tracker-alarm-2023-11-22-09_39_36 screencapture-tracker-alarm-2-2023-11-22-09_39_42 screencapture-tracker-alarm-create-2023-11-22-09_40_33 screencapture-tracker-profile-2023-11-22-09_40_39 screencapture-tracker-configuration-2023-11-22-09_40_49 screencapture-tracker-user-2023-11-22-09_40_55 screencapture-tracker-user-1-2023-11-22-09_41_03 screencapture-tracker-user-session-2023-11-22-09_41_09 screencapture-tracker-server-status-2023-11-22-09_41_58 screencapture-tracker-server-1-2023-11-22-09_42_07 screencapture-tracker-server-log-2023-11-22-09_42_13 screencapture-tracker-timezone-2023-11-22-09_42_22 screencapture-tracker-shared-trip-11da6b7b-88bd-11ee-b488-4cedfbcaec68-2023-11-22-09_42_50 screencapture-tracker-shared-device-066b1953-88bd-11ee-b488-4cedfbcaec68-2023-11-22-09_42_57

gps-tracker's People

Contributors

abosaad11 avatar eusonlito avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.