![]() |
Re: N900 + Google Latitude
Quote:
a rest libreary in meego and maemo a oauth libreary in meego and maemo a json libreary in meego and maemo ... and i need time...... |
Re: N900 + Google Latitude
Quote:
Code:
~$ apt-get install python-locationCode:
# python latitude-updater.py -v |
Re: N900 + Google Latitude
Quote:
|
Re: N900 + Google Latitude
Quote:
Please download and try again (or just uncomment "print service.currentLocation... line). |
Re: N900 + Google Latitude
Quote:
maybe an improvement: according to the gps-icon in the status area, your script continuously access the gps-receiver. could you please modify it, so that it turns gps off, while waiting for the next update? |
Re: N900 + Google Latitude
Any updates on this? :-s
|
Re: N900 + Google Latitude
1 Attachment(s)
Quote:
That way, I can call alarmed to call the script every 10 minutes addomg the "--once" option, et voila.... also, it requires the config file latitude.dat to be in /home/user/latitude/ (probably not a very unix-y place to put it) ;) which you must create first by manually running it once and going through the authorization. After that, you can put it into Alarmed w. eg. a cron string "*/10 * * * *" or somesuch. /Z |
Re: N900 + Google Latitude
Quote:
Do you have step-by-step noob level instructions? Or can somebody please do a lovely front-end GUI for this? Thanks in advance... :) |
Re: N900 + Google Latitude
Quote:
After all, this script is really just (not meaning "just" in a way to diminish the workload of actually writing it) a combination of the google API sample code for latitude, and the python geolocation sample code, with some glue. Unfortunately I don't know Qt or any other python GUI binding than pygame (and I don't think you'd want an UI in pygame, LOL) so I'm not the guy to do it for SURE. Step by step? Well, what you need is #1 install the google latitude python API. This is basically done by: #1.1 Downloading it from the link http://code.google.com/p/google-api-...downloads/list #1.2 Unzipping it to somewhere (doesn't matter, next step copies it to where it "should go") #1.3 doing "python setup.py install" in that directory #1.4 I think you can now delete the directory/file you downloaded, since step 1.3 copied files to some magical place in python package heaven ;) #2 make sure python-location is installed (If not, do "apt-get install python-location" but mine was already installed) #3 Create /home/user/latitude and put my version of the script in it #4 Run it once first to do the authorization magic. It will ask you to go to a link which you (unfortunately) have to cut-n-paste into your webbrowser #5 Once done, the script should run. You can either sun it as is with "python zaps-latitude-updater.py", or put it into alarmed to be run e.g. every 15 minutes with the "--once" option, so it updates once and just exit, i.e. you can put in "python /home/user/latitude/zaps-latitude-updater.py --once" into AlarmeD Your mileage may vary, this was originally just a test and it worked and solved my personal problem. The modifications I did was supertrivial (a few lines of code), and I thank the guy who wrote the original version (Aketzu) onto which I simply piggyback my meager crappy mods. /Z |
Re: N900 + Google Latitude
anyone has the web interface (ex: list of friend ) working using any browser ?
i can fix the daemon... but not the gui :( |
Re: N900 + Google Latitude
Yeh, got the updates working again. thanks masterzap and aketzu for the script-fu.
be great to get this working as a daemon again. |
Re: N900 + Google Latitude
Quote:
/Z |
Re: N900 + Google Latitude
Quote:
|
Re: N900 + Google Latitude
I don't know why Opera Mobile isn't allowed to work with Google Latitude. The desktop Opera works normally, and there exists Google Latitude mobile (special web site). Google politics?
|
Re: N900 + Google Latitude
Quote:
I have a problem. I don't understand the 1.3 step. I guess it's a noob thing. What is that setup.py? Aren't we talking about the zaps-latitude-updater.zip link? Because it only has one file of the same name but with .py extension. So if I run that I get that setup.py doesn't exist. Anyway, i tried running th script and I get this: Code:
Traceback (most recent call last): |
Re: N900 + Google Latitude
Quote:
MasterZap: The EXACT same thing that jpala describes above is happening with me. There is no setup.py file to run as described in your step 1.3 and even with the location package installed, it complains that there is no module named apiclient.discovery. This apiclient.discovery module is probably installed by running the setup.py you speak of, but since all we downloaded in your .zip file is your zaps python scripts, we' re stuck. |
Re: N900 + Google Latitude
Doing this from memory, but should all be correct...
1 You need to download the tar.gz file from this web page and save to a location on your N900 - I suggest the top leve (N900 in the file dialog) 2 open xterm change to the folder Code:
cd /home/user/MyDocsCode:
tar -zxvf ./google....4. once the extract is complete then change to the folder Code:
cd foldername5. change to the root user by using the command Code:
root6. run the command Code:
python setup.py install7. once the command has ran type Code:
exit8. create the folder for the config file using the command Code:
mkdir /home/user/latitudeCode:
touch /home/user/latitude/latitude.datCode:
python zaps-latitude-updater.py --once11. It will come back with some test, and a URL. tap the pointer n the toolbar, and cross it out. then select the URL, and xterm will give you an option to copy the URL or open it. Open it, and follow the instructions on the google authorisation page. You want to say yes to everything. Hope this helps. |
Re: N900 + Google Latitude
Thanks, gazza_d !!
I knew we were downloading just the script, but I was at a loss to find where the api was located. :) |
Re: N900 + Google Latitude
Thanks gazza_d!! You enlightened my path. I was like cddiede.
Thanks a lot. I'll try the alarmed thing. MasterZap: However, I have one question. I believe you said that with this script it doesn't update based on cell tower signal (if I'm not wrong, what is highly probable at this time here), but on the internal GPS. What if I am indoor and the GPS doesn't get the signal? Will try to get it forever consuming battery until it gets it? Thanks again to Aketzu, MasterZap and gazza_d. |
Re: N900 + Google Latitude
Quote:
Im also intrested of this answer! Thanks Gazza and others who contributed this! great app ;) edit: you guys should try to integrate this to latitude&buzz app replace old daemon! |
Re: N900 + Google Latitude
Quote:
|
Re: N900 + Google Latitude
Right, I should have been clearer in my description that "link above" reffered to the google api download posted a few posts above mine. Duh. I edited my post to reflect this (which will make this thread poshumusly hard to follow, but hey ;) )
I wonder if some Smart Person could turn the google python api's into a package.... assuming the google api distribution rules allow this....(?) As for GPS, all the changes I did were the following: #1: Change the mode from METHOD_ACWP to METHOD_AGNSS (See documentation of python location API at http://wiki.maemo.org/PyMaemo/Using_Location_API ). Another choice would be METHOD_USER_SELECTED which seems to take it from some configuration. #2: Tell it to ignore any gps point with an accuracy worse than 150 meters (actually, variable "acclimit" in the code is set to this, I was actually planning to make it an option, but never did, you could change "acclimit" to whatever accuracy you think is appropriate by just editing line 112 in the code) Frankly, I don't know the GPS api well enough to know exactly what happens and if it will try endlessly to find satellites or not. Probably. There is, most certainly, no clever code in this snippet to try to do anything intelligent here, for sure. :eek: For me, I have a low wooden house so I have quite OK GPS signal also indoors, and since I deem non-GPS coordinates to be useless, for me it is a "feature" that it never uses cell tower locations at all (then "last known good" GPS coord is better, IMHO). But you are quite right about that if you are in a bunker, it will quite probably try for way too long. Especially since my extremely simplictic implementation of the "once" option, is that it stops after the first successful fix (with successful being "better than 150 meter accuracy"). So I'm guessing it will never actually exit properly for a cell tower location. All these are things that could be fixed, but, hey, this was just a hack for my own use, and I'm just poking at this thing with a stick with very little understanding anway, so..... :) ((For example, does anyone know, that if I set the longest interval for getting GPS point - unfortunately 120 seconds seems the max - the GPS icon is still on all the time. Does this mean the GPS radio is actually on consuming battery... OR.... does it mean that it is only on in bursts every two minutes? This is completely unknown to me, unfortunately, but would be helpful to know. Also how to set longer durations than 120 seconds, because then all this AlarmeD nonsense would be unnecessary)) /Z |
Re: N900 + Google Latitude
Quote:
/Z |
Re: N900 + Google Latitude
One question:
Why the recommendation to use alarmed for automatic execution instead of just making it a cron job? |
Re: N900 + Google Latitude
Quote:
/Z |
Re: N900 + Google Latitude
Quote:
|
Re: N900 + Google Latitude
What's the point in an app that allows people to check up on you?
|
Re: N900 + Google Latitude
Quote:
And if you don't want anyone to know, turn the app off or just disable sharing. Some trust in Google's good faith is of course necessary :) |
Re: N900 + Google Latitude
Quote:
/Z |
Re: N900 + Google Latitude
Quote:
And it's fun :) Thanks again MasterZap. Your explanation was very clarifying. I'll try to read the code and see if I can get what I want exactly (if my people stop bothering me ;) ). In case of getting something useful and different I'll post it here (don't wait for me or maybe you will have to wait all your life). |
Re: N900 + Google Latitude
Btw, turns out my memory is crappy; I actually DID change to code to use the METHOD_USER_DEFINED, not METHOD_AWGSS. Duh.
"Use teh Source, Luke", not my ramblings :) I think I will experiment w. this code to try to figure out a more intelligent handling of changed position, incuding using cell towers, but only to detect CHANGES. I.e. something like - figure out GPS coord - shut off GPS - look at celltower - If celltower changes, or a LONG time has passed (like an hour), compute new GPS coordinate Or somesuch. /Z |
Re: N900 + Google Latitude
Ok, I really seem to be having some troubles getting Latitude to work, either through the desktop version on the N900 or this application. I followed these instructions "Just delete the file /home/user/.mozilla/microb/permissions.sqlite and restart. This will delete all the permissions granted/denied to web pages."
However the following didn't happen: "Then when you will connect to Latitude a pop-up will appear, asking for your permission to use the Geolocation API." I am not sure if I have the microb-geolocation module install. I couldn't find this in the application manager. |
Re: N900 + Google Latitude
whats_up_skip:
Code:
"Just delete the file /home/user/.mozilla/microb/permissions.sqlite and restart. This will delete all the permissions granted/denied to web pages."There's another script made by Aketzu, a mod of this script by MasterZap and some help from gazza_d (check the instructions for MasterZap's script, which are similar to install Aketzu's one, it differs on which script yoy download & use) that put it all together to make the N900 update location to Google Latitude. The post for MasterZap's modification of the script: http://talk.maemo.org/showpost.php?p...&postcount=167 The post for Aketzu's original script: http://talk.maemo.org/showpost.php?p...&postcount=158 |
Re: N900 + Google Latitude
Quote:
Code:
dpkg -l microb-geolocationIf not, you should be able to install ("download") it via the application manager, find it in the "location & navigation" category. |
Re: N900 + Google Latitude
Quote:
IMO using Google Latitude in MicroB is horrible, as it no longer works the Latitude mobile version using MicroB (it would be great that anyone corrected me on this). It's too small for my eyes and requires the use of the cursor with the stylus. But it's only my opinion. |
Re: N900 + Google Latitude
For anyone interested, ive just uploaded the first version of my google latitude desktop widget to the auto-builder. See PGZ Latitude Widget
|
Re: N900 + Google Latitude
Quote:
Apologies if I sound dumb. Thanks again. |
Re: N900 + Google Latitude
Oops, found the script. Hadn't read the discussion through.
|
Re: N900 + Google Latitude
Quote:
This results in the GPS trying to get a fix , and what seems like, never quits... alarmed keeps on firing up new processes that keep on running.. is there a smart way to set a time out somewhere? f.i. that if no suitable fix is found within say 120secs the --once option quits? |
Re: N900 + Google Latitude
Quote:
BUT, it doesn't work so great for me from my work place as just like ny-hardcore, I work in a place where getting a GPS fix is next to impossible. :( Are there any plans to include the GSM location as well? :confused: That would be great help. |
| All times are GMT. The time now is 20:23. |
vBulletin® Version 3.8.8