Code Monkey home page Code Monkey logo

php-tracks-recorder's People

Contributors

balu- avatar danmed avatar habi avatar jeppetrost avatar jerry1970 avatar mauricesvay avatar mbirth avatar tbolick avatar tomyvi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

php-tracks-recorder's Issues

Add TID to popup

Would it be possible to add the TID to the Marker popup?

I have it tracking 3 phones and i'd like to know which one is which :)

How does app get map data?

I see a reference to map_points.php which is not in the repository. Very nice framework. How does the app get map data?

less data points sent by client

Thanks for posting this project. Great work.

My owntrack is only providing these fields:
{"batt":85,"lon":-71.xxxx,"acc":65,"p":100.028526,"vac":10,"lat":42.xxxx,"topic":"owntracks/mqtt/sjf_iphone","t":"u","conn":"w","tst":1541,"alt":100,"_type":"location","tid":"sf"}

and is missing these: cog, desc, event, rad. So database fails to write and code returns 500 to client.

It would be best to change the code so that each field is initialized to null/false/blank that way the db will write correctly if fields are not sent by client and won't fail.

Feature idea, like Grouptrack

I really like the idea of a self hosted server to gather the data, nice work.

I saw the #9 issue and it made me think if it would be possible to copy the Garmin GroupTrack feature and allow to see others on the watch or to navigate to them live.

If you think it would be feasible, I could maybe look into it.

time stamp problem

Hi, I got the code to work. However, the record_log.txt shows an error about "duplicate location found for epoch". All of the time stamps are having the same number. Here is my config.inc.php:

`<?php

//RENAME TO config.inc.php

setlocale(LC_TIME, 'de_DE.utf8');

//overland / owntracks
$_config['recorder'] = 'owntracks';

// MySQL / MariaDB
$_config['sql_type'] = 'mysql';

$_config['sql_host'] = 'localhost';
$_config['sql_user'] = '***';
$_config['sql_pass'] = ****';
$_config['sql_db'] = '***';
$_config['sql_prefix'] = '';

// SQLite
//$_config['sql_type'] = 'sqlite';
//$_config['sql_db'] = 'owntracks.db3';

$_config['log_enable'] = True;
    $_config['default_accuracy'] = 1000; //meters
$_config['default_trackerID'] = 'all';

$_config['geo_reverse_lookup_url'] = "http://193.63.75.109/reverse?format=json&zoom=18&accept-language=fr&addressdetails=0&[email protected]&";

$_config['geo_reverse_boundingbox_url'] = "http://nominatim.openstreetmap.org/reverse?format=json&osm_type=W&osm_id=";

?>`

I've tried different settings for setlocale(). Does not have any effects. I'm using the latest git version.

I would be happy for any support!

Best regards
Sven

Nothing being recorded in the db

Hey, i was trying to make something like this myself, but gave up when i found yours..

I'm trying to get it going but my client on Android isn't logging anything in the database.. it's also not returning any type of http code in the client status..

any ideas?

Edit : I've just found this in my php logs :

PHP Fatal error: Uncaught Error: Call to a member function bind_param() on boolean in /var/www/html/maps/record.php:38\nStack trace:\n#0 {main}\n thrown in /var/www/html/maps/record.php on line 38

Edit 2: Fixed it.. you'r specifying a table called log_locations in record.php rather than using the prefix from the config.inc.php... i'll do a pull and fix that if you like?

Geo Location entries in config

Hey, i know you said you were working on this.. is that why there are documented geo location settings in the config or are they for something else?

Owntracks app reports 'error HTTP Response 500'

I've set up php-tracks-recorder on my server. When visiting /record.php, I get this:

[{"_type":"cmd","action":"action","content":"No data to read"}]

In the Owntracks app (on iOS), I have setup 'Authentication' to 'off', and have the app point to /record.php on my server. The status as reported by the app is this:

error HTTP Response 500 The operation couldn't be completed (HTTP Response error 500) {}

If I switch to Overland, I do not get presented with any error messages, but, in Overland, the 'Last sent' does not change from 'n/a', and no data appears to come in to the recorder.

