Closed 9037568 closed 4 years ago
Additional is in the file org.openhab.binding.dwdunwetter\src\main\resources\ESH-INF\i18n\dwdunwetter_de.properties is an error
# binding
binding.dwdunwetter.name = DWD Unwetter Binding
**binding.tankerkoenig.description** = Das DWD Unwetter Binding ermöglicht es über die API des DWD aktuelle Unwetterwarnungen abzurufen
We now have evidence that the binding is receiving warnings data, at least in some cases.
It looks the binding only returns warnings data for a place if a warning is really in effect. Otherwise the file with no data is returned. You can check it quite easy:
@mbremer99:
It looks the binding only returns warnings data for a place if a warning is really in effect.
Seems like that should be fairly obvious. I guess I should have changed the title of this issue once I confirmed the binding was receiving data. I'll take care of that momentarily.
The second community thread I linked above hints at what the actual problem is. From what I can see so far, the binding works fine until it fails to retrieve data for some reason. e.g.:
15:45:48.964 [WARN ] [er.internal.data.DwdWarningDataAccess] - Communication error occurred while getting data
15:45:48.964 [DEBUG] [er.internal.data.DwdWarningDataAccess] - Communication error trace
java.io.IOException: java.util.concurrent.ExecutionException: java.net.UnknownHostException: maps.dwd.de
After that, the binding does not update that Thing any longer. I'm working on a fix for this now. I'd also like to add a couple channels for tracking the total number of warnings received and the cell id associated with each warning. I don't know if I should create a separate PR for that...
Based on the discussion found in the community forum thread "Frustrated with DWDUnwetter".
Expected Behavior
The binding should receive valid data.
Current Behavior
The binding appears to be getting none of the data it expects when requesting data.
The binding sends this query:
And receives this response:
The interesting part of the response appears to be this:
The binding then proceeds to do absolutely no validation of the response, provides the user with no useful feedback to indicate that the request has utterly failed, and remains "ONLINE".
Possible Solution
We need a valid query for the binding to sendI have found that the URL below returns 10844 values, so it appears to be a matter of finding a CQL filter string that works...
https://maps.dwd.de/geoserver/dwd/ows?service=WFS&request=GetFeature&typeName=dwd:Warnungen_Gemeinden