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
96 stars 9 forks source link

Upcoming replacement version of the card (V3) #32

Open Makin-Things opened 1 year ago

Makin-Things commented 1 year ago

The BoM recently totally changed the way they deliver radar information. While that renders the current version (V2) of the card almost obsolete it does provide a much better experience (less lag and more frequent updates).

It does mean that the card has to be totally rewritten. I am rather time poor at the moment, but work has commenced. There won't be any actual releases until it is working, but if you are a developer and would like to help, please get in touch. The pre-alpha (ie. it is just a proof of concept) is onn a branch called mapbox. At present I only have a single basemap working with a static timestamp to pull a single set of radar data.

I am going to close #29 and provide updates on this issue.

A teaser.

image

northcoastam commented 1 year ago

Thanks for the update. Love your card.

roly151 commented 1 year ago

I have a working version for my app, but am experiencing an occasional issue. Happy to share anything I know, however I'm no expert and using a mapbox package for Dart/Flutter. Mapbox have plenty of javascript examples, so it's not too hard to get it going. I'd be interested to see if you have the same issue. Here is a video of my issue: https://youtube.com/shorts/1jT5OKuSISQ?feature=share

jdvuyk commented 1 year ago

Just a message of support. This card was quite central to my dashboards and it was a real shame when it went blank. Hopefully you find enough time to get things working again. 👍

lionslair commented 1 year ago

I have not removed it from mine from the dashboard yet in hope

Line-Noise commented 1 year ago

Just change your Data Source toRainViewer-Original and you'll get the radar back until the BOM data is working again.

lionslair commented 1 year ago

Just change your Data Source toRainViewer-Original and you'll get the radar back until the BOM data is working again.

thanks. I will try that

gregeeh commented 1 year ago

Just change your Data Source toRainViewer-Original and you'll get the radar back until the BOM data is working again.

Sorry to be a pain, but where can I do this?

TIA

Line-Noise commented 1 year ago

Just change your Data Source toRainViewer-Original and you'll get the radar back until the BOM data is working again.

Sorry to be a pain, but where can I do this?

TIA

2023-05-08_14-09 2023-05-08_14-08

gregeeh commented 1 year ago

Thank you very much, too easy.

simonjowett commented 1 year ago

This works for me too. However, being a very sunny day today there is not much to in my neck of the woods!

DrewXT commented 1 year ago

Just change your Data Source toRainViewer-Original and you'll get the radar back until the BOM data is working again.

Awesome - thanking you.

Have to ask - @Line-Noise from ISCA?

Makin-Things commented 6 months ago

Sorry for the lack of updates, but work has been insanely busy. Yesterday was the first chance in a year for me to get some time to work on the new version. Some good progress has been made, but still a lot of little things to add before it will be ready for release.

lionslair commented 6 months ago

Just wanted to say thank you in advance

Fraddles commented 6 months ago

Just installed the new version as a beta from HACS... I know it is still a WIP, so did not think a bug report was needed, but some initial feedback;

Also I see this in the HA logs. I note that one of my other extras (kiosk-mode) is listed in one of the errors... possible conflict?

Cheers.

Logger: frontend.js.latest.202312082
Source: components/system_log/__init__.py:300
First occurred: 10:17:26 (660 occurrences)
Last logged: 10:40:42

Uncaught error from Firefox 121.0 on Windows 10 TypeError: r is undefined ul (/hacsfiles/bom-radar-card/bom-radar-card.js:12956:203220) pointRayIntersection (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:359291) pointCoordinate (/hacsfiles/bom-radar-card/bom-radar-card.js:12957:45753) pointCoordinate (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:360303) pointCoordinate3D (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:360387) pointLocation3D (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:358950) unproject (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:459189) cr (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:380708) mouseover (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:382106) handleEvent (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:407638)
Uncaught error from Firefox 121.0 on Windows 10 TypeError: r is null el (/hacsfiles/bom-radar-card/bom-radar-card.js:12956:202566) fromInvProjectionMatrix (/hacsfiles/bom-radar-card/bom-radar-card.js:12956:205354) _calcMatrices (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:370574) clone (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:344966) Lt (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:77536) jt (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:94939) _updatePlacement (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:128884) _render (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:473089) _triggerFrame/this._frame< (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:480190)
Uncaught error from Firefox 121.0 on Windows 10 TypeError: e.layout is undefined Gt (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:94207) continuePlacement (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:95468) _updatePlacement (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:129096) _render (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:473089) _triggerFrame/this._frame< (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:480190)
Uncaught error from Firefox 121.0 on Windows 10 TypeError: r is null el (/hacsfiles/bom-radar-card/bom-radar-card.js:12956:202566) fromInvProjectionMatrix (/hacsfiles/bom-radar-card/bom-radar-card.js:12956:205354) _calcMatrices (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:370574) resize (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:357649) resize (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:454938) _onWindowResize (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:480450) t.prototype.insertStyles (/hacsfiles/kiosk-mode/kiosk-mode.js:1:37477) t.prototype.processConfig/xt</< (/hacsfiles/kiosk-mode/kiosk-mode.js:1:34237) n/s/</< (/hacsfiles/kiosk-mode/kiosk-mode.js:1:1499) n/s/< (/hacsfiles/kiosk-mode/kiosk-mode.js:1:1604)
Uncaught error from Firefox 121.0 on Windows 10 TypeError: t.properties is undefined _updateFog (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:320776) _render (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:472855) _triggerFrame/this._frame< (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:480190)
dw1562 commented 6 months ago

