GPS Location for weather?
#1
I'm interested in getting the weather add-on to update the location based on GPS instead of ip address. is this possible?

I can put in hard work to make it happen of someone points me in the right direction.

Thanks!
Reply
#2
Ok, so I can take GPS Longitude and Latitude data and get the closest city name, zipcode, state abbreviation, and state name. I don't know python all that well, but what I could do is write up a quick VB program to edit the location settings for the weather add-on, say every 15-30 minutes, if I knew where the locations were stored.

I see " __addon__.setSettings('Location1', Data['location'] ['city'])" but I don't know where it stores that information...yet.

Can anyone point me in the right direction?
Reply
#3
the latest test version of the weather addon accepts long/lat coordinates, so that might make it a bit easier for you.
the location settings are stored in:
../userdata/addon_data/weather.wunderground/settings.xml

the two fields you need to change:
<setting id="Location1" value="LocationName" />
<setting id="Location1id" value="37.8,-122.4" />

the 'Location1' value is only used for displaying a location name on screen
the 'Location1id' value is the actual value used to fetch the weather info.

here are some examples of formats which be used in the Location1id field
Quote:The location for which you want weather information. Examples:
CA/San_Francisco US state/city
60290 US zipcode
Australia/Sydney country/city
37.8,-122.4 latitude,longitude
KJFK airport code
pws:KCASANFR70 PWS id
autoip AutoIP address location
autoip.json?geo_ip=38.102.136.138 specific IP address location

you can get the latest version here: http://forum.xbmc.org/showthread.php?tid=116668
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#4
I figured that out only a few minutes before you posted!

and that does make my life simpler. I'm going to code the app in vb.net first for simplicity, then I'll figure out how to do it in python and add settings for com port and gps type


Thanks for your help!
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
GPS Location for weather?00