Kodi Community Forum
Release OzWeather - Australian Weather Addon using BOM data inc. animated radar support - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Weather Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=155)
+---- Thread: Release OzWeather - Australian Weather Addon using BOM data inc. animated radar support (/showthread.php?tid=116905)



RE: [RELEASE] OzWeather - Australian Weather Addon using BOM data - bassist - 2013-01-28

Jeez that's some quick service!

I was just trying with postcode 3004 initially and it wasn't working (the client who I am building this for) then tried with my own which didn't work either.

But yeah, don't you just hate upstream changes...

Anyway, thanks for the quick fix!


RE: [RELEASE] OzWeather - Australian Weather Addon using BOM data - bossanova808 - 2013-01-29

No worries. So you're a Melbourne person building XBMC boxes huh? Cool! Do you have a site? I usually do ones for my relatives etc, but some off the shelf options would be handy dandy...




RE: [RELEASE] OzWeather - Australian Weather Addon using BOM data - BlissSol - 2013-02-06

Hi Bossanova808,
Just an update from my previous post on the 12/1/2013, about a graphical bug i encountered when using OzWeather (and advanced features) with the Hybrid Skin on XBMC v12.
This image should remind u of the issue ~ i was trying to remove the title "Weather" from ontop of the Radar map
ref: http://aciai.me/i/1Kqd5.jpg

Well i found the problem, it was in the MyWeather.xml file, line 1257, and had the tag:
<Label>$LOCALIZE[8]</Label>
(The field $LOCALIZE[8] is hard coded to return the word 'Weather').

thanks for your help on this Smile


RE: [RELEASE] OzWeather - Australian Weather Addon using BOM data - bossanova808 - 2013-02-06

Not the Confluence Frodo MyWeather.xml rfom the wiki though - you mean the one that comes with Hybrid?

The one in the Wiki has Weather (it's the window title) - and just the clock top right. But not the little weather icon etc.

Did you try and merge the Hybrid Weather with mine? I would have thought if you'd just used mine it would largely pop in...



RE: [RELEASE] OzWeather - Australian Weather Addon using BOM data - rcoltrane - 2013-03-01

When I fire up Weather, it displays for a fraction of a second the temperature to 1 decimal place, then only the integer part.

Is there a way to display the temperature to 1 decimal place all the time?


RE: [RELEASE] OzWeather - Australian Weather Addon using BOM data - bossanova808 - 2013-03-01

Yeah I have noticed that too and would like it to leave it....but I don't think it is under my control. Will look at the code but I think XBMC does that during the localisation etc. Shame, huh?

Weather addons are pretty clunky in XBMC, I have been thinking of turning it into a programme add on so I can do more with it, but then of course it doesn't integrate as well Sad


RE: [RELEASE] OzWeather - Australian Weather Addon using BOM data - BlissSol - 2013-03-05

Note: this text is cut & paste from another forum thread, but thought it semi appropriate to paste it here ~

--------------------
Quote:Hi, after making various HTPC's running XBMC for family & friends, ive decided to setup a small business doing this ~ and just thought id get some input;

Firstly, the business is based upon assembling, selling & supporting the Hardware ~ XBMC is provided free of charge, and i make my source available, and any updated versions of the software i do.
As its a small business venture, ive renamed XBMC for my purposes to 'Bliss Media Centre', have removed all XBMC logo's, and made a few changes to it ~
i.e: My Source is based on the stable v12 (Frodo), it uses the Hybrid skin by default, it uses the OzWeather weather forecasting by default with skin changes for Radar (as this is targeted to Australian consumers), and it has various program & video addon's preinstalled ~ i.e: it has the Catchuptv-au installed (so these addon's have been intergrated into my source).
I also proudly advertise (on my web site & Facebook page), that Bliss Media Centre is 'derived' from XBMC, & that Bliss Media Centre (the software) is GPL Licensed.

