[Finished] - Improvement suggestion for Weather Plugin

Discussion in 'Archive' started by offbyone, October 19, 2012.

  1. offbyone
    • Team MediaPortal

    offbyone Development Group

    Joined:
    April 26, 2008
    Messages:
    3,981
    Likes Received:
    2,704
    Gender:
    Male
    Location:
    Stuttgart
    Ratings:
    +3,303 / 3
    Home Country:
    Germany Germany
    Show System Specs
    I'd like to propose that we try to find the user's location automatically when there are no locations yet set yet. Makes the start and run experience even greater ;)

    How?
    Simply call:
    http://freegeoip.net/json/
    and extract the city from the json data and get the weather condition for that.


     
    • Like Like x 2
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. Edalex
    • Premium Supporter

    Edalex Community Plugin Dev

    Joined:
    January 3, 2008
    Messages:
    2,903
    Likes Received:
    709
    Gender:
    Male
    Location:
    Saratov
    Ratings:
    +1,223 / 9
    Home Country:
    Russian Federation Russian Federation
    Show System Specs
    Is it okay to have empty city? :(
    Code (Text):
    1. {"city": "", "region_code": "", "region_name": "", "metrocode": "", "zipcode": "", "longitude": "100", "latitude": "60", "country_code": "RU", "ip": "...", "country_name": "Russian Federation"}
     
    Last edited: October 19, 2012
  4. chefkoch
    • Premium Supporter

    chefkoch Retired Team Member

    Joined:
    October 5, 2004
    Messages:
    3,130
    Likes Received:
    1,456
    Gender:
    Male
    Location:
    Dresden / Munich / Maastricht
    Ratings:
    +1,773 / 1
    Home Country:
    Germany Germany
    iirc there is already a mantis issue to have a default city if nothing is set. This information could be attached there.

    I like the idea a lot, but it should be reliable.
    If the city from the web service is empty we could fall back to one or more cities of the timezone which us configured or a few 'big cities' or famous places.... Everything is better than nothing ;)
     
  5. offbyone
    • Team MediaPortal

    offbyone Development Group

    Joined:
    April 26, 2008
    Messages:
    3,981
    Likes Received:
    2,704
    Gender:
    Male
    Location:
    Stuttgart
    Ratings:
    +3,303 / 3
    Home Country:
    Germany Germany
    Show System Specs
    Seems like that service hasn't mapped Russia yet :p
    We should try to find a good one (someone know if we can get that info from Google? - They must have the biggest DataBases).
     
  6. GeoffC

    GeoffC Portal Member

    Joined:
    June 8, 2008
    Messages:
    42
    Likes Received:
    6
    Ratings:
    +6 / 0
    Home Country:
    Show System Specs
    seems to return your isp location - I'm in Newcastle but returns Sydney
    But hey as was said better than nothing
     
  7. FreakyJ
    • Team MediaPortal

    FreakyJ Development Group

    Joined:
    July 25, 2010
    Messages:
    4,021
    Likes Received:
    839
    Gender:
    Male
    Ratings:
    +1,424 / 1
    Home Country:
    Germany Germany
    • Like Like x 1
  8. kiwijunglist
    • Team MediaPortal

    kiwijunglist Super Moderator

    Joined:
    June 10, 2008
    Messages:
    6,742
    Likes Received:
    1,417
    Occupation:
    Doctor
    Location:
    New Zealand
    Ratings:
    +1,846 / 9
    Home Country:
    New Zealand New Zealand
    Show System Specs
    I tried freegeoip
    Show Spoiler
    {"city": "", "region_code": "", "region_name": "", "metrocode": "", "zipcode": "", "longitude": "174", "latitude": "-41", "country_code": "NZ", "ip": "111.69.XXX.XXX", "country_name": "New Zealand"}
    Country (New Zealand) is correct, but city (Christchurch) is blank, and longitude + lattitude is too far off to be useful (about 500km off, co-ordinates land me in the pacific ocean)
     
    Last edited: November 15, 2012
  9. offbyone
    • Team MediaPortal

    offbyone Development Group

    Joined:
    April 26, 2008
    Messages:
    3,981
    Likes Received:
    2,704
    Gender:
    Male
    Location:
    Stuttgart
    Ratings:
    +3,303 / 3
    Home Country:
    Germany Germany
    Show System Specs
    Can you try maxmind as posted by FreakyJ?
     
  10. Spragleknas
    • Team MediaPortal
    • Administrator

    Spragleknas Administrator

    Joined:
    December 21, 2005
    Messages:
    9,472
    Likes Received:
    1,385
    Gender:
    Male
    Occupation:
    Occupied
    Location:
    Located
    Ratings:
    +1,892 / 12
    Home Country:
    Norway Norway
    Show System Specs
  11. kiwijunglist
    • Team MediaPortal

    kiwijunglist Super Moderator

    Joined:
    June 10, 2008
    Messages:
    6,742
    Likes Received:
    1,417
    Occupation:
    Doctor
    Location:
    New Zealand
    Ratings:
    +1,846 / 9
    Home Country:
    New Zealand New Zealand
    Show System Specs
    www.hostip.info - doesn't know my city or country
    not sure how to use maxmind, do I have to apply for an account?
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!