View Full Version : [SANDBOX] Wifi-based Proximity Profiles
code177
11-03-2009, 06:39 PM
Brainstorm link (http://maemo.org/community/brainstorm/view/wifi-based_proximity_profiles/)
It would be very useful to have a setup which allows your profiles to change automatically based on your location. Obviously this isn't practical by using GPS because that'll suck the battery dry, but since most people will have wifi on permanently, it might be possible to use that instead.
Additionally, it would be pretty swish to have the device automatically open and close applications based on these profiles. Other changes could include ringtone/vibrate, power settings, gps on/off, bluetooth on/off, etc.
Simply, the device could be set to activate profile A (vibrate, calendar, calculator, VNC, bluetooth, etc) when connected to, say, work_wifi_network_abc, and then deactivate when it is no longer connected.
The device may then activate Profile B (ringtones, bluetooth, music, etc) when connected to home_wifi network.
code177
11-03-2009, 06:51 PM
As far as I know, based on my rudimentary understanding of how code works (no really, compared to most of you here I'm a total luddite), it should be possible to add some sort of hook/extension to the wifi connection code, which simply feeds the network name or mac address into a profile/app launching system. Once in there it should be a simple read-config, do-instructions procedure.
Right? :)
THE GENERAL
11-03-2009, 08:04 PM
Why do you need to found are you lost or afraid?????????
Duncan
11-04-2009, 04:57 AM
Have a look at the Android 'Locale' app to see the sort of thing you could do. That uses cell tower, wifi and GPS to determine location, but only to the accuracy it needs so if you are nowhere near one of your locations it doesn't need to bother with wifi or GPS. It can also trigger on a combination of other conditions like time of day or battery level.
Locale also does rather more than switching profiles: it has a plugin structure so actions can include things like sending tweets or running an arbitrary Python script.
dtrouton
11-04-2009, 05:16 AM
I was thinking about something like this, also triggering off things like what Bluetooth devices it was connected to etc. as well. Thanks for the mention of "Locale" I'd not seen that before, it's exactly the type of thing I'd love to have. I wonder how they get the info about cell towers...
Answering my own question... Here is some code for getting location info based on cell tower info on android:
http://www.anddev.org/poor_mans_gps_-_celltowerid_-_location_area_code_-lookup-t257.html
Need to have a look at the maemo API.... liblocation returns cell tower info, but I'm not 100% sure if the GPS needs to be turned on for that to work.
pelago
11-04-2009, 06:48 AM
I think this is a problem that Shepherd (http://talk.maemo.org/showthread.php?t=31524) could solve.
nymajoak
11-04-2009, 07:15 PM
I think this is a problem that Shepherd (http://talk.maemo.org/showthread.php?t=31524) could solve.
Ooo, I was JUST about to add Shepherd as a solution but luckily checked here first... thanks to Brainstorm being *excruciatingly* slow... Do you want to add it Pelago?
Btw, there are two very similar brainstorms to which I've previously added Shepherd as a solution. One was about changing profiles based on calendar events, the other about changes based on location iirc. Can't look for them right now since Brainstorm is ... you said it ... SLOOOOOoooow.
EDIT_ These are the other two brainstorms. Especially the second one is very similar to yours, code177
http://maemo.org/community/brainstorm/view/profile_scheduler_which_automatically_changes_im_s tatus
http://maemo.org/community/brainstorm/view/location_based_profile_and_settings_changes
nymajoak
11-04-2009, 07:25 PM
While I'm at it, welcome to the forum dtrouton and THE GENERAL!
dtrouton: Your bluetooth idea in particular might be worth mentioning in the thread pelago linked to.
pelago
11-05-2009, 07:52 AM
Ooo, I was JUST about to add Shepherd as a solution but luckily checked here first... thanks to Brainstorm being *excruciatingly* slow... Do you want to add it Pelago?
I've added a few Brainstorm ideas and comments in the past, but it's now too slow for me to be bothered. Roll on the December server upgrade!
dtrouton
11-05-2009, 08:11 AM
Thanks nymajoak, for the welcome and the suggestion. I've added a reply to the shepherd thread.
hopbeat
11-05-2009, 09:00 AM
Hello,
currently at my uni as a project we are developing Context Toolbox for Maemo. We already have this on S60 (http://milab.imm.dtu.dk/context).
This will be a set of APIs working on different levels, starting with simple sensors readings (GPS, accelerometer, WiFi etc.), through middle layer of events managing, label storing etc. and ending with high level blocks (labels sharing via bluetooth, smart location based on power consumption etc.)
So far we have very good experience with this on S60 as students can easily create a context-aware application, some of them being exactly what you are describing here.
We should be ready with first (still rather basic) functionalities in mid-December. The toolbox is written in C++ and it nicely hides all the sensors management stuff.
At this moment we do not plan API for profiles on Maemo, simply because some things are in focus first. But it should be possible to be done. With this API, writing the application mentioned would be extremely easy.
Cherrypie
11-18-2009, 04:42 AM
The whole idea sounds alot futuristic, I mean changing profiles & opening applications automatically based on your location?
Maybe it's the word "automatically", that makes me suspicious. Why not have an APP with different profiles that you can fill with predefined actions like this:
profile 1: (if coordinate x= between a & b & y = between c & d)
"open email client, open new email, mute phone".
profile 2: (if coordinate x= between e & f & y = between g & h)
"open skype, call contact "Tom"".
And everytime you execute the APP, it gets the coordinates via gps & executes the according profile. That would be a bit more manual, but still pretty cool, useful & battery life friendlier.
allnameswereout
11-19-2009, 01:06 AM
The whole idea sounds alot futuristic, I mean changing profiles & opening applications automatically based on your location?
Maybe it's the word "automatically", that makes me suspicious. Why not have an APP with different profiles that you can fill with predefined actions like this:
profile 1: (if coordinate x= between a & b & y = between c & d)
"open email client, open new email, mute phone".
profile 2: (if coordinate x= between e & f & y = between g & h)
"open skype, call contact "Tom"".
And everytime you execute the APP, it gets the coordinates via gps & executes the according profile. That would be a bit more manual, but still pretty cool, useful & battery life friendlier.You're right because not using GPS and polling the GPSd would save battery power but the idea is rather an interesting evolution. There is already Skyhook Wireless, GeoIP, BlueProximity.
Your examples also don't make much sense IMO. I'd rather use these examples:
1A) If not in own country, disable GPRS.
1B) If not in own country, only allow GPRS network connections based on my consent.
1C) If not in own country, count how much money is spend on GPRS.
1C) If not in own country, disable automatic
2) If getting at work, go into 'work modus'. Put all voice calls silently on voicemail except from number +31612345678 because then it is an emergency. IM client messages are silently logged, and IM status is 'working'. Go into 'mode before work modus' when leaving work. Note how this may result people start to contact you while traveling back home which may not be desired depending on method of transport so for some the 'mode before work modus' may rather be used when user arrives home. Also note this could be cron-based, which then overlaps with Shepherd.
These are 2 examples which make more sense. Although, for example, when arriving at airport, call Tom does also make sense because there is money burned and interaction required such should first require confirmation from user. Maybe a 'buzz' as a reminder to call Tom as a calendar event makes more sense, then allowing the user to confirm and actually 'do it' or 'postpone remind in X min', 'postpone remind with defined date', or 'cancel'.
calltrace
01-31-2010, 10:21 PM
This is suggestion
I cant belive there is no-one who mentioned that :) (search was used)
So my turn - some profile extension like addon for profile switcher
which will be able to do something depend on you position (unique number of bts - your operator transmitter ) maybe with GPS coexistence (for more accurate positioning ) like switching to your home / work wifi network ,change ringing profile ...there is lot of options i think.
There is already a deamon which can check that - like headphoned , i do some search in system ,but could not find any file with bts state, number ,etc ?
I can try to develop it ,if someone will help me :)
chemist
02-01-2010, 12:04 AM
Not BTS but everything else was mentioned yet
For those who do not know: Base Transceiver Stations are part of the cell network
merged with "BTS based profile change" to here
assetburned
04-02-2010, 09:43 PM
sounds pretty much like "MarcoPolo" on my mac.
With MacoPolo you can defined several different things to happen if a specific event happens. One for example is to change all the network settings if a specific SSID is within WLAN distance.
count me in for this one, where should I vote?
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.