DWD-Unwetter-Binding (OH3) no warnings

I am not receiving any updates on DWD-Unwetterwarnung, but the following entry is in the log:

2020-12-27 10:12:32.787 [INFO ] [openhab.event.ChannelTriggeredEvent ] - dwdunwetter:dwdwarnings:03662255ae:updated0 triggered NEW

According to the documentation and the automatic thing definition in the MainUI, the first warning should be with warningN (N = 1) not “updated0”.

Only the channel “lastUpdated” that is not related to a specific warning ist updated:
2020-12-27 11:02:00.667 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'WarningAbgLastUpdated' changed from 2020-12-27T11:00:50.313641+0100 to 2020-12-27T11:02:00.666166+0100

Additional Information: I am using OH3 in a docker container at my Synology Diskstation 920+
Could anybody give me a hint?

I have a similar problem with the binding since my switch to openHAB 3. Today I restarted, but no log entries. DWD Pollenflug is still working.

It might be my fault. I will look into this tomorrow. Possibly caused by my refactoring:

Hi there,
thanks for your support. It would be nice if you could give us a short feedback as to whether it is due to the revision of the binding. Then I wait and look for the other points / problems that my double migration (OH2 -> OH3 and PI4 -> DS920 +) has brought with it.

I found the culprit. Here is a *.jar file with a fixed version: org.openhab.binding.dwdunwetter-3.1.0-SNAPSHOT.txt (28.6 KB)

Please rename it from “.txt” to “.zip”, extract the “.jar” file and put it into your addons/ folder. Uninstall any other DWD Unwetter binding version before.

1 Like

I’ve change the Cell-Id because at the moment there is no warning at my local Cell-Id :slight_smile:
The snapshot work with the tested Cell-Id (815085370), only the “Height (from)(1)” and “Height (to)(1)” values are “Err” and the trigger “Updated(1)” is NULL. But this might be correct?
815085370

Thanks a lot.

Hi,

I have installed the snapshot-version from this thread.
I get no information in the log and no warnings are loaded.

