Makin-Things / bom-radar-card

A rain radar card using the new tiled images from the Australian BOM
https://github.com/makin-things/bom-radar-card
MIT License
98 stars 9 forks source link

API Being retired? #29

Closed simongis closed 1 year ago

simongis commented 1 year ago

I see the BOM page now has a banner: "This page will be retired on 14 March 2023"

I believe the API used for the map tiles will also be retired. Have you heard of any alternative APIs they will be providing?

bossanova808 commented 1 year ago

Argh that is...not good.

Does not per se say the whole API.

Might be good if weather interested people start gathering resources and info here....

simongis commented 1 year ago

If I find an alternative source, will post here.

Line-Noise commented 1 year ago

Can confirm. It's pissing down in Melbourne right now and the radar on my Home Assistant display is clear. :disappointed:

bossanova808 commented 1 year ago

The API (i.e. for data) is still working, at least. As is the old FTP based radar (so my Kodi addon is fine still).

But the pages are gone...and I guess the new tile radar too then :(

Makin-Things commented 1 year ago

The api for the weather forecasts and observations are not affected, but the radar tiles have been update/moved to a new location. Unfortunately I have not had any spare time (and won't until at least late June) to figure out where they have been moved. Because it is all encrypted and now there is only a mobile app that uses it means having to do a MTIM attack on an android or apple device to get the new urls. Painful and time consuming to set up. If someone else wants to help by figuring out the new schema it is then probably a fairly easy update. In the meantime you can still choose any of the rainviewer options and get the data from there.

Line-Noise commented 1 year ago

I have a rooted Android phone and I need to spin up mitmproxy to get my PowerPal API key so I'll open the radar on the BoM app at the same time and see what I can find.

kiwizznz commented 1 year ago

Ah, wondered where all the clouds had gone. If only.. (Melbourne weather joke etc etc)

kiwizznz commented 1 year ago

I have a rooted Android phone and I need to spin up mitmproxy to get my PowerPal API key so I'll open the radar on the BoM app at the same time and see what I can find.

Can't you just get the API key for PowerPal from the app? I signed up for their pro device beta thing at it shows up there - maybe they could just give you your key if you ask?

Makin-Things commented 1 year ago

@Line-Noise if you can do the mitm stuff that would be awesome. Basically I am looking for the new schema for the tiles. Before they removed them the urls looked like this.

https://radar-tiles.service.bom.gov.au/tiles/{time}/{z}/{x}/{y}.png

Where the various bits in {} specify exactly the tile you want. I doubt that much has changed, probably the main part of the url and possibly the order of the parameters.

Line-Noise commented 1 year ago

Can't you just get the API key for PowerPal from the app? I signed up for their pro device beta thing at it shows up there - maybe they could just give you your key if you ask?

Yeah, apparently if you were part of the beta you can. But I'm not so can't. No worries. I've got it now!

Line-Noise commented 1 year ago

It looks like BoM are using mapbox.com now. The URLs are in the form of:

https://api.mapbox.com/v4/bom-dc-prod.rain-prod-LPR-{time}/{z}/{x}/{y}.vector.pbf

. . . plus an API access token appended which I won't post here. It returns a protobuf. I assume you'd need to use the Mapbox SDK to extract the tile data out of the protobuf file. However I can change vector.pbf to vector.png and I get an image back so a URL swap might be possible! (Although I just tried and all I'm getting back are black tiles. :disappointed: Maybe the x, y, z coordinates have changed?)

I'm happy to privately send you the mitm dump if you want to look at it yourself.

kaizersoje commented 1 year ago

Can confirm. It's pissing down in Melbourne right now and the radar on my Home Assistant display is clear. 😞

Same here for today in Melbourne as well.

DavidFW1960 commented 1 year ago

Can confirm. It's pissing down in Melbourne right now and the radar on my Home Assistant display is clear. 😞

Same here for today in Melbourne as well.

switch to using rainviewer option as the source

roly151 commented 1 year ago

Is the rainviewer rain radar data accurate? I tried their app and it shows vastly different radar pictures if you choose one radar over another.

DavidFW1960 commented 1 year ago

Is the rainviewer rain radar data accurate? I tried their app and it shows vastly different radar pictures if you choose one radar over another.

It seems accurate to me. It was pissing down here yesterday and the eye of the storm on the radar was right overhead.

roly151 commented 1 year ago

Never mind me. I think it may have been one of the radars on the RainViewer app not working. You can click a radar location and one of them (Sydney) had no rain over Sydney, whereas the other (Woollongong) had a large amount of rain.

On 24 Mar 2023, at 10:09 am, DavidFW1960 @.***> wrote:

Is the rainviewer rain radar data accurate? I tried their app and it shows vastly different radar pictures if you choose one radar over another.

It seems accurate to me. It was pissing down here yesterday and the eye of the storm on the radar was right overhead.

— Reply to this email directly, view it on GitHub https://github.com/Makin-Things/bom-radar-card/issues/29#issuecomment-1482027916, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGOQS6EBZJ2E4IWFAXKYIYTW5TJ4DANCNFSM6AAAAAAUYN4OJ4. You are receiving this because you commented.

Makin-Things commented 1 year ago

I managed to decode the new api calls. The bad news is that they have completely changed how they deliver radar tiles (now encoded vectors instead of png tiles). This means that to get it working again with BOM data will require a total rewrite of the card, which unfortunately will not happen any time soon. It still works with rainviewer data.

Makin-Things commented 1 year ago

I made some progress over the weekend and have figured out how to extract the data using javascript. image So a new radar card is possible, but it will take time that I am short of atm.

Makin-Things commented 1 year ago

Closing in favour of #32

Please follow the progress on the new version of the card and if you are a dev I could use some help. Especially if you have experience with typescript (I find it to be a battle as I normally do backend stuff).