How to fix this?

map_points.php file missing

I'm trying to start using your work but do have some problems.
There's link to map_points.php in header: <script src="./map_points.php?dateFrom ...
But in the git there is no such file ...

Any ideas what to do and how to get pass that?

Regards,
Martin

Docker image

The UI looks so much better and more usable than the original Docker image. Too bad that this isn't available as a Docker image too!

Multi-user support based on trackerID data provided by owntracks payload

The ability to track and display multi users on the front end interface, using the TID field sent in the payload by owntracks app.

Current state :
TID field data is already stored in database

Future state :
Backend :

  • feed the TID value when getting location data using rpc.php
  • structure data sent back by rpc, by TID
    Fontend :
  • adapt tracks display javascript functions to reflect changes in location data structure evolution (by TID)
  • if multiple TID detected in database, display a dropdown to select TID to be displayed (1 or many TID ideally) with all value collected from database
  • add selected TID value(s) in parameters for rpc call (data collection), navigation and session storage (cookie value as for config values)
    Use cases :
  • if one TID selected, display only location points & tracks for selected TID
  • if none or many TIDs are selected, display one location track per selected TID values (ideally different colors, beware of gradent colors already implemented + different color for the pins) + display TID field value in popup
  • adapt screen captures for github readme

To be implemented in dev branch

too many markers

thanks for the tool. On your screenshot there is only the last waypoint seen as a marker. How can I choose to see more or less markers.

I only receive "HTTP status 200: JsonParseException" in OwnTracks app

Hello. I configured php-tracks-recorder on my server, set up the database, and the front-end is working nicely (with a blank map since there's no data yet). However, no data is making it through. In OwnTracks, I have it configured to use HTTP connection, and it is set to be (obviously an example) "http://www.myserver.com/mydirectory/record.php" (with nothing entered under "Identification").

Under "Status," however, I get "HTTP status 200: JsonParseException" as the Endpoint Status Message. ("Idle" is the Endpoint state. in case that matters.)

At some point in the future, I hope to enable HTTPS and boost security, but for now I just want to troubleshoot and get it working, and I can't even get any data posted. What am I doing wrong?

SQL-Error

I run your code on a my webhoster (strato). Unfortunatly I get an error while fetching the markers:

Fatal error: Uncaught Error: Call to undefined method mysqli_stmt::get_result() in [SERVER]/lib/db/MySql.php:50 Stack trace: #0 [SERVER]/lib/db/AbstractDb.php(97): MySql->query('SELECT * FROM l...', Array) #1 [SERVER]/rpc.php(53): AbstractDb->getMarkers(1566856800, 1566943199, 500) #2 {main} thrown in [SERVER]/lib/db/MySql.php on line 50

I don't have much influence on the php-version / mysql-server, because it's a webhoster. Where could I dig into?
Thanks

Fatal error getFriends()

Hello, i am getting this error when I open owntracks app and upload my position to server:

[Mon Feb 10 17:55:04.901548 2020] [:error] [pid 11687] [client xxxxx:63983] PHP Notice: Undefined variable: sql in /var/www/map/public_html/lib/recorder/OwntracksRecorder.php on line 114

[Mon Feb 10 17:55:04.901581 2020] [:error] [pid 11687] [client xxxxx:63983] PHP Fatal error: Uncaught Error: Call to a member function getFriends() on null in /var/www/map/public_html/lib/recorder/OwntracksRecorder.php:114\nStack trace:\n#0 /var/www/map/public_html/record.php(78): OwntracksRecorder->getFriendsLocation(Object(OwntracksRecordStructure))\n#1 {main}\n thrown in /var/www/map/public_html/lib/recorder/OwntracksRecorder.php on line 114

any idea what could be the cause ?

I am running on:

Apache/2.4.25 (Debian)
libmysql - mysqlnd 5.0.12-dev
PHP: 7.0.33-0+deb9u6
10.1.44-MariaDB-0+deb9u1 - Debian 9.11

also i've noticed maybe error on line 26 in record.php - there is .php twice
require_once('lib/db/MySqlPdo.php.php');

Btw great work :)

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.