Add an active Weather Radar Map

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!

Wunderground seems to have changed. None of the images on this thread are showing up and I couldn’t find any radar images that would let me save the image link. NOAA on the other hand seems to be working fine.

Go here:

https://radar.weather.gov/radar.php?rid=ewx&product=N0R&overlay=11101111&loop=no

Change to your area by typing in your City, ST or Zip Code in the Local weather forecast by “City, St” box right above the radar map.

Then scroll down to Additional Resources on the right side of the screen.

Click on the image you want in Radar & Satellite Images.

Right click on the map and select “Copy image address” (in Chrome or whatever is appropriate to your browser).

Paste that address after still_image_url: as shown in original post.

Ba da bing, ba da boom. You’re done.

Is this just a static image from time of copy?

How does it refresh?

On mine it GIF of the radar

No point in displaying a static image.

OP still functional.

It’s an animated gif that seems to update fairly regularly.

I didn’t notice any change in the image while loaded in HASS.

The setup from the original post still work.

Is anyone able to get this Dark Sky / forcast.io Widget into Home Assistant? I’m trying via camera component, but am only getting “Image not available”:

Info (Dark Sky blog post):
https://blog.darksky.net/forecast-embeds/

Example:
http://forecast.io/embed/#lat=51.801822&lon=9.667969&name=Somewhere&color=#00aaff&units=ca

Thanks!

Since it is a webpage and not an image, you will have to use panel_iframe.

panel_iframe:
  darksky:
    title: 'DarkSky'
    url: 'http://forecast.io/embed/#lat=51.801822&lon=9.667969&name=Somewhere&color=#00aaff&units=ca'
2 Likes

As @arsaboo suggested I use something like this in panel_iframe

ex:

panel_iframe:
  windy:
    title: 'Windy'
    icon: mdi:weather-windy
    url: !secret windy_url 
  darksky:
    title: 'Darksky'
    icon: mdi:weather-lightning-rainy
    url: !secret darksky_url

2 Likes