At the moment i only have a Windows OS version of my 'Bliss Media Centre' - but i do supply a fully legit OEM DVD of Windows with the box.
(Side comment here - i already run a small IT Repair/Support business, where i build my own PC's & Servers - and all MS Software i purchase thru authorized MS distributors).

Anyway, here's link's to the website (which is still undergoing development), & the Facebook page.
If anyone see's any legal issue's with any of this, please let me know & i'll address it quickly.
Website: http://www.blissmedia.net.au/
Facebook: http://www.facebook.com/BlissMediaCentre
--------------------

And so obviously, thanks to bossanova808 for developing the OzWeather weather forecasting.


RE: [RELEASE] OzWeather - Australian Weather Addon using BOM data - bossanova808 - 2013-03-06

No worries - and good luck in your venture.

Are you doing PVR with it? You could put argus on the same machine, pre-configure a Hauppage 2200 or similar, and have that all set up out of the box...works very well with AusTV etc. I even have comskip post-processing the files and removing ads etc (not 100% perfect but pretty good).


RE: [RELEASE] OzWeather - Australian Weather Addon using BOM data - BlissSol - 2013-03-06

I'm running PVR on my own setup ~ using a Leadtek dual DVB tuner, using Media Portal as the Back end... all works except for time-shifting... and im wondering if that's a skin issue (as i don't have controls displayed for time shifting), as Media Portal apparently fully supports it, itself.
So im thinking i should test out another back end for PVR, and see if i can get time shifting to work.

At the moment, the media centre's im intending to supply aren't specked with a tv-tuner... but if i can get time shifting fully working, then i'll probably package it in.

What's argus though... i have no idea on what it is?

Do you also know if any tv tuners would work with Foxtel?... i have a person with an early prototype unit, & the very basic foxtel (where foxtel has no pvr box etc), and i know they luv it if i could get the media centre to record their programs off foxtel.

Personally, i very rarely (if ever) watch free to air tv.... 90% of the time im just watching content ive downloaded, or otherwise using something like ABC iView.


RE: [RELEASE] OzWeather - Australian Weather Addon using BOM data - bossanova808 - 2013-03-06

Argus = (was) ForTheRecord - it's another TV backend - for Windows. Has very clever scheduling capabilities and time shifting works (inasmuch as I have tried it anyway).

Very reliable, I have found...

I think the only way to get Fox in is to grab the analogue (which the hauppages can do - they re-code it into mpeg2 on the fly) - and the guide via some sort of xmltv interface.

Yeah I never really use the PVR either, although my wife watches the reality stuff...so it does actually egt used a fair bit. It's pretty solid, and with nice channel logos etc. it's quite slick with the FreeToAir stuff. But I suspect most people want Foxtel support anyway...


RE: [RELEASE] OzWeather - Australian Weather Addon using BOM data - Gigantur - 2013-03-10

Thanks Bossanova808 appreciate your patience..

I re-read your pointers and had another go today. Getting somewhere now towards what I want ..

In case of interest:

For the Confluence Home screen I followed this tutorial to move Weather (later in the order) to before Programs (this is more spouse friendly and just as good as hiding and putting on favourites). For fun I also moved PLAY DISC or similar to be first item (if there is media inserted), again for spouse friendliness.

Tutorial

So now my order is

[PLAY DISC]
VIDEOS (hidden in my case through settings)
MOVIES
TV SHOWS
MUSIC
PICTURES (hidden in my case through settings)
WEATHER
PROGRAMS
SYSTEM

Working still on adding low temp to weather info on home screen (suspect will put at the end of "Mostly Sunny" (or whatever) or similarly below it in small font. My location shows up as "Melbourne, 3000" (postcode also seems a waste of screen real estate ?)

Cheers,


RE: [RELEASE] OzWeather - Australian Weather Addon using BOM data - Gigantur - 2013-03-10

Easy once you know how Wink .. I don't envy those doing skins ..

If anyone wants to do likewise (to add overnight low to Home screen):

1) edit Home.xml
2) find and replace the control for Current.Condition with

Code:
<control type="label">
      <description>Conditions Label</description>
      <width>500</width>
      <height>22</height>
      <font>font10</font>
      <aligny>centre</aligny>
      <label>$INFO[Window(Weather).Property(Current.Condition),  ], $INFO[Window(Weather).Property(Day1.LowTemp)] overnight</label>
      <textcolor>grey2</textcolor>
      <shadowcolor>black</shadowcolor>
      <visible>!IsEmpty(Window(Weather).Property(Current.Temperature))</visible>
</control>



RE: [RELEASE] OzWeather - Australian Weather Addon using BOM data - bossanova808 - 2013-03-10

Well done!


RE: [RELEASE] OzWeather - Australian Weather Addon using BOM data - scotia - 2013-03-13

Hi Boss,

Since upgrading to Frodo - and therefore downloading a fresh copy of your script - an error I pointed out in (post 137) is back. I needed to add 'www' to the searchURL:
Code:
searchURL = 'http://www.weatherzone.com.au/search/'
at line 580 of your code.

This might be a larger problem for XBMC, but when using a proxy (which I am), the code behind calls such as:
Code:
urllib2.urlopen(req)
does not resubmit the query to redirected URLs (when the initial method is POST). At least that's my assumption.

I reconstructed your HTTP POST with cURL. Without a proxy it works:

Code:
[root@dev-01 ~]# curl -s -q -0 -k -d q=3122 -d t=3 --header "Host: www.weatherzone.com.au" --header "User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT" http://weatherzone.com.au/search/ | grep Hawthorn
                    <li><a href="/vic/melbourne/hawthorn">Hawthorn, VIC 3122</a></li>
<li><a href="/vic/melbourne/hawthorn-north">Hawthorn North, VIC 3122</a></li>
<li><a href="/vic/melbourne/hawthorn-west">Hawthorn West, VIC 3122</a></li>

With a proxy, and WITH 'www' prepended to the searchURL it works:

Code:
[root@dev-01 ~]# curl --location --proxy http://proxy.thismonkey.com:3128 -s -q -0 -k -d q=3122 -d t=3 --header "Host: www.weatherzone.com.au" --header "User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT" http://www.weatherzone.com.au/search/ | grep Hawthorn
                    <li><a href="/vic/melbourne/hawthorn">Hawthorn, VIC 3122</a></li>
<li><a href="/vic/melbourne/hawthorn-north">Hawthorn North, VIC 3122</a></li>
<li><a href="/vic/melbourne/hawthorn-west">Hawthorn West, VIC 3122</a></li>

However, with the original URL and with a proxy, it fails:

Code:
[root@dev-01 ~]# curl --location --proxy http://proxy.thismonkey.com:3128 -s -q -0 -k -d q=3122 -d t=3 --header "Host: www.weatherzone.com.au" --header "User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT" http://weatherzone.com.au/search/  | grep Hawthorn
<no output>

The man page for cURL explains it thusly:
Quote:...When curl follows a redirect and the request is not a plain GET
(for example POST or PUT), it will do the following request with
a GET if the HTTP response was 301, 302, or 303...

There's the issue, at least with cURL. The original POST becomes a GET. I'd bet that the same code is in use behind the scenes in XBMC. It'd be great if an XBMC developer could take a look.

Anyway, I guess I'm posting this for two reasons:
1) Is there any reason not to prefix the searchURL with 'www' since you're being redirected there anyway?
2) In case anyone else is having the same issue.

Thanks,
Scott


RE: [RELEASE] OzWeather - Australian Weather Addon using BOM data - bossanova808 - 2013-03-14

hmmm yeah that's an oversight - I thought I had changed it. I have a new version about ready to go with a few cleanups so will fix that at same time and should get it out today (but takes a few days for review etc.)