Kodi Community Forum

Full Version: OzWeather - Australian Weather Addon using BOM data inc. animated radar support
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(2021-05-31, 07:53)bossanova808 Wrote: [ -> ]Hmm, odd.  Gltich with the BOM data, at a guess, but I'll look for weirdness and track it down if I see any...

Nice detection!
Only issue is that the 128km detected for say Ayr in Qld and Jerrilderie in NSW is almost at the top of the 128km map so it's not the best view/scale *can't see to the North for Example) but there's probably not options for those anyway..
It's purely closest by latitude / longitude...not much I can do, hence leaving in the option to over-rule with a specific preferred code, if you want to.  Best of both worlds, really...
(2021-05-31, 09:57)bossanova808 Wrote: [ -> ]It's purely closest by latitude / longitude...not much I can do, hence leaving in the option to over-rule with a specific preferred code, if you want to.  Best of both worlds, really...

Yeah but they have 64k 128k and 512k versions from the same location….
(2021-05-30, 06:31)bossanova808 Wrote: [ -> ]Thanks!  Glad you do.  I presume the radar is because of lack of skin support for it?
Yes, it's because I use Amber.
Yep, but the default, I'm pretty sure, is the 128K.  Probably because that's a good distance for giving you an idea of what is coming in the relatively short term. 

The list comes from: http://www.bom.gov.au/australia/radar/ab...info.shtml - and is the same list your home auto thing is using.    I wrote a little scraper to auto-generate the list.

So I think if a person wanted one of the different views, that's precisely a good case for using a code to over-rule.  If you have the motivation, it's not hard to get the code and put it in.  But those other codes aren't in that list, so not sure what I could do about it anyway...
@Tyreless Well if you ever get motivated, happy to provide some guidance on making a MyWeather.xml for it.  I don't have the time/energy to do more than the three main skins I support already, but happy to help others if they are willing to put in a bit of work.  No worries if not, of course...
(2021-05-31, 10:19)bossanova808 Wrote: [ -> ]Yep, but the default, I'm pretty sure, is the 128K.  Probably because that's a good distance for giving you an idea of what is coming in the relatively short term. 

The list comes from: http://www.bom.gov.au/australia/radar/ab...info.shtml - and is the same list your home auto thing is using.    I wrote a little scraper to auto-generate the list.

So I think if a person wanted one of the different views, that's precisely a good case for using a code to over-rule.  If you have the motivation, it's not hard to get the code and put it in.  But those other codes aren't in that list, so not sure what I could do about it anyway...

The HA one you can zoom and pan etc so it's not a limitation. It's no big deal anyway... Yeah 128k is ok unless you are on the edge of the image. All good and thanks for adding that anyway.
No worries....but yeah the key point there is they have a full browser to play in, and nice scale-able SVG graphics etc...and basically all for free thanks to a bunch of existing JS libraries. Be lovely if all that were available in Kodi, but there you go.

As it is, for most the default will work well (I tested a bunch of locations) - and for the few there is the override option.
OK I know what is happening. BOM makes the max and min unavailable via the API. For the minimum it used to be around 4am but the new API does it in the evening hence the report from yesterday I couldn't reproduce this morning but it's doing it now. I do have a photo I can send if you need it. With my BOM card I run a rolling average that keeps the minimum that I display on my card in HA so I've seen the issue and it's reproducible daily...
So apparently I go to bed too early to see this...was fine for me at about 10:30 last night when I last checked...any chance you could capture a couple JSON blobs when it happens?  From whatever you location you like, but both the forecasts and observations would be useful...

https://api.weather.bom.gov.au/v1/locati...asts/daily
and
https://api.weather.bom.gov.au/v1/locati...servations

To be clear, you're saying that at a certain time of day each evening, the BOM stops supplying the temp_min value (specifically) for the coming day?  And they what fill it with what - null I guess?  What I don't get is why you'd see some other random value then, as the window property on question is explicitly cleared on each update, so you'd expect a missing value or maybe the string null or something....

But I guess that explains this bit in the first forecast day I remember thinking 'I'll come back to that later' about...and then forgot...

"now": { "is_night": false, "later_label": "Overnight Min", "now_label": "Max", "temp_later": 10, "temp_now": 22 }

I guess the idea would be to use the temp_later from that instead, maybe, but the question is - from when?   Maybe switch to it from 6pm onwards?  The previous night min would have happened clearly, so I guess from then on the temp_later is like to be that night's minimum?
Pretty sure it goes n/a and it's only the forecasts I think. It does it around 10pm for the max as well and the fire and uv do it as well around 10. The forecast doesn't change throughout the day anyway so can you save the previous json and if a value becomes n/a use the saved one?
I will try and get the string today - just when I notice it my computer is off hahah
Actually, looking at it, maybe that is_night tag is the clue.  I use that for setting night icons.  But then in the dawn period, not sure what would happen (12:01am to sunrise) - it might be using a min value from the next evening then, omaybe?

So maybe after sunrise, use the temp_later from then on...or, actually, maybe the answer is staring me in the face...start using the temp_later at the Overnight Min when the BOM says it is....

if forecast_seven_days[i]['now']['later_label'] == 'Overnight Min':
Yep, gonna run with that, seems the best solution, but have other ideas if it proves not to work reliably.
(2021-06-01, 00:48)bossanova808 Wrote: [ -> ]Yep, gonna run with that, seems the best solution, but have other ideas if it proves not to work reliably.

Just don't forget I see this exact same behaviour with the Maximum forecast and the Fire and UV rating... I expect it applies to most forecast items for the current day at a variable time.. Annecdotally it's ~4PM for the Minimum temp and the other items I listed ~10PM. Looks like these are the only forecast items you display...

This was on the main screen last night when I noticed it..
https://postimg.cc/YLt53bzy
Yep I think I am already protected against the Fire & UV - those will show None if no value is given for them, and to me that's fine if we're at the point they no longer apply to the current day.

The max looks ok in your screenshot though?  And the low should be fixed by this, I believe.