Release - openweathermap

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Bitboy Offline
Junior Member
Posts: 25
Joined: Dec 2013
Reputation: 2
Location: Germany
Post: #31
Hello everybody Smile

Currently i've no Helix up and running so i couldn't test anything.

@ronie: if you are working on it, can you provide your changes on a public place? I'm still interested working on it as far as possible.

@phil65: this addon provides some additional data (marked in bold in the first post) but those values are not shown by skins, so the skin patch was nessesatry. This was the main reason keeping it away from the repository and only provide it through the forum for "more experienced" users.

@Gerhard S: PIL (Python Image library?) is used to glue the marker on the map tile image. As far as i know its a default python library which was included in XBMC 13. Maybe in 14 its an extra package or completly removed

And for future: its published as open source, so anyone who wants to to work on it, feel free to do so Smile I would be realy happy to see it in any future versions of XBMC/KODI
find quote
Gerhard.S Offline
Junior Member
Posts: 22
Joined: Jun 2014
Reputation: 0
Location: Thailand
Post: #32
here the change of default.py is also works under Helix
Weather Widget and 7 day forecast work (Confluence tested)

Gerhard

change in line 19
Code:
try:
    from PIL import Image
except: pass

change def create_marker to
Code:
def create_marker(x, y, filename):
  try:
    blankfile = xbmc.translatePath( os.path.join( __cwd__, 'resources', 'images', 'blank.png' ).encode("utf-8") ).decode("utf-8")
    markerfile = xbmc.translatePath( os.path.join( __cwd__, 'resources', 'images', 'marker.png' ).encode("utf-8") ).decode("utf-8")
    blank = Image.open(blankfile)
    image = Image.open(filename)
    marker = Image.open(markerfile)
    width, height = marker.size
    x = int(x - width/2)
    y = int(y - height/2)
    blank.paste(image, (0,0))
    blank.paste(marker, (x,y), mask=marker)
    blank.save(filename.replace('.png','_m.png').replace('.jpg','_m.png'))
  except: pass
find quote
phil65 Offline
Skilled Skinner
Posts: 4,695
Joined: Mar 2009
Reputation: 64
Location: Cologne, Germany
Post: #33
(2014-10-17 15:20)Gerhard.S Wrote:  here the change of default.py is also works under Helix
Weather Widget and 7 day forecast work (Confluence tested)

Gerhard

change in line 19
Code:
try:
    from PIL import Image
except: pass

that´s the wrong way. you should add the PIL dependency in addon.xml.
find quote
ronie Online
Team-Kodi Member
Posts: 9,325
Joined: Jan 2009
Reputation: 162
Post: #34
(2014-10-17 12:21)Bitboy Wrote:  @ronie: if you are working on it, can you provide your changes on a public place? I'm still interested working on it as far as possible.

sure, will put my stuff on my github as soon as i have something worth showing.
i'll be writing it from scratch though (well, based on my wunderground code)
so please don't expect any changes from my end that would be easy to backport.
i usually prefer to write my own code instead of c/p'ing code from other people.

... one exception might be the map code, it's probably worth it to check how you've implemented it. :-)

Always read the Kodi online-manual, FAQ and search the forum before posting.
Do not PM or e-mail Team-Kodi members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
Pissa Offline
Junior Member
Posts: 40
Joined: Jun 2012
Reputation: 0
Post: #35
Hi Bitboy,
this is italian translation.

openweathermap_italian.zip

Hope you enjoy this, bye!
find quote
trigrhappy Offline
Junior Member
Posts: 12
Joined: Dec 2012
Reputation: 0
Post: #36
Awesome addon. Now that Wunderground is dead....this could become the de-facto favorite.

With that said, anyone who can fix up a version where the 7 day forecast widget works would quickly become my new favorite person.
find quote
ponciak Offline
Junior Member
Posts: 4
Joined: Jun 2014
Reputation: 0
Post: #37
Hello everybody
I have the problem - on my device (Gotham 13.2, Android) openweathermap not working Sad
find quote
Gerhard.S Offline
Junior Member
Posts: 22
Joined: Jun 2014
Reputation: 0
Location: Thailand
Post: #38
@Phil65
I know it is not the right way - but I have not found the PIL addon and do not know the right name
but for the widget and the 7 day forecast it is PIL not needed

@trigrhappy @ponciak
looking in my repo under Weather Addons... http://s.IPTVxtra.net/Repo

Gerhard
(This post was last modified: 2014-10-18 16:15 by Gerhard.S.)
find quote
phil65 Offline
Skilled Skinner
Posts: 4,695
Joined: Mar 2009
Reputation: 64
Location: Cologne, Germany
Post: #39
put

<import addon="script.module.pil" version="1.1.7"/>

in required section of addon.xml.
find quote
Gerhard.S Offline
Junior Member
Posts: 22
Joined: Jun 2014
Reputation: 0
Location: Thailand
Post: #40
Thanks Phil, I changed it and work - in my repo I've also updated
cheers :-) Gerhard
find quote
Bitboy Offline
Junior Member
Posts: 25
Joined: Dec 2013
Reputation: 2
Location: Germany
Post: #41
@ronie
As i started i used your yahoo addon and later copied parts of wunderground code for more advanced weather information. So both shouldn't be that different. I think there should be only one addon (with one API key) so if needed i can give you the account for login to the openweathermap site.

As i've seen they reworked the page and maybe there are also a few api changes (as far as i remember the free version only uses the newest api version) so maybe there are some changes nessesary.


thx to phil65 and Gerhard.S for finding a solution for PIL library.

I hope i can have a look at it at the beginning of next month.
find quote
Gerhard.S Offline
Junior Member
Posts: 22
Joined: Jun 2014
Reputation: 0
Location: Thailand
Post: #42
@Bitboy
but I not removed try / except, because under helix alpha3 he does not find the PIL Lib
find quote
Post Reply