I'm really looking forward to the replacement. I made the data source change ages ago to get the radar to display again but I really dislike the shading it uses compared to how it displays if you go to the webpage. I'm hoping the new version will allow us to see it the old way again.

I want this image

instead of this image

As you can see, they are quite different with the first one being more accurate and a lot easier to decipher.

It's good to see you make productive use of your downtime/holidays :-) Thank you!!!

Makin-Things commented 6 months ago

@Fraddles thanks for the feedback. Yes, too early to bother with creating issues. Lots of stuff will be changing pretty quickly I hope. I haven't witnessed any stalling issues on either my dev vm or my real ha instance, so not sure what is going on there. I can confirm I get the errors in my logs, but on on my real ha, nothing in the dev vm as yet. So will need to try and figure that one out at some point.

Fraddles commented 6 months ago

Happy to help debug... this card has an extremely high WAF... 🤣

Makin-Things commented 6 months ago

@Fraddles thanks. I am no longer seeing it on my production HA either. Possibly something weird left behind after the upgrade (noting that while it was an upgrade EVERYTHING was replaced). Are you still seeing the errors? Note that I have also upgraded to 2024.1

Fraddles commented 6 months ago

@Makin-Things, I have now;

The card works... though there is no rain around here to be seen at the moment. Home marker, recenter button, etc do not display, map does not scale. No more lag in the HA UI, don't know what that was about, but it stopped as soon as I removed the beta previously... Still getting logs spammed with errors... after initial install and adding the card I had the following in the logs;

Logger: frontend.js.latest.202401033
Source: components/system_log/__init__.py:300
First occurred: 08:56:59 (773 occurrences)
Last logged: 09:02:41

Uncaught error from Firefox 121.0 on Windows 10 TypeError: null has no properties el (/hacsfiles/bom-radar-card/bom-radar-card.js:12956:202566) fromInvProjectionMatrix (/hacsfiles/bom-radar-card/bom-radar-card.js:12956:205354) _calcMatrices (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:370574) clone (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:344966) Lt (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:77536) jt (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:94939) _updatePlacement (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:128884) _render (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:473089) _triggerFrame/this._frame< (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:480190)
Uncaught error from Firefox 121.0 on Windows 10 TypeError: undefined has no properties ul (/hacsfiles/bom-radar-card/bom-radar-card.js:12956:203220) pointRayIntersection (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:359291) pointCoordinate (/hacsfiles/bom-radar-card/bom-radar-card.js:12957:45753) pointCoordinate (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:360303) pointCoordinate3D (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:360387) pointLocation3D (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:358950) unproject (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:459189) cr (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:380708) mousemove (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:382699) handleEvent (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:407638)
Uncaught error from Firefox 121.0 on Windows 10 TypeError: undefined has no properties ul (/hacsfiles/bom-radar-card/bom-radar-card.js:12956:203220) pointRayIntersection (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:359291) pointCoordinate (/hacsfiles/bom-radar-card/bom-radar-card.js:12957:45753) pointCoordinate (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:360303) pointCoordinate3D (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:360387) pointLocation3D (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:358950) unproject (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:459189) cr (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:380708) mouseout (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:382162) handleEvent (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:407638)
Uncaught error from Firefox 121.0 on Windows 10 TypeError: undefined has no properties ul (/hacsfiles/bom-radar-card/bom-radar-card.js:12956:203220) pointRayIntersection (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:359291) pointCoordinate (/hacsfiles/bom-radar-card/bom-radar-card.js:12957:45753) pointCoordinate (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:360303) pointCoordinate3D (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:360387) pointLocation3D (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:358950) unproject (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:459189) cr (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:380708) mouseover (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:382106) handleEvent (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:407638)
Uncaught error from Firefox 121.0 on Windows 10 TypeError: r is null el (/hacsfiles/bom-radar-card/bom-radar-card.js:12956:202566) fromInvProjectionMatrix (/hacsfiles/bom-radar-card/bom-radar-card.js:12956:205354) _calcMatrices (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:370574) clone (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:344966) Lt (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:77536) jt (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:94939) _updatePlacement (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:128884) _render (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:473089) _triggerFrame/this._frame< (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:480190)

