[WIP] Location-aware weather, etc.
#1
I thought I'd make a thread for my GitHub fork, https://github.com/garbear/xbmc/tree/location.

Basically, XBMC shows you the weather for your current location instead of New York, NY Wink

So far, it's a working example of IP, WiFi and GPS based geolocation. Mac wifi scanning needs a little Objective-C love, but Linux (compiles with libiw-dev) and Windows work just fine (should also be useful for a network manager)

This proof-of-concent is part of a larger idea. Currently, "location" is a property in the weather settings. Why not turn that upside down? "Location" would replace "Weather" on the settings page and all location-based settings, including weather, addon-filtering, language, region, character set and nearby theater showtimes/concerts would then be a property of *where you are*

Image

Image

Image

Image
Reply
#2
This is an excellent stepping stone and hope to see this integrated into XBMC officially.

Expanding on this idea, you could use the location to automatically configure other location-based settings as well, basically all the settings in Appearance > Location among others.

Going even further, one could see this possibly getting integrated into location-based addon sources. Things like Hulu, which is only available in the United States, would only appear to those inside the US. This would help new users to XBMC from downloading addons that aren't usable in their current location.
Reply
#3
Sranshaft Wrote:This is an excellent stepping stone and hope to see this integrated into XBMC officially.

Expanding on this idea, you could use the location to automatically configure other location-based settings as well, basically all the settings in Appearance > Location among others.

Going even further, one could see this possibly getting integrated into location-based addon sources. Things like Hulu, which is only available in the United States, would only appear to those inside the US. This would help new users to XBMC from downloading addons that aren't usable in their current location.

That would kind of suck for those of us that use proxies on those addons
Reply
#4
Eldorado Wrote:That would kind of suck for those of us that use proxies on those addons

That's the beauty of advancedsettings.xml. Filtering by location would be on by default but have the ability to add a line in the file to turn it off.

I'd wager a guess and say it'll help the new users to XBMC outside of the United States that see an addon for Cartoon Network or what have you, try running it to only get an error or 'One or more files couldn't be played' dialog and think either the addon or XBMC is broken.
Reply
#5
wifi and gps based geolocation (pretty much any addon *not* ipinfodb.com) aren't affected by proxies. quick and easy, no need for advancedsettings.xml
Reply
#6
Having something like this in core would probably help alot. It would make xbmc less to setup and it could be used, as said here, to filter addons.

If a solution would be integrated in core it would need to be a) possible to turn off (perhaps even off by default). By turning off you set the location manually (or not at all). Filtering by addons must be toggle-able, if someone wants to get a plugin they need to be able to! b) it should be done in c++ and possibly extended via python.

If you want to do this integration that would be most welcomed.

Cheers,
Tobias
If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

Image

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
Reply
#7
Here's how I handed it for weather,

Auto location is essentially a zeroith weather area code (the other three are blank by default and the weather screen's location spinner is disabled). If you add more area codes, you can switch between them and XBMC remembers the active one. So disabling current location is as simple as spinning to a manual one and forgetting about it.

I can help integrate location into the core, and I would need some guidance as to how to envision this integration. For instance, currently location is a property in the weather settings. Why not turn that upside down? "Location" would replace "Weather" on the settings page. All location-based settings, including addon-filtering, language, region, character set, nearby theater showtimes, and even weather would be a property of *where you are*

Guide away.
Reply
#8
garbear Wrote:Why not turn that upside down? "Location" would replace "Weather" on the settings page. All location-based settings, including addon-filtering, language, region, character set, nearby theater showtimes, and even weather would be a property of *where you are*.

That's an excellent idea and you definitely get my +1.
Reply
#9
It's ready if anyone wants to try it out. https://github.com/garbear/xbmc/tree/location
  • IPInfoDB just needs internet. Enabled as default.
  • Google Gears Geolocation needs a WiFi radio present. Windows (XP SP3 and above) is tested and works, Linux is untested and Mac still needs to be ported from Mozilla.
  • Sony PlaceEngine requires their client and their database is limited to Tokyo & Japan (but you can use your web browser to add info about your location to their database). Off-line location lookup is supported via GPS or a local copy of Sony's database.
When you start XBMC, the weather on the main screen will be the current weather Big Grin The weather window and settings page have all been slightly modified to cope with this new feature.
Reply
#10
Sorry if the link was down earlier for anyone, I was doing some git reshuffling and deleted the repo Smile I recommited the updated files & it should be online now
Reply
#11
Sranshaft Wrote:That's the beauty of advancedsettings.xml. Filtering by location would be on by default but have the ability to add a line in the file to turn it off.

I'd wager a guess and say it'll help the new users to XBMC outside of the United States that see an addon for Cartoon Network or what have you, try running it to only get an error or 'One or more files couldn't be played' dialog and think either the addon or XBMC is broken.

Agree on the logic

But is advance settings a good spot for such an option? Seems like one many users might want to fiddle with
Reply
#12
Eldorado Wrote:Agree on the logic

But is advance settings a good spot for such an option? Seems like one many users might want to fiddle with

Indeed. I made it simple and easy to change the location provider from the weather settings window (I think the screens shots above show this). no mess, and no advancedsettings.xml
Reply
#13
I'm actually working on another integration of this that I think will be a neat addition to the music secion... bandsintown.com supports finding local concerts by geolocation. How cool to be able to listen to an artist and being prompted with their upcoming concerts in your area?
Reply
#14
blacklist! been following progress on your skin since day one Smile Upcoming concerts nearby are a way awesome idea and it's cool that bandsintown can use the IP address the request comes from. I wonder if something more accurate, like wifi location, would be worth the extra effort? probably only for those behind a proxy, i'm guessing
Reply

Logout Mark Read Team Forum Stats Members Help
[WIP] Location-aware weather, etc.0