[Solved] Frustrated with DWDUnwetter binding

Hello,
my dwdunwetter thing is not working at all whta is wrong by the configuration??

Thing:

Thing dwdunwetter:dwdwarnings:test "Warnings test" [ cellId="103101000", refresh=15, warningCount=1 ]

items:

String string_dwdweatherwarningtest_type "Type [%s]" { channel="dwdunwetter:dwdwarnings:test:event1" }

``

and nothing is displayed but

https://www.dwd.de/DWD/warnungen/warnapp/json/warnings.json

shows:


```csv
* time: 1580052511000,

* warnings: {
  * 103101000: [
    * {
      * regionName: "Stadt Braunschweig",

      * start: 1580054400000,

      * end: 1580108400000,

      * type: 5,

      * state: "Niedersachsen",

      * level: 2,

      * stateShort: "NS",

      * description: "Es tritt leichter Frost bis -2 °C auf. In Bodennähe wird leichter Frost bis -4 °C erwartet.",

      * event: "FROST",

      * headline: "Amtliche WARNUNG vor FROST",

      * instruction: "",

      * altitudeStart: null,

      * altitudeEnd: null}],

You are trying to display an event type. Are there currently any weather event warning when you are testing?

This is active

I thought it should be displayed 5??

1 Like

I do not know. I am in the United States but it is sometimes easy to miss the obvious so I thought it was worth a check.

I’ve never used this binding but if your frustrated with it have a look at DarkSky.

Another option is https://www.yr.no/place/Denmark/Capital/Copenhagen/

In your sitemap file add:

Frame label=Meteogram {
		Image url="https://www.yr.no/place/Denmark/Capital/Copenhagen/advanced_meteogram.png" label="Meteogram" refresh=360000
	}

This will give you a three-day forecast, no binding needed, just make sure that you are not refreshing too frequently, otherwise, this (and similar sites) will block you. You only need to change the site location. :wink:

1 Like

Or get a log file and figure out why it’s not working.

1 Like

The configuration looks OK.
I did a test with the same cellID getting the same result.
Raising the log:level to DEBUG did not reveal anything.

Do you mean the debug output wasn’t helpful, or you didn’t see any debug output at all?

Sorry for being not precise enough.
There were one or two DEBUG lines, but those didn’t help much.
The most usefull was this:

[DEBUG] [r.internal.data.DwdWarningDataAccess] - Refreshing Data: https://maps.dwd.de/geoserver/dwd/ows?service=WFS&version=2.0.0&request=GetFeature&typeName=dwd:Warnungen_Gemeinden&CQL_FILTER=WARNCELLID+LIKE+%27103101000%27

Trying this link manually didn’t result in a response that could be parsed for the binding (IMHO). Although I would have expected some more DEBUG entries because of such a response.

Only the channel “Last update” is getting values, although this is probably done without parsing the return of DWD.

The OP showed a link that returns all warnings in json format, maybe there was change in the service??

I’m guessing so. The short answer is that the binding isn’t receiving any meaningful data from the request.

Longer answer:

The binding sends this query:

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

And receives this response:

<?xml version="1.0" encoding="UTF-8"?><wfs:FeatureCollection xmlns:xs="http://www.w3.org/2001/XMLSchema" 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="2020-01-27T06:21:13.324Z" xsi:schemaLocation="http://www.dwd.de https://maps.dwd.de/geoserver/dwd/wfs?service=WFS&amp;version=2.0.0&amp;request=DescribeFeatureType&amp;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"/>

The interesting part of the response appears to be this:

numberMatched="0" numberReturned="0"

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”.

I guess this asks for an IssueReport on github.

1 Like

If @milo wants to file one, he should be the one to have the privilege.

If he doesn’t, I will.

2 Likes

@namraccr @opus I can not do it due to other things…just do it, please thanks

Filed ticket #6924.

1 Like

I’ve created a PR to fix this. …and here’s some more text to block the stupid spam filter…
In the meantime, here’s a test jar.

1 Like

how can i install this?

Uninstall the existing binding, then drop the jar file into the addons directory.

do I need to activat it somehow??

It should be active, can you create a thing for the binding?

yes…soory first time i installed an addon manually

1 Like