I’m rather fond of meteograms, as they provide lots of meteorological data in a compact form. The Lovelace UI provides already a weather forecast card. I found two additional ways to include externally generated live visualizations in HA:
Pre-formated png file tailored for your region, like https://www.yr.no/place/Germany/Berlin/Dahlem/avansert_meteogram.png. For a simple version omit the advanced_. The forecast period is always 48 hours. This service of the Norwegian Meteorogical Institute comes for free, it may not cover all regions of interest.
Fully editable layout and content: https://api.meteograms.com/ This web-service complies an individual meteogram according to your specification including image height and width on the fly. It allows me to exactly fit it into my HADasbboard layout. Furthermore, it lets you choose between different data providers around the world, in my case DWD.
To get started with the API, call the website and play around with the “Options Editor”, and see the result in the “Live Preview” for free.
To get serious, you need to subscribe to a starter plan, and you have to provide a credit card. This starter subscription is basically stateless, it comes without “User login”. You rather have to remember your credentials, e.g. by clicking “Save Settings” and store the URL provided. This is your entry point to future editor access.
The Live Preview offers a direct URL. It starts with https://nodeserver.cloud3squared.com/getMeteogram… followed by your secret API-token. The parameter list is very long, as it contains all editor settings. Use this URL in your picture entity card or camera/iframe visualization.
Thanks for the overview of options. After dwelling into Meteogram, I can just confirm that it’s extremely powerful. It can be configured to show exactly what one needs.
I’d like to add how to practically get it into Home Assistant:
Add the following to configuration.yaml
camera:
- platform: generic
name: Meteogram
# Configuration page in Meteogram: https://api.meteograms.com/?hashkey=[your unique ID]
still_image_url: https://nodeserver.cloud3squared.com/getMeteogramX/[your uniqueID from Meteogram]
However, I have a question: After my first month of using Meteogram, I was charged for 5000 API requests. While it’s only 5 £, it’s still annoying. 500 requests are free per month, i.e. an update every second hour. That should be enough for my (and most peoples) need, but I can’t figure out how to change the update rate. It might be the parameter scan_interval: 5200, but from reading the forum, I have doubt that it will work. Any ideas?
I completely missed that @heinrich had responed with a suggested solution. It took me some time to figure out how to put his advice into practice.
What I did:
Step 0: Already had Meteogram setup as a camera.
Step 1: Allow HA to write to /tmp by adding the following to configuration.yaml:
Step 4: Execute the automation created (so that a snapshot is made)
Step 5: Setup Lovelace to read from the Meteogram Snapshot with a picture entity card
However, I’m currently stuck with no local file being produced (I checked using SSH). Need to troubleshoot this further. I can already now conclude that this is a cumbersome workaround.
It was a year since I last posted here, and since then I’ve been thinking how to make the setup simple yet efficient. I now have a setup I’m happy with and thought I would share it, so more people can benefit from the excellent Meteograms.
No file management is needed, no automation setup needed, just an addition to configuration.yaml, yet it’s possible to control how often the Meteogram is updated (keeping within the free quota). The secret sause to this is to make some acrobatics with the template URL.
Add the following to configuration.yaml
camera:
- platform: generic
# Admin: https://api.meteograms.com/?hashkey=XXXXXXX
name: Meteogram
still_image_url: '{{ "https://meteogram.cloud3squared.com/getMeteogram?hashkey=XXXXXX"+ "&" + (((now().hour*60 + now().minute)/90)|round(0,"floor")|string) }}'
#The number before round (90) states number of minutes between refetch
limit_refetch_to_url_change: true
The free plan for Meteograms includes 1500 units, and with my configuration of the Meteogram, each time Home assistant fetches an update, 3 units are consumed (since my Meteogram uses data from multiple sources).
To calculate how often I can update the Meteogram without exceeding the free quota, I’ve used this formula:
44640 (number of minutes per month) / 1500 (free quota) * 3 (number of units per update) = 89