Add an active Weather Radar Map

Add a Weather Radar Map

Go to https://www.wunderground.com/weather-radar/
Find your location in the drop down menu. Choose the closest region, then the station.
The map will then reset to the station.
You can adjust the parameters below the map to your taste. You can adjust them later in the url.

Once your satified, hit the “Save Image”.
A new window should open, copy the url.

Set up a camera in your config with the image url

camera:
  platform: generic
  still_image_url: https://radblast.wunderground.com/cgi-bin/radar/WUNIDS_map?station=OKX&brand=wui&num=8&delay=30&type=N0R&frame=0&scale=1.000&noclutter=0&showstorms=1&mapx=400&mapy=240&centerx=400&centery=240&transx=0&transy=0&showlabels=1&severe=0&rainsnow=0&lightning=1&smooth=0&rand=24330421&lat=0&lon=0&label=you  
  name: NYC

restart HA

Other sources from the replies:

USA
http://www.nhc.noaa.gov/satellite.php
use the animated gifs

Europe

KNMI’s weather gifs
http://www.knmi.nl/nederland-nu/weer/actueel-weer/neerslagradar1
Just pick the type of map you want and right click -> copy link address

31 Likes

I moved this to “Share your Projects!”-

nice idea! but too bad the radar map is not available for my location. Any suggestion for alternative?

try here
http://www.nhc.noaa.gov/satellite.php
use the animated gifs

This will work for any animated gif map you can get a direct URL to.

Super smart hack. Thanks

Actually after trying this HA spat an error out about an SSL cert error. I put it back to http:// and no problems.

:smiley:

Hi all,

I’m french and these websites don’t give me wanted informations.
So if you are not in USA try this for Europe

Good weather !

2 Likes

nice hack!

Great thinking!
For anyone in the Netherlands. You can use KNMI’s weather gifs from here: http://www.knmi.nl/nederland-nu/weer/actueel-weer/neerslagradar
Just pick the type of map you want and right click -> copy link address

1 Like

more sources http://www.tropicwx.com

2 Likes

https://weather.gc.ca/radar/index_e.html

Canada. From here you have to choose your nearest radar station. Haven’t tried this out yet, myself but looking forward to it.

2 Likes

Is there any way to remove the camera feed’s label that overlays the radar image? If I omit the name value it just displays “Generic Camera” or whatever. If I just leave name field blank, it doesn’t compile. I guess I could just make it a period, but it’d still have the dark bar at the bottom.

I wondered that as well.

Any option to adjust the size of the camera/map to be shown?

I thought I might share my toying with this type of approach with the Australian BOM radar images. I wasn’t able find a url that had the wanted images (although I am sure it exists) as BOM seem to provide the png’s in transparent layer format. So wanting to play a little with ImageMagick I installed the package and created a quick bash script. I am sure the python gurus can do better with a more eloquent script.

get_radar_img.sh

#!/bin/bash

#Config Variables
ID="IDR713"
iqty=5
img_out="/home/homeassistant/.homeassistant/satimgs/"

#Change to the images directory
cd $img_out

#Get the background images
wget -q 'ftp://ftp.bom.gov.au/anon/gen/radar_transparencies/'${ID}'.background.png'
wget -q 'ftp://ftp.bom.gov.au/anon/gen/radar_transparencies/'${ID}'.locations.png'

#get the $iqty most recent images quietly
curl --silent --list-only ftp.bom.gov.au/anon/gen/radar/|grep $ID.T|tail -$iqty|xargs -i wget -q 'ftp://ftp.bom.gov.au/anon/gen/radar/{}'

#Processes the images
convert -layers flatten -dispose none $ID.background.png $ID.locations.png -dispose previous $ID.T*.png -set delay 75 -loop 0 radar_$ID.gif

#Clean up temp files
rm $ID*

I then add an automation to grab and process the images on a regular (20 mins??) basis. This is the downside of this approach as I am downloading even when I am not using them. It takes about 5+ secs to download and process for me which was a bit laggy to call the script on page load.

script:
  get_radar:
    alias: Grab the latest BOM radar
    sequence:
      - service: shell_command.get_bom_radar

automation:
  alias: Call Radar Images
  trigger:
    platform: time
    minutes: '/20'
    seconds: 00
  action:
    service: script.get_radar

I then just added a camera.local_file to the appropriate group and all was well. There are still a couple of rough edges like the ImageMagick command is not quite right but I will tidy that up when I get a chance. BTW: You can easily change the number of images in the loop, size of the images, type of background overlays. This is really flexible in how the images look.

camera:
  - platform: local_file
    file_path: /home/homeassistant/.homeassistant/satimgs/radar_IDR713.gif
    name: bom radar

Let me know if anyone makes some improvements as I am a absolute HA nube (2 weeks and counting).

2 Likes

@rexyboy

Have a look at this thread for the BOM radar. It doesn’t do a loop though.

Thanks @tinglis1. I was able to find still images (png’s etc) but couldn’t find a link to the animated gifs so decided to make my own. As I mentioned it was just as much an excuse to play with ImageMagick.

@rexyboy any chance of getting into the “loop” :slight_smile:
Share that code! :slight_smile:

@aelg305 Of course. Everything you need should be in the post I made above. If you need a hand just let me know. BTW: The ImageMagik line is not 100% but I have not had a chance to get back to it yet.

Excellent! Thank you!