[SOLVED] JSON Path "(DWD) Deutscher Wetterdienst Pollenflug " pollen flying

Hi.
Can anyone tell me how I can get the flower/weather ícons from DWD in the sitemap like The-Elk.
Have this error:

2018-05-31 16:29:04.496 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve visibility item DWDSelectedSite for widget org.eclipse.smarthome.model.sitemap.Frame

And the values for the day after tomorrow are gone. Is this right?
Thanks,
Markus

birke graeser dwd

store the Icons to $OPENHAB_CONF/icons/classic

EDIT: I had edit my final Sitemap and added:

visibility=[DWD_Pollen__Graeser_dayafter_to !="-1"]
visibility=[DWD_Pollen__Birke_dayafter_to !="-1"]

If you want additional pollen info (Hasel, Erle, Esche, Birke, Graeser, Roggen, Beifuss, Ambrosia)
replace in the JSONPATH:

example

{http="<[cacheDWD_Pollen:600000:JSONPATH($.content[?(@.partregion_id==123)].Pollen.<POLLENINFO>.today)]" }
<POLLENINFO>

with:
Hasel, Erle, Esche, Birke, Graeser, Roggen, Beifuss, Ambrosia

hope this helps you

2 Likes

Nice. That’s perfect.
Thank you very much.
Can i get the weather information on the same way?
Greetings,
Markus

I don´t think so.

I use weather underground for weather informations.

Okay.
I have seen that the stations by WU are very near to each other, but the values are different.
I think this are privat stations and don’t know if this is a good solution.
Are you happy with your values?
Greetings,
Markus

yes, I am very happy with the values.

I also have many weather stations in the neighborhood.
Some weather stations have been around for many years and deliver very good values.

image

The private weather stations only use the current values.Aall other values such as Forcast etc. are provided by external service providers:

I found now the following information for all NEW weather underground User:

https://www.wunderground.com/weather/api/

image

it works for existing users, but no one knows how long it will work :frowning_face:

Well, I think, they want your money :wink:

Hello, is it possible tp get the UV-Index from the DWD-Site? The JSON-File ist here: https://opendata.dwd.de/climate_environment/health/alerts/uvi.json
and the dokumentation is here:
https://opendata.dwd.de/climate_environment/health/alerts/Beschreibung_uvi.pdf

It seems very similar but I don’t know how to use it.

In the http.cfg I write

http:cacheDWD_UVI.url=https://opendata.dwd.de/climate_environment/health/alerts/uvi.json
http:cacheDWD_UVI.updateInterval=3600000

But how I build the Item?

Number DWD_UVI_totay " UV-Index Heute" {http="<[cacheDWD_UVI:600000:JSONPATH(???Hamburg.forcast.today)]" }

I have the same idea with “Biowetter” and “Thermischer Gefahrenindex”

I guess it would be something like

Number DWD_UVI_totay " UV-Index Heute" {http="<[cacheDWD_UVI:600000:JSONPATH($.content[?(@.city=="Hamburg")].forcast.today)]" }

Thanks you, but it don’t work.

when I try
String DWD_UVI_totay “UV-Index Heute [%s]” {http="<[cacheDWD_UVI:600000:JSONPATH($.content[?(@.city==Hamburg)].forecast.today)]" }

I get nearly the whole JSON

Any Idea?

There should be quotes in the JSONPATH. Probably they have to be escaped:

Number DWD_UVI_totay " UV-Index Heute" {http="<[cacheDWD_UVI:600000:JSONPATH($.content[?(@.city==\"Hamburg\")].forecast.today)]" }

This don‘t work, too. I change forcast to forecast, no effect.

Hi.
Since yesterday my pollen values are not working without changing anything. Only update over openhabian-config.
Get the message “don’t find null in pollen.map.”
Will check the complet message, but are there any ideas?
Greetings,
Markus

Ups, typo… changed this in original post…

Does work here:

Ok, But this don‘t work, too. Any Ideas?

So, I try it with the tool from jsonpath.com.

According to this tool, I get the right value with the path

$.content.[?(@.city==“Hamburg”)].forecast.today

BUT when I try to integrate it to an item like this

Number DWD_UVI_totay " UV-Index Heute [%s]" {http="<[cacheDWD_UVI:600000:JSONPATH($.content.[?(@.city=="Hamburg")].forecast.today)]" }

I get an error: dismatched input ‘Hamburg’ expecting ‘}’

I don’t know why. Can anybody help?

I find the answer. it should be single quote and not double quote

Number DWD_UVI_totay " UV-Index Heute [%s]" {http="<[cacheDWD_UVI:600000:JSONPATH($.content.[?(@.city=='Hamburg')].forecast.today)]" }

now it works :slight_smile:

1 Like

nice icons.
Could you please share it?

Unfortunately, I grabbed them from an online service (and built the svg version through CorelDraw), so I don’t have the copyright.