In the JSON (https://www.dwd.de/DWD/warnungen/warnapp/json/warnings.json) I have testet that I use a right ID with a warning.

How can I debug a little more?

Thanks,
Reinhard

You can enable DEBUG logging on org.openhab.binding.dwdunwetter to see what is happening.

Hi Christoph,

where (in which file) can I activate the DEBUG-mode?
Is /var/lib/openhab/etc/log4j2.xml the right destination?

Thanks,
Reinhard

Hi Reinhard,

Yes, that is one way. You can enable e.g. TRACE logging for the binding by the following steps:

  • open the Karaf console: The Console | openHAB
  • set the logging level to TRACE for binding ( log:set TRACE org.openhab.binding.dwdunwetter )
    Logging | openHAB
  • view log with log:tail or log:tail org.openhab.binding.dwdunwetter
1 Like

Hi,

I have tested with DWD Unwetter Binding 3.0.1. I have warnings in my tested cell-id’s.

I’ll get the following TRACE-Messages:

2021-02-13 17:24:42.540 [DEBUG] [.internal.handler.DwdUnwetterHandler] - Start initializing!
2021-02-13 17:24:42.543 [DEBUG] [r.internal.data.DwdWarningDataAccess] - Refreshing Data for cell 109184000
2021-02-13 17:24:42.545 [DEBUG] [.internal.handler.DwdUnwetterHandler] - Finished initializing!
2021-02-13 17:24:42.674 [TRACE] [r.internal.data.DwdWarningDataAccess] - Raw request: https://maps.dwd.de/geoserver/dwd/ows?service=WFS&version=2.0.0&request=GetFeature&typeName=dwd:Warnungen_Gemeinden&CQL_FILTER=WARNCELLID+LIKE+‘109184000’
2021-02-13 17:24:42.675 [TRACE] [r.internal.data.DwdWarningDataAccess] - Raw response: <?xml version="1.0" encoding="UTF-8"?><wfs:FeatureCollection xmlns:xs=“XML Schema” xmlns:dwd=“http://www.dwd.de” xmlns:wfs=“http://www.opengis.net/wfs/2.0” xmlns:gml=“http://www.opengis.net/gml/3.2” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” numberMatched=“0” numberReturned=“0” timeStamp=“2021-02-13T16:24:42.642Z” xsi:schemaLocation=“http://www.dwd.de https://maps.dwd.de/geoserver/dwd/wfs?service=WFS&version=2.0.0&request=DescribeFeatureType&typeName=dwd%3AWarnungen_Gemeinden http://www.opengis.net/wfs/2.0 https://maps.dwd.de/geoserver/schemas/wfs/2.0/wfs.xsd http://www.opengis.net/gml/3.2 https://maps.dwd.de/geoserver/schemas/gml/3.2.1/gml.xsd”/>
2021-02-13 17:27:23.046 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model ‘DWDUnwetter.things’
2021-02-13 17:27:23.086 [DEBUG] [.internal.handler.DwdUnwetterHandler] - Start initializing!
2021-02-13 17:27:23.089 [DEBUG] [.internal.handler.DwdUnwetterHandler] - Finished initializing!
2021-02-13 17:27:23.091 [DEBUG] [r.internal.data.DwdWarningDataAccess] - Refreshing Data for cell 109174000
2021-02-13 17:27:23.233 [TRACE] [r.internal.data.DwdWarningDataAccess] - Raw request: https://maps.dwd.de/geoserver/dwd/ows?service=WFS&version=2.0.0&request=GetFeature&typeName=dwd:Warnungen_Gemeinden&CQL_FILTER=WARNCELLID+LIKE+‘109174000’
2021-02-13 17:27:23.234 [TRACE] [r.internal.data.DwdWarningDataAccess] - Raw response: <?xml version="1.0" encoding="UTF-8"?><wfs:FeatureCollection xmlns:xs=“XML Schema” xmlns:dwd=“http://www.dwd.de” xmlns:wfs=“http://www.opengis.net/wfs/2.0” xmlns:gml=“http://www.opengis.net/gml/3.2” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” numberMatched=“0” numberReturned=“0” timeStamp=“2021-02-13T16:27:23.199Z” xsi:schemaLocation=“http://www.dwd.de https://maps.dwd.de/geoserver/dwd/wfs?service=WFS&version=2.0.0&request=DescribeFeatureType&typeName=dwd%3AWarnungen_Gemeinden http://www.opengis.net/wfs/2.0 https://maps.dwd.de/geoserver/schemas/wfs/2.0/wfs.xsd http://www.opengis.net/gml/3.2 https://maps.dwd.de/geoserver/schemas/gml/3.2.1/gml.xsd”/>

Also in DWD Unwetter Binding 3.0.0 and 3.0.1 I have the same problem.

Any tipps für solving my issue?

Best regards,
Reinhard

Hi,

after enabling debugging of the DWD Unwetter Binding, I found exactly the same response as Reinhard did for the warncell id from my configuration.

So I suspect it’s a general issue with the binding? I’m using the SNAPSHOT that was announced here on Dec 30th.

By the way: In the complete json from the binding documentation I found two warncell ids for my city. I tried setting up the thing with both, but the results are always the same.

Regards
Daniel

Hi Forum,

does anyone has an idea to fix it?
Is it possible that there is a problem in the binding 3.0.1 that only fixed in Snapshot 3.1?

Best Regards,
Reinhard

Hello Forum,

I am testing the DWD Unwetter Binding just at the moment and have seen the same response.
I found warnings for several Cell-IDs in the json-file, but when I tested to request those warnings by using those Cell-IDs through the Unwetter-Binding it returned no warnings. I assume the reason for this is, that there are differences with the warnings issued through the json-file and the geoserver-request that the Unwetter-Binding uses.

I would suggest to enter the mentioned “raw request” in a web browser.

https://maps.dwd.de/geoserver/dwd/ows?service=WFS&version=2.0.0&request=GetFeature&typeName=dwd:Warnungen_Gemeinden&CQL_FILTER=WARNCELLID+LIKE+‘109184000’ 

As a result a file "features.xml’ is returned. If this file contains

numberMatched=“0” numberReturned=“0”

then there is actually no warning returned by the DWD server for the given cell-ID and it is not a fault of the binding.

Regards,
Jörg

I did manage to get it running for my case.

The actual issue is: The module uses the hardcoded URL https://maps.dwd.de/geoserver/dwd/ows?service=WFS&version=2.0.0&request=GetFeature&typeName=dwd:Warnungen_Gemeinden&CQL_FILTER=WARNCELLID+LIKE+

This does not work for “Landkreise”

I’ve changed the URL to https://maps.dwd.de/geoserver/dwd/ows?service=WFS&version=2.0.0&request=GetFeature&typeName=dwd:Warnungen_Landkreise&CQL_FILTER=GC_WARNCELLID+LIKE+ which gives me the expected output for my cell ID.

I do see two solutions here:

  • Intruduce a parameter to use either the “Gemeine” or the “Landkreis” url
  • fallback to the “Landkreis” route as a fallback when there is no data returned from the “Gemeinde” route

Open for suggestion and willing to work on this :wink:

If someone is working on the “DWD-Unwetter” binding, i suggest to solve another problem:
(I know this is slightly off-topic, but it is only a short hint in case the code is revised anyway).

Converting the values for “ALTITUDE” and “CEILING” can lead to conversion errors:

<dwd:ALTITUDE>0</dwd:ALTITUDE>
 <dwd:CEILING>9842.5197</dwd:CEILING>

will throw a conversion error:

14:01:01.734 [WARN ] [se.internal.SseItemStatesEventBuilder] - Exception while formatting value '3000.00000456 m' of item WeatherWarnings_Heightto1 with format '%d m': d != java.math.BigDecimal

I assume that the conversion from “feet” to “m” is the reason for this. The correct result should be “3000 m”.

@JoergDr Thanks for the hint. I created a PR to fix it:

At the moment there is another issue with the “DWD-Unwetter” binding:
The DWD servers answer very slow. The timeout value of 5000 ms is not sufficient:

14:50:46.866 [WARN ] [er.internal.data.DwdWarningDataAccess] - Communication error occurred while getting data: java.util.concurrent.TimeoutException: Total timeout 5000 ms elapsed

(Please tell me if I should open a new thread instead of posting this here)

Regards,
Jörg

I think I’ll have the same problem as @plevie. Is there a solution for my issue?

Normally, you just have to wait until there is a concrete warning for your city.
I had to wait several weeks, until today. Now there is a warning “Sturmböen” and it is available for my city.

If you change the URL from “Warnungen_Gemeinden” to “Warnungen_Landkreise” you will get more warnings, but the location is less precise.