Due to the latest bad weather events I have created a new sensor.
This is great!
Since yesterday i have a generic camera with Weatherwarning Pictures from DWD
Maybe a feature for your app?
- platform: generic
still_image_url: http://www.dwd.de/DWD/warnungen/warnstatus/SchilderMS.jpg
name: DWD Warnungen
Links here. Thanks @RubenKelevra
Hi @runningman84, thank you for your hard work, integrating the sensor into HA.
I followed the PR and think itâs not easy.
Thereâs a little problem with the docs:
sensor:
- platform: dwdwarnapp
Results in Error on HA start:
Failed config
General Errors:
- Platform not found: sensor.dwdwarnapp
If i use - platform: dwd_weather_warnings
like statet in your PR, everything works.
yes the docs were still using the old name, this is a fix for the docs:
https://github.com/home-assistant/home-assistant.github.io/pull/3335
You wouldnât have example code to deal with weather alerts above a certain level?
Take a look here:
Thanks a lot
Documentation of the DWD sensor (https://www.home-assistant.io/components/sensor.dwd_weather_warnings/) mentions that the warning level ranges from 0 to 4, but mine shows 10:
How to interpret that?
I havenât found any warning level details on the DVD homepage.
Thanks.
Then you should run!
Just kidding. I found one documentation on the DWD page: Wetterwarnungen. However, it also states warning levels ranging from 0 to 4. I donât know which data basis is used for the DWD component. In the json-file, I also found the level 10.
{âregionNameâ:âBerlinâ,âstartâ:1533718800000,âendâ:1533834000000,âtypeâ:8,âstateâ:âBerlinâ,âlevel":10,âstateShortâ:âBLâ,âdescriptionâ:âAm Mittwoch wird eine extreme WĂ€rmebelastung erwartet.\nAm Donnerstag wird eine starke WĂ€rmebelastung erwartet.\nâ,âaltitudeStartâ:null,âaltitudeEndâ:200,âheadlineâ:âAmtliche WARNUNG vor HITZEâ,âinstructionâ:â An beiden Tagen ist mit einer zusĂ€tzlichen Belastung aufgrund verringerter nĂ€chtlicher AbkĂŒhlung insbesondere im dicht bebauten Stadtgebiet von Berlin zu rechnen.Heute ist der 2. Tag der Warnsituation in Folge.\n",âeventâ:âHITZEâ}]
No idea what this means. So I guess, the component works correctly but the interpretation of the data is somehow misleading.
Edit: to be honest, level 10 is even too small for the current heat
DWD Warning stopped working.
Seeing this error the whole day every 15 minutes in my log.
2018-08-31 21:37:24 ERROR (SyncWorker_4) [homeassistant.components.sensor.rest] Error fetching data: <PreparedRequest [GET]> from https://www.dwd.de/DWD/warnungen/warnapp_landkreise/json/warnings.json?jsonp=loadWarnings failed with HTTPSConnectionPool(host=âwww.dwd.deâ, port=443): Max retries exceeded with url: /DWD/warnungen/warnapp_landkreise/json/warnings.json?jsonp=loadWarnings (Caused by SSLError(SSLError(1, â[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777)â),))
2018-08-31 21:37:24 ERROR (SyncWorker_4) [homeassistant.components.sensor.dwd_weather_warnings] Unable to fetch data from DWD-Weather-Warnings
Can someone confirm this?
EDIT: Also my generic cameras with pictures from dwd stopped working.
When i open the api url or the images in my browser, they work.
Has HA a problem with it?
When I open the api url in a browser, I get the following error:
âSyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON dataâ
I think the json result is malformatted.
Github issue:
Actually the result depends from browser to browser. Firefox is throwing the error you mentioned, Chrome is working fine.
Depends which certs are included in the browsers or operating systems CA cert chain.
Chrome includes the intermediate CA certs of https://www.pki.dfn.de/ueberblick-dfn-pki/ which have been used to issue the cert âwww.dwd.deâ, which enabled Chrome to fully validate the cert, but Mozilla is lacking those CA certs.
I have added the two missing CA certs into my RasPis /etc/ssl/certs, now wget works, but home-assistant still doesnât.
After adding the missing CA certs to lib/python3.5/site-packages/certifi/cacert.pem the DWD weather warnings are working!
Is it possible to do this in hassio?
I would think so, if you know how. You have to find out how to ssh to your RasPi (AFAIR port 222, instead of the hass.io-container which listens on default ssh-port 22) and find out where the files are. (in my case: /srv/homeassistant, then see above)
Or wait until the certs are updated in one of the next versions, which would be the correct solution.
where exactly did you get the two CA certs? here? https://www.pki.dfn.de/wurzelzertifikate/globalroot2/
I had the exact same thing in my head. Maybe exported the cert from the homepage?
I googled the names of the intermediate certs that I saw in the âwww.dwd.deâ-cert, payed attention that what Iâve found was from DFN-websites, compared the cert-fingerprints and downloaded them:
https://www.pki.dfn.de/fileadmin/PKI/zertifikate/DFN-Verein_Certification_Authority_2.pem
http://cdp.pca.dfn.de/dfn-ca-global-g2/pub/cacert/cacert.pem