Comments (6)
This sounds like a nice idea. The precipitation forecast right now is, as you have already mentioned, only based on the mosmix model. So including the radar would be a nice add-on.
The reference implementation helps a lot, but right now I don't have much time to include this timely. Can you maybe assist with this?
from dwd_weather.
You may want to check out https://www.ajfriesen.com/rain-warning-sensor-with-home-assistant/
from dwd_weather.
You may want to check out https://www.ajfriesen.com/rain-warning-sensor-with-home-assistant/
This service (https://morgenwirdes.de) is not reliable and has a lot of incorrect information. I built my own radar based on OpenWeatherMap that can be used anywhere in the world. For germany it is also very accurate and I love it.
To get an idea, check this out.
https://community.home-assistant.io/t/morning-weather-notification-with-daily-high-temperature/385504/24
from dwd_weather.
actually i found morgenwirdes.de to delivery very good rain warnings from DWDs radolan (radar) rain data. from the data i can draw a bar chart with expected rain amounts over the next 2 hours, with datapoints every 5 minutes. however every now and then the morgenwirdes.de server returns no values or an error.
i found this library https://github.com/dimitri-rebrikov/dwd_utils which can fetch the radolan data directly from DWD. you can run the script https://github.com/dimitri-rebrikov/dwd_utils/blob/main/radolan.py directly from the command line and it gets radolan data over the next 2 hours for a (german) PLZ. usage seems to consume quite some CPU cycles but if you call it only every 5 minutes thats not to bad.
i changed the code a bit so it outputs a json string that i can read with a command line sensor.
with the json data a can build my bar chart or, as an example, a spark line graph. this is an example to test the radolan data in the HA template editor:
{% set data = {"timestamp": "2023-05-09T23:50:00.000Z", "forecasts": [{"forecast": "000", "value": 0.24, "timestamp": "2023-05-09T23:50:00.000000Z"}, {"forecast": "005", "value": 0.12, "timestamp": "2023-05-09T23:55:00.000000Z"}, {"forecast": "010", "value": 0.12, "timestamp": "2023-05-10T00:00:00.000000Z"}, {"forecast": "015", "value": 0.0, "timestamp": "2023-05-10T00:05:00.000000Z"}, {"forecast": "020", "value": 0.0, "timestamp": "2023-05-10T00:10:00.000000Z"}, {"forecast": "025", "value": 0.12, "timestamp": "2023-05-10T00:15:00.000000Z"}, {"forecast": "030", "value": 0.12, "timestamp": "2023-05-10T00:20:00.000000Z"}, {"forecast": "035", "value": 0.12, "timestamp": "2023-05-10T00:25:00.000000Z"}, {"forecast": "040", "value": 0.24, "timestamp": "2023-05-10T00:30:00.000000Z"}, {"forecast": "045", "value": 0.24, "timestamp": "2023-05-10T00:35:00.000000Z"}, {"forecast": "050", "value": 0.0, "timestamp": "2023-05-10T00:40:00.000000Z"}, {"forecast": "055", "value": 0.12, "timestamp": "2023-05-10T00:45:00.000000Z"}, {"forecast": "060", "value": 0.0, "timestamp": "2023-05-10T00:50:00.000000Z"}, {"forecast": "065", "value": 0.0, "timestamp": "2023-05-10T00:55:00.000000Z"}, {"forecast": "070", "value": 0.12, "timestamp": "2023-05-10T01:00:00.000000Z"}, {"forecast": "075", "value": 0.24, "timestamp": "2023-05-10T01:05:00.000000Z"}, {"forecast": "080", "value": 0.24, "timestamp": "2023-05-10T01:10:00.000000Z"}, {"forecast": "085", "value": 0.12, "timestamp": "2023-05-10T01:15:00.000000Z"}, {"forecast": "090", "value": 0.0, "timestamp": "2023-05-10T01:20:00.000000Z"}, {"forecast": "095", "value": 0.0, "timestamp": "2023-05-10T01:25:00.000000Z"}, {"forecast": "100", "value": 0.0, "timestamp": "2023-05-10T01:30:00.000000Z"}, {"forecast": "105", "value": 0.0, "timestamp": "2023-05-10T01:35:00.000000Z"}, {"forecast": "110", "value": 0.0, "timestamp": "2023-05-10T01:40:00.000000Z"}, {"forecast": "115", "value": 0.0, "timestamp": "2023-05-10T01:45:00.000000Z"}, {"forecast": "120", "value": 0.0, "timestamp": "2023-05-10T01:50:00.000000Z"}]} %}
dwd:
{%- for fiveminutes in data.forecasts %}
{%- if loop.index > 24 %}{{""}}
{%- else %}
{%- set rainintensity = fiveminutes.value %}
{%- if rainintensity < 0.1 %}{{"▁"}}
{%- elif 0.1 <= rainintensity < 0.5 %}{{"▂"}}
{%- elif 0.5 <= rainintensity < 1 %}{{"▃"}}
{%- elif 1 <= rainintensity < 1.5 %}{{"▄"}}
{%- elif 1.5 <= rainintensity < 2 %}{{"▅"}}
{%- elif 2 <= rainintensity < 3.5 %}{{"▆"}}
{%- elif 3.5 <= rainintensity < 5 %}{{"▇"}}
{%- elif 5 <= rainintensity < 10 %}{{"█"}}
{%- else %}{{"▓"}}
{%- endif %}
{%- endif %}
{%- endfor %}
dwd → 8:
{%- set raindata = namespace(list=[]) -%}
{%- for n in data.forecasts -%}
{%- set raindata.list = raindata.list + [n.value] %}
{%- endfor -%}
{%- for fiveminutes in raindata.list|batch(3) %}
{%- if loop.index > 8 %}{{""}}
{%- else %}
{%- set rainintensity = fiveminutes|max|float %}
{%- if rainintensity < 0.1 %}{{"▁"}}
{%- elif 0.1 <= rainintensity < 0.5 %}{{"▂"}}
{%- elif 0.5 <= rainintensity < 1 %}{{"▃"}}
{%- elif 1 <= rainintensity < 1.5 %}{{"▄"}}
{%- elif 1.5 <= rainintensity < 2 %}{{"▅"}}
{%- elif 2 <= rainintensity < 3.5 %}{{"▆"}}
{%- elif 3.5 <= rainintensity < 5 %}{{"▇"}}
{%- elif 5 <= rainintensity < 10 %}{{"█"}}
{%- else %}{{"▓"}}
{%- endif %}
{%- endif %}
{%- endfor %}
![image](https://private-user-images.githubusercontent.com/4541494/237281087-c331d73e-ed73-40dd-9a9f-519d29c040d3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDc2NDY5NzQsIm5iZiI6MTcwNzY0NjY3NCwicGF0aCI6Ii80NTQxNDk0LzIzNzI4MTA4Ny1jMzMxZDczZS1lZDczLTQwZGQtOWE5Zi01MTlkMjljMDQwZDMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDIxMSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDAyMTFUMTAxNzU0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MzM2MzYxMWJhNTAzMDMzYWIyNjJlMDZhODgwMTE5NzBlYzRmMjdjOThmYjFkNzljMTczNjJjMGZkMWYwZDFmOCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.lZltY3OD4XP6ekDq4Mne4o0itQ6ZvpLX468VW8er8wc)
i guess adding the dwd_utils
library to get radolan data into this custom component shouldn’t be too hard, though my coding skills are really limited and i wouldn’t be of much help. however, if anyone is interested i can share the code of the command line sensor stuff i built so far (and which i am still testing).
from dwd_weather.
actually i found morgenwirdes.de to delivery very good rain warnings from DWDs radolan (radar) rain data. from the data i can draw a bar chart with expected rain amounts over the next 2 hours, with datapoints every 5 minutes. however every now and then the morgenwirdes.de server returns no values or an error.
i found this library https://github.com/dimitri-rebrikov/dwd_utils which can fetch the radolan data directly from DWD. you can run the script https://github.com/dimitri-rebrikov/dwd_utils/blob/main/radolan.py directly from the command line and it gets radolan data over the next 2 hours for a (german) PLZ. usage seems to consume quite some CPU cycles but if you call it only every 5 minutes thats not to bad. i changed the code a bit so it outputs a json string that i can read with a command line sensor.
with the json data a can build my bar chart or, as an example, a spark line graph. this is an example to test the radolan data in the HA template editor:
{% set data = {"timestamp": "2023-05-09T23:50:00.000Z", "forecasts": [{"forecast": "000", "value": 0.24, "timestamp": "2023-05-09T23:50:00.000000Z"}, {"forecast": "005", "value": 0.12, "timestamp": "2023-05-09T23:55:00.000000Z"}, {"forecast": "010", "value": 0.12, "timestamp": "2023-05-10T00:00:00.000000Z"}, {"forecast": "015", "value": 0.0, "timestamp": "2023-05-10T00:05:00.000000Z"}, {"forecast": "020", "value": 0.0, "timestamp": "2023-05-10T00:10:00.000000Z"}, {"forecast": "025", "value": 0.12, "timestamp": "2023-05-10T00:15:00.000000Z"}, {"forecast": "030", "value": 0.12, "timestamp": "2023-05-10T00:20:00.000000Z"}, {"forecast": "035", "value": 0.12, "timestamp": "2023-05-10T00:25:00.000000Z"}, {"forecast": "040", "value": 0.24, "timestamp": "2023-05-10T00:30:00.000000Z"}, {"forecast": "045", "value": 0.24, "timestamp": "2023-05-10T00:35:00.000000Z"}, {"forecast": "050", "value": 0.0, "timestamp": "2023-05-10T00:40:00.000000Z"}, {"forecast": "055", "value": 0.12, "timestamp": "2023-05-10T00:45:00.000000Z"}, {"forecast": "060", "value": 0.0, "timestamp": "2023-05-10T00:50:00.000000Z"}, {"forecast": "065", "value": 0.0, "timestamp": "2023-05-10T00:55:00.000000Z"}, {"forecast": "070", "value": 0.12, "timestamp": "2023-05-10T01:00:00.000000Z"}, {"forecast": "075", "value": 0.24, "timestamp": "2023-05-10T01:05:00.000000Z"}, {"forecast": "080", "value": 0.24, "timestamp": "2023-05-10T01:10:00.000000Z"}, {"forecast": "085", "value": 0.12, "timestamp": "2023-05-10T01:15:00.000000Z"}, {"forecast": "090", "value": 0.0, "timestamp": "2023-05-10T01:20:00.000000Z"}, {"forecast": "095", "value": 0.0, "timestamp": "2023-05-10T01:25:00.000000Z"}, {"forecast": "100", "value": 0.0, "timestamp": "2023-05-10T01:30:00.000000Z"}, {"forecast": "105", "value": 0.0, "timestamp": "2023-05-10T01:35:00.000000Z"}, {"forecast": "110", "value": 0.0, "timestamp": "2023-05-10T01:40:00.000000Z"}, {"forecast": "115", "value": 0.0, "timestamp": "2023-05-10T01:45:00.000000Z"}, {"forecast": "120", "value": 0.0, "timestamp": "2023-05-10T01:50:00.000000Z"}]} %} dwd: {%- for fiveminutes in data.forecasts %} {%- if loop.index > 24 %}{{""}} {%- else %} {%- set rainintensity = fiveminutes.value %} {%- if rainintensity < 0.1 %}{{"▁"}} {%- elif 0.1 <= rainintensity < 0.5 %}{{"▂"}} {%- elif 0.5 <= rainintensity < 1 %}{{"▃"}} {%- elif 1 <= rainintensity < 1.5 %}{{"▄"}} {%- elif 1.5 <= rainintensity < 2 %}{{"▅"}} {%- elif 2 <= rainintensity < 3.5 %}{{"▆"}} {%- elif 3.5 <= rainintensity < 5 %}{{"▇"}} {%- elif 5 <= rainintensity < 10 %}{{"█"}} {%- else %}{{"▓"}} {%- endif %} {%- endif %} {%- endfor %} dwd → 8: {%- set raindata = namespace(list=[]) -%} {%- for n in data.forecasts -%} {%- set raindata.list = raindata.list + [n.value] %} {%- endfor -%} {%- for fiveminutes in raindata.list|batch(3) %} {%- if loop.index > 8 %}{{""}} {%- else %} {%- set rainintensity = fiveminutes|max|float %} {%- if rainintensity < 0.1 %}{{"▁"}} {%- elif 0.1 <= rainintensity < 0.5 %}{{"▂"}} {%- elif 0.5 <= rainintensity < 1 %}{{"▃"}} {%- elif 1 <= rainintensity < 1.5 %}{{"▄"}} {%- elif 1.5 <= rainintensity < 2 %}{{"▅"}} {%- elif 2 <= rainintensity < 3.5 %}{{"▆"}} {%- elif 3.5 <= rainintensity < 5 %}{{"▇"}} {%- elif 5 <= rainintensity < 10 %}{{"█"}} {%- else %}{{"▓"}} {%- endif %} {%- endif %} {%- endfor %}
i guess adding the `dwd_utils` library to get radolan data into this custom component shouldn’t be too hard, though my coding skills are really limited and i wouldn’t be of much help. however, if anyone is interested i can share the code of the command line sensor stuff i built so far (and which i am still testing).
I am using OpenWeatherMaps for months now and am located in Germany. Data is very accurate and similar what DWD is returning (sometimes same) so I don't see a reason why using some custom complicated and not reliable solutions.
from dwd_weather.
I am using OpenWeatherMaps for months now and am located in Germany
i know, that’s what you wrote above and it’s great if you are happy with the OWM forceasts. however the radolan/radar forecasts from DWD are very precise (24 data points for 2 hour forecast) and according to my observations very reliable, so i use the DWD radolan forecasts in addition to rain forecasts from OWM, this components DWD mosmix data and also forecasts from weatherkit.
OWM claims to also use radar data for their forecasts
We collect and process weather data from different sources such as global and local weather models, satellites, radars and a vast network of weather stations
but according to my observation the OWM forecasts lack precision and reliability (i live in berlin) this might well differ from region to region. same with the mosmix forecasts from DWD and weatherkit that seem to be purely model based and deliver more or less accurate estimates with lots of false positives.
from dwd_weather.
Related Issues (20)
- DWD weather data missing HOT 7
- unknown locale: en_DE when adding new station HOT 4
- Odd values for humidity HOT 2
- v.2.0.10 error in Log file HOT 3
- AttributeError: 'int' object has no attribute 'year'
- Old weather forecast complain HOT 4
- Wind bearing in degrees instead of cardinal direction HOT 1
- Support UVINDEX HOT 5
- sensor naming scheme has been changed with HA 2023.11 HOT 9
- "Interpolate values" looks weird HOT 23
- Wrong area in Weather report after update to v2.0.13 HOT 1
- `weather.get_forecast` is being deprecated in favor of `weather.get_forecasts` HOT 4
- TypeError: '<' not supported between instances of 'NoneType' and 'float' HOT 1
- 504 Gateway Time-out during initial configuration HOT 3
- Deprecated constants which will be removed in HA Core 2025.1 HOT 1
- weather.get_forecasts ignores wind_speed_unit HOT 1
- Hourly Forecast not updated/refreshed in cards HOT 8
- Visibilty (sichtweite) shows wrong unit hPa.. HOT 2
- Invalid escape sequence (2024.2.0b0) HOT 2
- Sun Duration sensor looses information until current hour (past lost) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dwd_weather.