maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   N900 + Google Latitude (https://talk.maemo.org/showthread.php?t=38542)

rlinfati 2011-04-19 13:47

Re: N900 + Google Latitude
 
Quote:

Originally Posted by niqbal (Post 991360)
so you are not going to maintain it? i thought you would be updating your application

to migrate to the official api i need:
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......

Whoopi 2011-04-19 16:05

Re: N900 + Google Latitude
 
Quote:

Originally Posted by wurtel (Post 991748)
Could you give a hint how to install the google stuff? I unpacked the tarball and did "python setup.py install" as root, but it still complains:

Code:

~ $ ./latitude-updater.py
Traceback (most recent call last):
  File "./latitude-updater.py", line 38, in <module>
    import location
ImportError: No module named location


run:
Code:

~$ apt-get install python-location
this removes your problem for me. but the script doesn't work. it keeps continuously accessing the gps, sends out:
Code:

# python latitude-updater.py -v
2011-04-19 18:01:36: Got loc data .... (acc ...) alt nan (...), head nan, speed nan
2011-04-19 18:01:45: Sending location update ... (acc ...)

but my location isn't updated. :(

ajack 2011-04-20 08:04

Re: N900 + Google Latitude
 
Quote:

Originally Posted by rlinfati (Post 991803)
to migrate to the official api i need:
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......

If you are working on it, we can wait... at least I know I can... but please be quick! :p

Aketzu 2011-04-21 14:36

Re: N900 + Google Latitude
 
Quote:

Originally Posted by Whoopi (Post 991892)
but my location isn't updated. :(

Naturally when doing finishing cleanups I commented out the line that submits data to google and prints response :)

Please download and try again (or just uncomment "print service.currentLocation... line).

Whoopi 2011-04-21 15:36

Re: N900 + Google Latitude
 
Quote:

Originally Posted by Aketzu (Post 993231)
Please download and try again (or just uncomment "print service.currentLocation... line).

oh, how dumb i was... okay, i removed the comment and now it works! thank you! :)
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?

ajack 2011-04-25 10:05

Re: N900 + Google Latitude
 
Any updates on this? :-s

MasterZap 2011-04-27 07:31

Re: N900 + Google Latitude
 
1 Attachment(s)
Quote:

Originally Posted by Whoopi (Post 993275)
oh, how dumb i was... okay, i removed the comment and now it works! thank you! :)
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?

I made a quick modification to the script which switches to true GPS position (the way I want it, cell tower is 100% useless to me), plus adds a "--once" command line option.

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

ajack 2011-04-27 09:23

Re: N900 + Google Latitude
 
Quote:

Originally Posted by MasterZap (Post 995997)
I made a quick modification to the script which switches to true GPS position (the way I want it, cell tower is 100% useless to me), plus adds a "--once" command line option.

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

Hi MasterZap,

Do you have step-by-step noob level instructions? Or can somebody please do a lovely front-end GUI for this?

Thanks in advance... :)

MasterZap 2011-04-27 10:25

Re: N900 + Google Latitude
 
Quote:

Originally Posted by ajack (Post 996043)
Hi MasterZap,

Do you have step-by-step noob level instructions? Or can somebody please do a lovely front-end GUI for this?

Thanks in advance... :)

I think it would be fairly easy for someone who knows Python + UI to do a usable frontend.

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

rlinfati 2011-04-27 13:03

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 :(


All times are GMT. The time now is 03:31.

vBulletin® Version 3.8.8