After configuring the card, then restarting HA to get clean logs I was still getting spammed with some of them;

Logger: frontend.js.latest.202401033
Source: components/system_log/__init__.py:300
First occurred: 09:05:59 (253 occurrences)
Last logged: 09:06:36

Uncaught error from Firefox 121.0 on Windows 10 TypeError: null has no properties el (/hacsfiles/bom-radar-card/bom-radar-card.js:12956:202566) fromInvProjectionMatrix (/hacsfiles/bom-radar-card/bom-radar-card.js:12956:205354) _calcMatrices (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:370574) clone (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:344966) Lt (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:77536) jt (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:94939) _updatePlacement (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:128884) _render (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:473089) _triggerFrame/this._frame< (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:480190)
Uncaught error from Firefox 121.0 on Windows 10 TypeError: null has no properties ul (/hacsfiles/bom-radar-card/bom-radar-card.js:12956:203220) fromInvProjectionMatrix/s< (/hacsfiles/bom-radar-card/bom-radar-card.js:12956:205658) fromInvProjectionMatrix (/hacsfiles/bom-radar-card/bom-radar-card.js:12956:205639) coveringTiles (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:353587) update (/hacsfiles/bom-radar-card/bom-radar-card.js:12957:124001) _updateSources (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:128001) _render (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:472945) _triggerFrame/this._frame< (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:480190)
Uncaught error from Firefox 121.0 on Windows 10 TypeError: r is null ul (/hacsfiles/bom-radar-card/bom-radar-card.js:12956:203220) fromInvProjectionMatrix/s< (/hacsfiles/bom-radar-card/bom-radar-card.js:12956:205658) fromInvProjectionMatrix (/hacsfiles/bom-radar-card/bom-radar-card.js:12956:205639) coveringTiles (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:353587) update (/hacsfiles/bom-radar-card/bom-radar-card.js:12957:124001) _updateSources (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:128001) _render (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:472945) _triggerFrame/this._frame< (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:480190)
Uncaught error from Firefox 121.0 on Windows 10 TypeError: r is null el (/hacsfiles/bom-radar-card/bom-radar-card.js:12956:202566) fromInvProjectionMatrix (/hacsfiles/bom-radar-card/bom-radar-card.js:12956:205354) _calcMatrices (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:370574) clone (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:344966) Lt (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:77536) jt (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:94939) _updatePlacement (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:128884) _render (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:473089) _triggerFrame/this._frame< (/hacsfiles/bom-radar-card/bom-radar-card.js:12961:480190)

This is 'sidebar' view... the old card completely fills the left side box. image

Cheers.

dw1562 commented 2 months ago

It's been a while. Any further progress?

Makin-Things commented 2 months ago

Sorry no further progress, although I might get some time this w/e to do something since it will be a good time for testing. I also suspect there is a memory leak in the current alpha version that needs to be hunted down.

Makin-Things commented 2 months ago

TBH I have been using the alpha for so long that I have forgotten what still needs doing. A quick look and I think it may just be the buttons to control playback (stop/step fw/step bw etc)

dw1562 commented 1 month ago

I finally decided to try the latest beta 3.02 It appears to be working but the display is very dark. Is there a way to lighten the map? I've set the style to "light" but that made no difference. Below is what it looks like and the current settings. image

type: custom:bom-radar-card card_title: Rain Radar data_source: BoM zoom_level: 9 center_latitude: -33.6708 center_longitude: 151.1153 show_radar_location: true show_playback: true show_range: true show_radar_coverage: true square_map: true map_style: light static_map: false show_marker: true show_scale: true show_zoom: true show_recenter: true extra_labels: false radar_location_radius: 2 radar_location_line_colour: r restart_delay: 0 frame_count: 7

dw1562 commented 1 month ago

I've managed to get a lighter map. It looks like the setting needed to be Light rather than light. I've moved the map around to somewhere with rain and can confirm that this is much better than the previous version (after the original BoM map style broke).

As can be seen in the above screenshot, I am not seeing any of the controls when viewing this in Chrome on my Windows laptop. The controls are shown when viewing it on my iPad. I can live with that but mentioning it in case it is a little bug somewhere.