Notices


Reply
Thread Tools
Posts: 7 | Thanked: 15 times | Joined on Sep 2010 @ Pune, India
#1
Hi,

I've been working on an application that can generate alerts based on your current location. In its current state, it will generate dbus signals when a user-defined point of interest is nearby.

I'm now learning how to create a desktop widget that can watch the dbus notifications and do something useful with them, but even as it is, it can still find interesting use, perhaps with dbus-scripts.

The code is in python, and requires the python-location library installed.

Grab the .deb from https://bitbucket.org/kushal_kumaran...iond/downloads, or clone the repository to take a look at the source.

Some notes on usage are in the wiki at https://bitbucket.org/kushal_kumaran...iond/wiki/Home
 

The Following 9 Users Say Thank You to kushal.kumaran For This Useful Post:
Posts: 660 | Thanked: 616 times | Joined on Feb 2010
#2
I thought Queen Beecon Widget has the capability of executing a script upon a Dbus event.
 
Posts: 7 | Thanked: 15 times | Joined on Sep 2010 @ Pune, India
#3
Thanks for the pointer. I will take a look at Queen BeeCon.
 
Posts: 169 | Thanked: 149 times | Joined on Mar 2010
#4
Originally Posted by Reffyyyy View Post
I thought Queen Beecon Widget has the capability of executing a script upon a Dbus event.
I'd be glad to have such a feature independent of Queen Beecon Widget, as that looks rather... oldfashioned. Or are there other themes than the ones from the screenshots?
 
Posts: 44 | Thanked: 28 times | Joined on Mar 2010
#5
Originally Posted by kushal.kumaran View Post
Hi,

I've been working on an application that can generate alerts based on your current location. In its current state, it will generate dbus signals when a user-defined point of interest is nearby.

I'm now learning how to create a desktop widget that can watch the dbus notifications and do something useful with them, but even as it is, it can still find interesting use, perhaps with dbus-scripts.

The code is in python, and requires the python-location library installed.

Grab the .deb from https://bitbucket.org/kushal_kumaran...iond/downloads, or clone the repository to take a look at the source.

Some notes on usage are in the wiki at https://bitbucket.org/kushal_kumaran...iond/wiki/Home
Thank you for making this!

I tried this yesterday and it seems to work ...

I see in the dbus-monitor that dbus events are being sent when i query current_location and nearby_location
I suspect that dbus signals are sent when a location is nearby?
is there a treshold that defines "nearby"?

Is it possible to provide a sample dbus-scripts
rule for the nearby signal?
I want to try if i can start/stop fmtx and mediaplayer based on location

furthermore, do you have plans on making a GUI for editing the places.csv?
If not I am willing to give it a go
(i have no python experience. but seems like a nice starting project)

Last edited by ny-hardcore; 11-08-2010 at 12:10 PM.
 
Posts: 7 | Thanked: 15 times | Joined on Sep 2010 @ Pune, India
#6
Thank you for taking the time to try locationd out. First, answers to your queries:

Originally Posted by ny-hardcore View Post
Thank you for making this!

I tried this yesterday and it seems to work ...

I see in the dbus-monitor that dbus events are being sent when i query current_location and nearby_location
I suspect that dbus signals are sent when a location is nearby?
is there a treshold that defines "nearby"?
Yes, there are two (arbitrarily-chosen) thresholds involved. First, locationd ignores GPS updates with the horizontal accuracy (eph) greater than 100 metres. Second, the threshold that defines "nearby" is 50 metres. This threshold will be configurable in a future version.

Originally Posted by ny-hardcore View Post
Is it possible to provide a sample dbus-scripts
rule for the nearby signal?
I want to try if i can start/stop fmtx and mediaplayer based on location
Sure. The first thing you need to do is to run dbus-scripts on the session bus, because that's where locationd is generating its signals. The dbusscripts wiki page has instructions on how to do this. Then add a file in the /etc/dbus-scripts.d directory with the following contents (this is what I did, feel free to customize as needed):

Code:
/home/user/bin/log-location * * net.locationd poi_nearby
/home/user/bin/log-location * * net.locationd poi_distant
Then create the script /home/user/bin/log-location to do what you need it to. I simply dumped the arguments to a file, and ended up with a file looking like this:

Code:
:1.797 null net.locationd poi_nearby home
You can write the script in whatever language you are comfortable with. And you can perform any action depending on the arguments you get.

Originally Posted by ny-hardcore View Post
furthermore, do you have plans on making a GUI for editing the places.csv?
If not I am willing to give it a go
(i have no python experience. but seems like a nice starting project)
Please try out the latest revision of locationd from https://bitbucket.org/kushal_kumaran...iond/downloads. This adds a script, and a dbus method to add the current location to places.csv. Simple usage instructions are on the wiki at https://bitbucket.org/kushal_kumaran...iond/wiki/Home.

I haven't myself started any work on a GUI (I plead the real-life-intervened excuse) but I do have plans there. Feel free to work on it if you like, because I don't yet know how long it will take me to finish it. I'm in way over my head here with technologies I'm not fully familiar with yet (dbus, gtk, maemo widgets, debian packaging).
 

The Following User Says Thank You to kushal.kumaran For This Useful Post:
Posts: 7 | Thanked: 15 times | Joined on Sep 2010 @ Pune, India
#7
An update: locationd 0.3 is now available.

Get the .deb from https://bitbucket.org/kushal_kumaran..._0.3-1_all.deb

What's New:
- a simple GUI, which allows starting and stopping monitoring and show list of nearby places

The wiki at https://bitbucket.org/kushal_kumaran...iond/wiki/Home has a screenshot of the new GUI, which requires pyside.
 

The Following 4 Users Say Thank You to kushal.kumaran For This Useful Post:
geekgirl74's Avatar
Posts: 238 | Thanked: 302 times | Joined on Jan 2011 @ Germany
#8
Originally Posted by kushal.kumaran View Post
An update: locationd 0.3 is now available.

Get the .deb from https://bitbucket.org/kushal_kumaran..._0.3-1_all.deb

What's New:
- a simple GUI, which allows starting and stopping monitoring and show list of nearby places

The wiki at https://bitbucket.org/kushal_kumaran...iond/wiki/Home has a screenshot of the new GUI, which requires pyside.
The wiki isn't accessable. I only get a bitbucket login window.
 
Posts: 7 | Thanked: 15 times | Joined on Sep 2010 @ Pune, India
#9
Originally Posted by geekgirl74 View Post
The wiki isn't accessable. I only get a bitbucket login window.
My mistake. I've made the wiki publicly accessible now.
 

The Following User Says Thank You to kushal.kumaran For This Useful Post:
Posts: 140 | Thanked: 40 times | Joined on Sep 2010
#10
op: anyway to make the location sensing based on gsm network instead of gps?? ie: like if the phone detects its within a define gsm tower, it will an alert or even better, run a script/command.
 

The Following User Says Thank You to bobbydoedoe For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT -4. The time now is 01:43 PM.