![]() |
[ANNOUNCE] pygeotrack: a simple N900-tracking client/server
1 Attachment(s)
As I found no real software for the N900 which allows you to easily find your N900 over the internet I wrote some simple scripts which allow exactly this. I heard that the minigpsd has support for some commercial tracking website but it needs packages which are not on the extras repo and you never know what they do with your data so here is my current concept:
Already done:
TODO ideas:
Updates get different colors to get them in one look The project is now located here with a very simple first version: https://garage.maemo.org/projects/pygeotrack/ So, is there any interest in this application? If some people would be interested I'd package it up and set up a svn (or garage page, didn't look into the whole garage thing yet). I'd also be happy if someone wants to work on it together with me (that's where the SVN comes into the game). |
Re: [ANNOUNCE] pygeotrack: a simple N900-tracking client/server
Yeah, I would like this script. I have also made it myself, but I like to how you did it.
My software: - Python script on n900 connects to my web server (cgi-bin python script) where coordinates are stored in a file. - Made also a UI webpage in python/html with use of googlemaps which reads this stored file and shows coordinate list and auto-loads googlemap pictures. It works very well... |
Re: [ANNOUNCE] pygeotrack: a simple N900-tracking client/server
"I am here" - it does some of what you describe, except when prompted to by a trigger sms. AFAIK, it is no longer developed or that was the case when I last looked.
http://talk.maemo.org/showthread.php?t=50246 |
Re: [ANNOUNCE] pygeotrack: a simple N900-tracking client/server
@digitalviod: In short it is like this:
python script: Code:
*snip the whole gps and internet stuff* PHP Code:
PHP Code:
Code:
<?xml version="1.0" encoding="UTF-8"?> So you are using python on the server, too. Is this available on many hosters? I'm only used to php on servers and have zero experience with anything else. @handaxe: I searched for Iamhere but couldn't find any reliable (recent) info at all. Also I don't want it with SMS as you'd need the phone's number and this script will upload the location as soon as it is connected to any internet connection no matter which sim is inserted. It's still mostly a simple project to learn something about python, maemo, php and the kml files ;) |
Re: [ANNOUNCE] pygeotrack: a simple N900-tracking client/server
Perhaps instead of connecting all by itself at fixed intervals (which might be troublesome), the python script could be run only each time a network connection is established (through d-bus signal, as in the Desktop Commmnd Execution Widget) ?
|
Re: [ANNOUNCE] pygeotrack: a simple N900-tracking client/server
Quote:
|
Re: [ANNOUNCE] pygeotrack: a simple N900-tracking client/server
Originally Posted by weisselstone:
"... So you are using python on the server, too. Is this available on many hosters? I'm only used to php on servers and have zero experience with anything else." I have a 24/7 server at home with a fixed IP address so I can do what I want... I like to know how you automaticly connect to an available internet connection (detect if there is already a connection and if not connect to a available connect and test if this connection works and if not chose another one and so on...). |
Re: [ANNOUNCE] pygeotrack: a simple N900-tracking client/server
'Looks very cool. A suggestion, if I may - perhaps you could add the ability to update via Google Latitude, which would provide an option for those who may not wish to use their own server (Latitude can also maintain location history as well)?
|
Re: [ANNOUNCE] pygeotrack: a simple N900-tracking client/server
Quote:
Quote:
|
Re: [ANNOUNCE] pygeotrack: a simple N900-tracking client/server
I also created a similar thing, mainly on the server side, that while not having the kml side, allows additional functionality if you have lost your phone, see http://talk.maemo.org/showthread.php?p=627494 and feel free to use http://www.whereismydevice.com if you want to connect your scripts to it to add any of this functionality!
Cheers, Ben |
Re: [ANNOUNCE] pygeotrack: a simple N900-tracking client/server
Quote:
@all: The server got many improvements. The settings and addresses are now in an extra file so that working with the svn gets easier (as I don't want my SQL settings on the SVN :p). Some easy Javascript Google Map is also now supported and also a page which creates the networked kml file for Google Earth which fetches the recent data from the server. Source is at: https://garage.maemo.org/projects/pygeotrack/ By the way: At the moment this is more for the fun of "nearly" real-time tracking of the device (e.g. let the family know when I'm at home). The lost-phone features will come later. |
Re: [ANNOUNCE] pygeotrack: a simple N900-tracking client/server
is it possible i'm not seeing the sql create file somewhere?
or how is the mysql db constructed? |
Re: [ANNOUNCE] pygeotrack: a simple N900-tracking client/server
I forgot about the file as I always create tables by hand.
I'll add one tomorrow. In short its an int called id, floats for lat, lon, bear and speed, datetime for date and varchar for the key. You can get the names from the .php files if you need it faster. |
Re: [ANNOUNCE] pygeotrack: a simple N900-tracking client/server
I'm working on a simular (but different purpose) solution with Phil. Phil created a client and i created a server (php and db). It allows you to track a route while on the go. The logged route can be plotted on Google maps (or any other service that supports KML).
We don't have any release yet but you can get all the current files from SVN: https://garage.maemo.org/projects/livegpslog/ |
Re: [ANNOUNCE] pygeotrack: a simple N900-tracking client/server
My searching skills have become very bad. I didn't find any of the projects named here before :p Your's, robbie, seems to be very similar. I also implemented tracks (either all points in the db or the last n ones) and it works good but if you enable the TimeStamps in the .kml real-time tracking doesn't work anymore (as Google Earth sets the timeline to the current view and won't display the new points by itself). If you are using TimeStamps (didn't check the source yet) did you find a solution to this?
EDIT: I just did a co on your svn. Seems you didn't make much with the kml yet, too. Just a line. So if you open the kml file it will display the whole track, right? This was one of my problems, I wanted the whole track but focus and zoom on the current position (just think you drive 130km on a motorway, then enter a city and someone wants to see where in the city you are, he sees the whole track and if he zooms in it will zoom back every 10 seconds to the whole track). The whole camera system in the .kml format is still a bit strange to me. |
Re: [ANNOUNCE] pygeotrack: a simple N900-tracking client/server
Quote:
|
Re: [ANNOUNCE] pygeotrack: a simple N900-tracking client/server
Quote:
By the way: I fixed the problem with the viewpoint when using track by using a LookAt for the whole file with the coordinates of the last position. This way Google Earth follows the device in real time but you can also see the track if you want. |
Re: [ANNOUNCE] pygeotrack: a simple N900-tracking client/server
Quote:
I've also added a marker thats clickable and then shows you the kilometers i've walked. Google automatically zooms in on the marker once you've clicked. If you want real-time (or near real time) tracking, you'll have to use ajax to add points and move the marker. Edit: now i see that you solved it already :) |
Re: [ANNOUNCE] pygeotrack: a simple N900-tracking client/server
Quote:
Phil (the author of the client we're working on) added some caching of points. We store 10 points and then upload. Theoretically it allows you to store more points when not connected but i'm not sure if it's foolproof. |
Re: [ANNOUNCE] pygeotrack: a simple N900-tracking client/server
Quote:
|
Re: [ANNOUNCE] pygeotrack: a simple N900-tracking client/server
Interesting project, though I'm not familar with python or php (I've done very little work with either and I never seem to have enough available time to learn).
But for anyone who's interested in this project and was wondering how to host their own server. You can download this if your using Windows. http://www.apachefriends.org/en/xampp-windows.html Then you just need to use opendyns if you don't have a static IP address. |
Re: [ANNOUNCE] pygeotrack: a simple N900-tracking client/server
After a bit of sorting things out, I got it to work! I will be using this so that people can see where I am on my Bike MS ride in less than a week (see signature).
Now, I would like to slow down the update loop (i.e. update the location once every 10 minutes). Where in locupdate.py can I wedge in a Code:
time.sleep(600) Edit:Never mind. I figured out where to put it. |
Re: [ANNOUNCE] pygeotrack: a simple N900-tracking client/server
Throughout this week, I have been testing pygeotrack in preparation of my bike ride this weekend in benefit of the National Multiple Sclerosis Society. So far, so good. In addition to adding a six-minute time delay, I did a few cosmetic adaptations to fit the event.
The result of my work can be found here: http://cyeungrun.com/BikeMS Assuming there is cellular coverage throughout the route, my Nokia N900 will be transmitting its GPS location every six minutes. Data should start showing up at September 11, 8 AM (GMT -4) as the ride will start at that time. Until then, don't be surprised that the map is centered in the middle of the ocean. weißelstone, thank you. |
Re: [ANNOUNCE] pygeotrack: a simple N900-tracking client/server
You could check if your provider has a coverage map, though i guess now it's too late
btw, there was a thread about starting a comunity project for making somthing to track lost/stolen N900s, i don't remember the exact name of the thread though |
Re: [ANNOUNCE] pygeotrack: a simple N900-tracking client/server
1 Attachment(s)
The test proved to be successful (see attached screenshot). I was riding with some of my coworkers whose riding style varied from mine, so I ran out of time and had to be driven back to the last mile.
|
Re: [ANNOUNCE] pygeotrack: a simple N900-tracking client/server
during the day the map wouldn't load for me the times i tried so i couldn't follow you live, it has loaded with the full path now though
|
Re: [ANNOUNCE] pygeotrack: a simple N900-tracking client/server
Quote:
Code:
time.sleep(600) Thanks! |
Re: [ANNOUNCE] pygeotrack: a simple N900-tracking client/server
Figured out. Nice solution with these python and php scripts.
|
Re: [ANNOUNCE] pygeotrack: a simple N900-tracking client/server
will this be available in the repos??? :)
|
Re: [ANNOUNCE] pygeotrack: a simple N900-tracking client/server
In response to chivar's request, my procedures for getting this program to work...
1. Prerequisites
2. Web server
3. Nokia N900
4. Front-end improvements I replaced the index.html with one of my own. To create a link to generate the KML file, I linked to: Code:
creator.php?name=BikeMSLocator&desc=&key=0500&int=600 Code:
googlemap.php?key=0500&openmap=Submit 5. Execute
Those are my procedures. I may have missed a few things as it has been about a month since I did this. In any case, send me a PM with your issues and corrections, and I'll correct this post accordingly. Once we get this shaken out, let's put this on the wiki. |
Re: [ANNOUNCE] pygeotrack: a simple N900-tracking client/server
Thanks sir for very fast response :) will check this now
|
Re: [ANNOUNCE] pygeotrack: a simple N900-tracking client/server
Quote:
i like to try this as cyeung did :) https://garage.maemo.org/plugins/scm...oot=pygeotrack |
Re: [ANNOUNCE] pygeotrack: a simple N900-tracking client/server
Quote:
=============================== was able to locate conic module in python-conic.. now my problem is the page refresh too fast no time to parse the url passed by n900 to host/server =============================== now im getting error Lat: 14.339917 Lon: 121.049910 Bear: nan Speed: nan Key: pygeotrackern900 Warning: mysqli::mysqli() [function.mysqli]: (HY000/2003): Can't connect to MySQL server on '192.168.1.102' (111) in /var/www/pygeotrack/mysql.php on line 3 Konnte keine Verbindung zur Datenbank aufbauen: Can't connect to MySQL server on '192.168.1.102' (111)(2003) |
Re: [ANNOUNCE] pygeotrack: a simple N900-tracking client/server
still getting errors :(
i dunno what else to change i already made sure my login credentials is correct Lat: 14.583719 Lon: 121.029654 Bear: Speed: Key: pygeotrackern900Konnte keine Verbindung zur Datenbank aufbauen: Unknown MySQL server host 'http://myn900.atwebpages.com' (1)(2005) Quote:
=============================== 11.07.2010 i am now able to write to db http://myn900.atwebpages.com/upload....geotrackern900 now the problem is the link http://myn900.atwebpages.com/googlem...geotrackern900 doesn't show the correct gps coords from the locupdate.py even when i export the kml file and opened it with google earth it always end up somewhere in ocean in the african continent heheheh :eek::p ================================= im now good :) :D:p:o;) |
Re: [ANNOUNCE] pygeotrack: a simple N900-tracking client/server
Hi,
Any chance to modify any of the stuff discussed in this thread to provide the functionality outlined in Running a marathon with the N900? Thanks, Magnus |
Re: [ANNOUNCE] pygeotrack: a simple N900-tracking client/server
Quote:
Quote:
Quote:
For the sms update have a look at smscon, it sends your location (with google link) to every mobile that sends a specific codeword to your phone (also an email if you want). I don't know about twitter as I'm not using it, guess the API is not that hard but I won't do it. I would love to write an optional GUI for the script (especially for the settings) but I'm completely new to maemo programing. If someone wants to make it it needs the following to work with the server:
Quote:
|
Re: [ANNOUNCE] pygeotrack: a simple N900-tracking client/server
Quote:
the time.sleep(600) i mean... |
Re: [ANNOUNCE] pygeotrack: a simple N900-tracking client/server
Quote:
|
Re: [ANNOUNCE] pygeotrack: a simple N900-tracking client/server
Quote:
Code:
preferred_interval=location.INTERVAL_10S) Code:
preferred_interval=location.INTERVAL_60S) <note:added per notices> Additionally, you may or may not wish to consider adding shebang/hashbang into the header; at least yours truly did not seem to get the Python script initialized without generated erros until having inserted the *shebang* into file locupdate.py. To insert shebang into python client's header section, let's first check the abs path to be added as a substring from N900 shell prompt; Code:
root@N900:/gps# which python Code:
#!/usr/bin/python <-- to be added as 1st line entry //beetraham |
All times are GMT. The time now is 11:54. |
vBulletin® Version 3.8.8