do you have JSONPath Transformation installed?
Yes it is installed.
and I use it since a year to transform the JSON File from my NUKI Smart Lock
/* ------------------------------------------------------------------------ */
/* Nuki Status über API alle 30 Sekunden
/ ------------------------------------------------------------------------- */
rule "Nuki Status über API alle 30 Sekunden"
when
Time cron "*/30 * * * * ?"
then
logInfo("Rules", "Nuki Status über API alle 30 Sekunden")
val String var1= sendHttpGetRequest("http://<IP-Adresse>:8080/lockState?token=ABCDEFG&nukiId=123456789")
var String value1 = transform("JSONPATH", "$.state", var1)
var String value2 = transform("JSONPATH", "$.batteryCritical", var1)
nukiHaustuer_status.sendCommand(value1)
nukiHaustuer_LowBattery.sendCommand(value2)
end
JSONPATH all capitals
THX a lot
but this item show following log:
String DWD_Pollen_last_update "Letzte Aktualisierung [%s]" {http="<[cacheDWD_Pollen:60000:JSONPATH($.lastupdate)]" }
org.openhab.core.transform.TransformationException: Invalid path '$.lastupdate' in '{"legend":{"id7":"3","id2":"0-1","id1":"0","id7_desc":"hohe Belastung","id2_desc":"keine bis geringe Belastung","id4":"1-2","id6":"2-3","id5_desc":"mittlere Belastung","id3_desc":"geringe Belastung","id6_desc":"mittlere bis hohe Belastung","id5":"2","id4_desc":"geringe bis mittlere Belastung","id1_desc":"keine Belastung","id3":"1"},"name":"Pollenflug-Gefahrenindex für Deutschland ausgegeben vom Deutschen Wetterdienst in Zusammenarbeit mit der Stiftung Deutscher Polleninformationsdienst","last_update":"2018-05-18 11:00 Uhr","content":[{"partregion_name":"Inseln und Marschen","Pollen":{"Esche":{"dayafter_to":"0","tomorrow":"0","today":"0"},"Birke":{"dayafter_to":"0-1","today":"0-1","tomorrow":"0-1"},"Graeser":{"dayafter_to":"2-3","today":"1-2","tomorrow":"1"},"Ambrosia":{"dayafter_to":"0","today":"0","tomorrow":"0"},"Erle":{"tomorrow":"0","dayafter_to":"0","today":"0"},"Roggen":{"dayafter_to":"0","tomorrow":"0","today":"0"},"Beifuss":{"dayafter_to":"0","tomorrow":"0","today":"0"},"Hasel":{"today":"0","dayafter_to":"0","tomorrow":"0"}},"region_name":"Schleswig-Holstein und Hamburg","partregion_id":11,"region_id":10},{"partregion_id":12,"region_id":10,"region_name":"Schleswig-Holstein und Hamburg","partregion_name":"Geest, Schleswig-Holstein und Hamburg","Pollen":{"Hasel":{"today":"0","dayafter_to":"0","tomorrow":"0"},"Roggen":{"dayafter_to":"0-1","tomorrow":"0","today":"0"},"Erle":{"tomorrow":"0","dayafter_to":"0","today":"0"},"Beifuss":{"dayafter_to":"0","today":"0","tomorrow":"0"},"Birke":{"tomorrow":"0-1","dayafter_to":"0-1","today":"0-1"},"Graeser":{"tomorrow":"2","dayafter_to":"2-3","today":"2"},"Esche":{"dayafter_to":"0","today":"0","tomorrow":"0"},"Ambrosia":{"today":"0","dayafter_to":"0","tomorrow":"0"}}},{"region_name":"Mecklenburg-Vorpommern ","Pollen":{"Hasel":{"tomorrow":"0","dayafter_to":"0","today":"0"},"Erle":{"tomorrow":"0","dayafter_to":"0","today":"0"},"Roggen":{"today":"0","dayafter_to":"0-1","tomorrow":"0"},"Beifuss":{"today":"0","dayafter_to":"0","tomorrow":"0"},"Birke":{"dayafter_to":"0-1","today":"0-1","tomorrow":"0-1"},"Graeser":{"tomorrow":"2","dayafter_to":"2","today":"2"},"Esche":{"today":"0","dayafter_to":"0","tomorrow":"0"},"Ambrosia":{"dayafter_to":"0","today":"0","tomorrow":"0"}},"partregion_name":"","partregion_id":-1,"region_id":20},{"partregion_id":31,"region_id":30,"partregion_name":"Westl. Niedersachsen/Bremen","Pollen":{"Hasel":{"dayafter_to":"0","tomorrow":"0","today":"0"},"Erle":{"dayafter_to":"0","today":"0","tomorrow":"0"},"Roggen":{"dayafter_to":"1-2","today":"1-2","tomorrow":"1-2"},"Beifuss":{"dayafter_to":"0","tomorrow":"0","today":"0"},"Ambrosia":{"dayafter_to":"0","today":"0","tomorrow":"0"},"Birke":{"tomorrow":"0-1","dayafter_to":"0-1","today":"0-1"},"Graeser":{"dayafter_to":"3","today":"2-3","tomorrow":"2-3"},"Esche":{"tomorrow":"0","dayafter_to":"0","today":"0"}},"region_name":"Niedersachsen und Bremen"},{"region_name":"Niedersachsen und Bremen","Pollen":{"Ambrosia":{"dayafter_to":"0","today":"0","tomorrow":"0"},"Esche":{"tomorrow":"0","dayafter_to":"0","today":"0"},"Graeser":{"today":"2-3","dayafter_to":"2-3","tomorrow":"2-3"},"Birke":{"tomorrow":"0-1","dayafter_to":"0-1","today":"0-1"},"Beifuss":{"dayafter_to":"0","today":"0","tomorrow":"0"},"Roggen":{"today":"1-2","dayafter_to":"1-2","tomorrow":"1-2"},"Erle":{"today":"0","dayafter_to":"0","tomorrow":"0"},"Hasel":{"dayafter_to":"0","tomorrow":"0","today":"0"}},"partregion_name":"Östl. Niedersachsen","partregion_id":32,"region_id":30},{"partregion_name":"Rhein.-Westfäl. Tiefland","Pollen":{"Erle":{"dayafter_to":"0","tomorrow":"0","today":"0"},"Beifuss":{"today":"0","dayafter_to":"0","tomorrow":"0"},"Roggen":{"dayafter_to":"1-2","tomorrow":"1-2","today":"1-2"},"Hasel":{"today":"0","dayafter_to":"0","tomorrow":"0"},"Esche":{"today":"0","dayafter_to":"0","tomorrow":"0"},"Birke":{"tomorrow":"0-1","dayafter_to":"0-1","today":"0-1"},"Graeser":{"dayafter_to":"3","today":"2-3","tomorrow":"2-3"},"Ambrosia":{"tomorrow":"0","dayafter_to":"0","today":"0"}},"region_name":"Nordrhein-Westfalen","region_id":40,"partregion_id":41},{"region_id":40,"partregion_id":42,"partregion_name":"Ostwestfalen","Pollen":{"Hasel":{"dayafter_to":"0","today":"0","tomorrow":"0"},"Roggen":{"tomorrow":"0-1","dayafter_to":"0-1","today":"0-1"},"Erle":{"dayafter_to":"0","tomorrow":"0","today":"0"},"Beifuss":{"tomorrow":"0","dayafter_to":"0","today":"0"},"Graeser":{"today":"2-3","dayafter_to":"3","tomorrow":"2-3"},"Birke":{"tomorrow":"0-1","dayafter_to":"0-1","today":"0-1"},"Esche":{"dayafter_to":"0","tomorrow":"0","today":"0"},"Ambrosia":{"today":"0","dayafter_to":"0","tomorrow":"0"}},"region_name":"Nordrhein-Westfalen"},{"region_id":40,"partregion_id":43,"region_name":"Nordrhein-Westfalen","Pollen":{"Hasel":{"tomorrow":"0","dayafter_to":"0","today":"0"},"Erle":{"dayafter_to":"0","tomorrow":"0","today":"0"},"Beifuss":{"dayafter_to":"0","tomorrow":"0","today":"0"},"Roggen":{"tomorrow":"0","dayafter_to":"0","today":"0"},"Ambrosia":{"dayafter_to":"0","today":"0","tomorrow":"0"},"Graeser":{"today":"2","dayafter_to":"2-3","tomorrow":"2-3"},"Birke":{"tomorrow":"0-1","dayafter_to":"0-1","today":"0-1"},"Esche":{"dayafter_to":"0","tomorrow":"0","today":"0"}},"partregion_name":"Mittelgebirge NRW"},{"partregion_name":"","Pollen":{"Roggen":{"dayafter_to":"1-2","today":"1-2","tomorrow":"1-2"},"Erle":{"today":"0","dayafter_to":"0","tomorrow":"0"},"Beifuss":{"tomorrow":"0","dayafter_to":"0","today":"0"},"Hasel":{"dayafter_to":"0","tomorrow":"0","today":"0"},"Ambrosia":{"dayafter_to":"0","today":"0","tomorrow":"0"},"Esche":{"dayafter_to":"0","tomorrow":"0","today":"0"},"Birke":{"tomorrow":"0-1","dayafter_to":"0-1","today":"0-1"},"Graeser":{"dayafter_to":"2-3","today":"2-3","tomorrow":"2-3"}},"region_name":"Brandenburg und Berlin ","region_id":50,"partregion_id":-1},{"region_id":60,"partregion_id":61,"region_name":"Sachsen-Anhalt","Pollen":{"Hasel":{"dayafter_to":"0","today":"0","tomorrow":"0"},"Roggen":{"dayafter_to":"1-2","tomorrow":"1-2","today":"1-2"},"Erle":{"dayafter_to":"0","today":"0","tomorrow":"0"},"Beifuss":{"tomorrow":"0","dayafter_to":"0","today":"0"},"Ambrosia":{"today":"0","dayafter_to":"0","tomorrow":"0"},"Birke":{"tomorrow":"0-1","dayafter_to":"0-1","today":"0-1"},"Graeser":{"today":"2-3","dayafter_to":"2-3","tomorrow":"2-3"},"Esche":{"today":"0","dayafter_to":"0","tomorrow":"0"}},"partregion_name":"Tiefland Sachsen-Anhalt"},{"region_name":"Sachsen-Anhalt","Pollen":{"Ambrosia":{"dayafter_to":"0","tomorrow":"0","today":"0"},"Graeser":{"dayafter_to":"2-3","today":"2","tomorrow":"2"},"Birke":{"tomorrow":"0-1","dayafter_to":"0-1","today":"0-1"},"Esche":{"tomorrow":"0","dayafter_to":"0","today":"0"},"Hasel":{"dayafter_to":"0","today":"0","tomorrow":"0"},"Beifuss":{"tomorrow":"0","dayafter_to":"0","today":"0"},"Roggen":{"dayafter_to":"0","today":"0","tomorrow":"0"},"Erle":{"today":"0","dayafter_to":"0","tomorrow":"0"}},"partregion_name":"Harz","region_id":60,"partregion_id":62},{"partregion_id":71,"region_id":70,"region_name":"Thüringen","partregion_name":"Tiefland Thüringen","Pollen":{"Esche":{"dayafter_to":"0","today":"0","tomorrow":"0"},"Birke":{"dayafter_to":"0-1","tomorrow":"0-1","today":"0-1"},"Graeser":{"tomorrow":"2-3","dayafter_to":"3","today":"2-3"},"Ambrosia":{"tomorrow":"0","dayafter_to":"0","today":"0"},"Beifuss":{"dayafter_to":"0","today":"0","tomorrow":"0"},"Erle":{"tomorrow":"0","dayafter_to":"0","today":"0"},"Roggen":{"today":"0-1","dayafter_to":"0-1","tomorrow":"0-1"},"Hasel":{"dayafter_to":"0","tomorrow":"0","today":"0"}}},{"region_name":"Thüringen","partregion_name":"Mittelgebirge Thüringen","Pollen":{"Ambrosia":{"tomorrow":"0","dayafter_to":"0","today":"0"},"Esche":{"dayafter_to":"0","tomorrow":"0","today":"0"},"Graeser":{"tomorrow":"2","dayafter_to":"2-3","today":"2"},"Birke":{"today":"0-1","dayafter_to":"0-1","tomorrow":"0-1"},"Beifuss":{"today":"0","dayafter_to":"0","tomorrow":"0"},"Erle":{"today":"0","dayafter_to":"0","tomorrow":"0"},"Roggen":{"dayafter_to":"0","today":"0","tomorrow":"0"},"Hasel":{"dayafter_to":"0","today":"0","tomorrow":"0"}},"region_id":70,"partregion_id":72},{"region_id":80,"partregion_id":81,"partregion_name":"Tiefland Sachsen","Pollen":{"Esche":{"tomorrow":"0","dayafter_to":"0","today":"0"},"Graeser":{"tomorrow":"2-3","dayafter_to":"2-3","today":"2-3"},"Birke":{"tomorrow":"0-1","dayafter_to":"0-1","today":"0-1"},"Ambrosia":{"dayafter_to":"0","today":"0","tomorrow":"0"},"Beifuss":{"tomorrow":"0","dayafter_to":"0","today":"0"},"Erle":{"tomorrow":"0","dayafter_to":"0","today":"0"},"Roggen":{"today":"1","dayafter_to":"1-2","tomorrow":"1"},"Hasel":{"dayafter_to":"0","tomorrow":"0","today":"0"}},"region_name":"Sachsen"},{"partregion_name":"Mittelgebirge Sachsen","Pollen":{"Hasel":{"dayafter_to":"0","today":"0","tomorrow":"0"},"Erle":{"dayafter_to":"0","today":"0","tomorrow":"0"},"Roggen":{"dayafter_to":"0","tomorrow":"0","today":"0"},"Beifuss":{"dayafter_to":"0","tomorrow":"0","today":"0"},"Ambrosia":{"tomorrow":"0","dayafter_to":"0","today":"0"},"Graeser":{"dayafter_to":"2-3","today":"2","tomorrow":"2"},"Birke":{"dayafter_to":"0-1","tomorrow":"0-1","today":"0-1"},"Esche":{"dayafter_to":"0","tomorrow":"0","today":"0"}},"region_name":"Sachsen","region_id":80,"partregion_id":82},{"partregion_id":91,"region_id":90,"Pollen":{"Hasel":{"tomorrow":"0","dayafter_to":"0","today":"0"},"Roggen":{"dayafter_to":"0-1","tomorrow":"0-1","today":"0-1"},"Erle":{"dayafter_to":"0","today":"0","tomorrow":"0"},"Beifuss":{"dayafter_to":"0","tomorrow":"0","today":"0"},"Birke":{"tomorrow":"0-1","dayafter_to":"0-1","today":"0-1"},"Graeser":{"dayafter_to":"3","tomorrow":"2-3","today":"2-3"},"Esche":{"dayafter_to":"0","tomorrow":"0","today":"0"},"Ambrosia":{"tomorrow":"0","dayafter_to":"0","today":"0"}},"partregion_name":"Nordhessen und hess. Mittelgebirge","region_name":"Hessen"},{"partregion_name":"Rhein-Main","Pollen":{"Ambrosia":{"today":"0","dayafter_to":"0","tomorrow":"0"},"Graeser":{"tomorrow":"3","dayafter_to":"3","today":"2-3"},"Birke":{"dayafter_to":"0-1","today":"0-1","tomorrow":"0-1"},"Esche":{"dayafter_to":"0","tomorrow":"0","today":"0"},"Hasel":{"dayafter_to":"0","today":"0","tomorrow":"0"},"Roggen":{"dayafter_to":"1","tomorrow":"1","today":"1"},"Erle":{"tomorrow":"0","dayafter_to":"0","today":"0"},"Beifuss":{"dayafter_to":"0","today":"0","tomorrow":"0"}},"region_name":"Hessen","region_id":90,"partregion_id":92},{"partregion_id":103,"region_id":100,"region_name":"Rheinland-Pfalz und Saarland","Pollen":{"Hasel":{"dayafter_to":"0","tomorrow":"0","today":"0"},"Erle":{"dayafter_to":"0","today":"0","tomorrow":"0"},"Roggen":{"tomorrow":"1","dayafter_to":"1","today":"1"},"Beifuss":{"tomorrow":"0","dayafter_to":"0","today":"0"},"Ambrosia":{"tomorrow":"0","dayafter_to":"0","today":"0"},"Birke":{"dayafter_to":"0-1","tomorrow":"0-1","today":"0-1"},"Graeser":{"dayafter_to":"3","tomorrow":"3","today":"2-3"},"Esche":{"tomorrow":"0","dayafter_to":"0","today":"0"}},"partregion_name":"Saarland"},{"Pollen":{"Hasel":{"dayafter_to":"0","today":"0","tomorrow":"0"},"Beifuss":{"dayafter_to":"0","today":"0","tomorrow":"0"},"Roggen":{"tomorrow":"1","dayafter_to":"1","today":"1"},"Erle":{"dayafter_to":"0","today":"0","tomorrow":"0"},"Birke":{"dayafter_to":"0-1","today":"0-1","tomorrow":"0-1"},"Graeser":{"today":"2-3","dayafter_to":"3","tomorrow":"3"},"Esche":{"dayafter_to":"0","today":"0","tomorrow":"0"},"Ambrosia":{"tomorrow":"0","dayafter_to":"0","today":"0"}},"partregion_name":"Rhein, Pfalz, Nahe und Mosel","region_name":"Rheinland-Pfalz und Saarland","partregion_id":101,"region_id":100},{"partregion_id":102,"region_id":100,"Pollen":{"Erle":{"dayafter_to":"0","tomorrow":"0","today":"0"},"Beifuss":{"tomorrow":"0","dayafter_to":"0","today":"0"},"Roggen":{"dayafter_to":"0","tomorrow":"0","today":"0"},"Hasel":{"dayafter_to":"0","today":"0","tomorrow":"0"},"Esche":{"tomorrow":"0","dayafter_to":"0","today":"0"},"Birke":{"today":"0-1","dayafter_to":"0-1","tomorrow":"0-1"},"Graeser":{"today":"2","dayafter_to":"2-3","tomorrow":"2-3"},"Ambrosia":{"dayafter_to":"0","tomorrow":"0","today":"0"}},"partregion_name":"Mittelgebirgsbereich Rheinland-Pfalz","region_name":"Rheinland-Pfalz und Saarland"},{"partregion_id":111,"region_id":110,"region_name":"Baden-Württemberg","partregion_name":"Oberrhein und unteres Neckartal","Pollen":{"Hasel":{"dayafter_to":"0","today":"0","tomorrow":"0"},"Erle":{"today":"0","dayafter_to":"0","tomorrow":"0"},"Roggen":{"today":"1","dayafter_to":"1","tomorrow":"1"},"Beifuss":{"dayafter_to":"0","today":"0","tomorrow":"0"},"Birke":{"dayafter_to":"0-1","today":"0-1","tomorrow":"0-1"},"Graeser":{"today":"3","dayafter_to":"3","tomorrow":"3"},"Esche":{"today":"0","dayafter_to":"0","tomorrow":"0"},"Ambrosia":{"dayafter_to":"0","today":"0","tomorrow":"0"}}},{"region_id":110,"partregion_id":112,"Pollen":{"Erle":{"dayafter_to":"0","tomorrow":"0","today":"0"},"Roggen":{"tomorrow":"0-1","dayafter_to":"0-1","today":"0-1"},"Beifuss":{"dayafter_to":"0","tomorrow":"0","today":"0"},"Hasel":{"today":"0","dayafter_to":"0","tomorrow":"0"},"Esche":{"tomorrow":"0","dayafter_to":"0","today":"0"},"Birke":{"today":"0-1","dayafter_to":"0-1","tomorrow":"0-1"},"Graeser":{"dayafter_to":"2-3","today":"2-3","tomorrow":"2-3"},"Ambrosia":{"dayafter_to":"0","tomorrow":"0","today":"0"}},"partregion_name":"Hohenlohe/mittlerer Neckar/Oberschwaben","region_name":"Baden-Württemberg"},{"region_name":"Baden-Württemberg","Pollen":{"Beifuss":{"dayafter_to":"0","tomorrow":"0","today":"0"},"Roggen":{"dayafter_to":"0","tomorrow":"0","today":"0"},"Erle":{"tomorrow":"0","dayafter_to":"0","today":"0"},"Hasel":{"today":"0","dayafter_to":"0","tomorrow":"0"},"Esche":{"dayafter_to":"0","today":"0","tomorrow":"0"},"Birke":{"tomorrow":"0-1","dayafter_to":"0-1","today":"0-1"},"Graeser":{"dayafter_to":"2-3","tomorrow":"2","today":"2"},"Ambrosia":{"dayafter_to":"0","tomorrow":"0","today":"0"}},"partregion_name":"Mittelgebirge Baden-Württemberg","region_id":110,"partregion_id":113},{"partregion_id":121,"region_id":120,"region_name":"Bayern","Pollen":{"Erle":{"today":"0","dayafter_to":"0","tomorrow":"0"},"Roggen":{"today":"0-1","dayafter_to":"0-1","tomorrow":"0-1"},"Beifuss":{"dayafter_to":"0","tomorrow":"0","today":"0"},"Hasel":{"tomorrow":"0","dayafter_to":"0","today":"0"},"Esche":{"tomorrow":"0","dayafter_to":"0","today":"0"},"Birke":{"dayafter_to":"0-1","tomorrow":"0-1","today":"0-1"},"Graeser":{"dayafter_to":"3","tomorrow":"2-3","today":"2-3"},"Ambrosia":{"dayafter_to":"0","tomorrow":"0","today":"0"}},"partregion_name":"Allgäu/Oberbayern/Bay. Wald"},{"Pollen":{"Erle":{"today":"0","dayafter_to":"0","tomorrow":"0"},"Roggen":{"dayafter_to":"0-1","today":"0-1","tomorrow":"0-1"},"Beifuss":{"dayafter_to":"0","tomorrow":"0","today":"0"},"Hasel":{"dayafter_to":"0","tomorrow":"0","today":"0"},"Esche":{"dayafter_to":"0","today":"0","tomorrow":"0"},"Graeser":{"dayafter_to":"3","tomorrow":"2-3","today":"2-3"},"Birke":{"today":"0-1","dayafter_to":"0-1","tomorrow":"0-1"},"Ambrosia":{"tomorrow":"0","dayafter_to":"0","today":"0"}},"partregion_name":"Donauniederungen","region_name":"Bayern","region_id":120,"partregion_id":122},{"region_id":120,"partregion_id":123,"Pollen":{"Hasel":{"dayafter_to":"0","today":"0","tomorrow":"0"},"Roggen":{"today":"0-1","dayafter_to":"0-1","tomorrow":"0-1"},"Erle":{"dayafter_to":"0","today":"0","tomorrow":"0"},"Beifuss":{"dayafter_to":"0","today":"0","tomorrow":"0"},"Birke":{"dayafter_to":"0-1","tomorrow":"0-1","today":"0-1"},"Graeser":{"dayafter_to":"3","today":"2-3","tomorrow":"2-3"},"Esche":{"tomorrow":"0","dayafter_to":"0","today":"0"},"Ambrosia":{"dayafter_to":"0","tomorrow":"0","today":"0"}},"partregion_name":"Bayern n. der Donau, o. Bayr. Wald, o. Mainfranken","region_name":"Bayern"},{"region_id":120,"partregion_id":124,"region_name":"Bayern","partregion_name":"Mainfranken","Pollen":{"Erle":{"dayafter_to":"0","tomorrow":"0","today":"0"},"Roggen":{"dayafter_to":"0-1","tomorrow":"0-1","today":"0-1"},"Beifuss":{"tomorrow":"0","dayafter_to":"0","today":"0"},"Hasel":{"tomorrow":"0","dayafter_to":"0","today":"0"},"Ambrosia":{"tomorrow":"0","dayafter_to":"0","today":"0"},"Esche":{"dayafter_to":"0","today":"0","tomorrow":"0"},"Graeser":{"today":"2-3","dayafter_to":"3","tomorrow":"2-3"},"Birke":{"dayafter_to":"0-1","tomorrow":"0-1","today":"0-1"}}}],"next_update":"2018-05-19 11:00 Uhr","sender":"Deutscher Wetterdienst - Medizin-Meteorologie"}'
here is my final CONFIG:
Pollen.items
String DWD_Pollen_last_update "letzte Aktualisierung [%s]" <time> {http="<[cacheDWD_Pollen:600000:JSONPATH($.last_update)]" }
//--> Gräser
String DWD_Pollen__Graeser_today "heute [MAP(Pollen.map):%s]" <graeser> {http="<[cacheDWD_Pollen:600000:JSONPATH($.content[?(@.partregion_id==123)].Pollen.Graeser.today)]" }
String DWD_Pollen_Graeser_tomorrow "morgen [MAP(Pollen.map):%s]" <graeser> {http="<[cacheDWD_Pollen:600000:JSONPATH($.content[?(@.partregion_id==123)].Pollen.Graeser.tomorrow)]" }
String DWD_Pollen__Graeser_dayafter_to "übermorgen [MAP(Pollen.map):%s]" <graeser> {http="<[cacheDWD_Pollen:600000:JSONPATH($.content[?(@.partregion_id==123)].Pollen.Graeser.dayafter_to)]" }
//--> Birke
String DWD_Pollen__Birke_today "heute [MAP(Pollen.map):%s]" <birke> {http="<[cacheDWD_Pollen:600000:JSONPATH($.content[?(@.partregion_id==123)].Pollen.Birke.today)]" }
String DWD_Pollen_Birke_tomorrow "morgen [MAP(Pollen.map):%s]" <birke> {http="<[cacheDWD_Pollen:600000:JSONPATH($.content[?(@.partregion_id==123)].Pollen.Birke.tomorrow)]" }
String DWD_Pollen__Birke_dayafter_to "übermorgen [MAP(Pollen.map):%s]" <birke> {http="<[cacheDWD_Pollen:600000:JSONPATH($.content[?(@.partregion_id==123)].Pollen.Birke.dayafter_to)]" }
http.cfg --> The values by DWD will be updated every Day at 11am
http:cacheDWD_Pollen.url=https://opendata.dwd.de/climate_environment/health/alerts/s31fg.json
http:cacheDWD_Pollen.updateInterval=3600000
Pollen.map
-1=keine Daten
0=keine (0)
0-1=keine bis gering (0-1)
1-2=gering bis mittel (1-2)
2=mittel (2)
2-3=mittel bis hoch (2-3)
3=hoch (3)
sitemap
Frame label="Gräser (Vorhersage)" visibility=[DWDSelectedSite==7] {
Text item=DWD_Pollen__Graeser_today valuecolor=["0"="#008000", "0-1"="#00ff00", "1"="#ffff00", "1-2"="#ff0000", "2"="#ffa500", "2-3"="#ff0000" , "3"="#ff0000"]
Text item=DWD_Pollen_Graeser_tomorrow valuecolor=["0"="#008000", "0-1"="#00ff00", "1"="#ffff00", "1-2"="#ff0000", "2"="#ffa500", "2-3"="#ff0000" , "3"="#ff0000"]
Text item=DWD_Pollen__Graeser_dayafter_to valuecolor=["0"="#008000", "0-1"="#00ff00", "1"="#ffff00", "1-2"="#ff0000", "2"="#ffa500", "2-3"="#ff0000" , "3"="#ff0000"] visibility=[DWD_Pollen__Graeser_dayafter_to !="-1"]
}
Frame label="Birke (Vorhersage)" visibility=[DWDSelectedSite==7] {
Text item=DWD_Pollen__Birke_today valuecolor=["0"="#008000", "0-1"="#00ff00", "1"="#ffff00", "1-2"="#ff0000", "2"="#ffa500", "2-3"="#ff0000" , "3"="#ff0000"]
Text item=DWD_Pollen_Birke_tomorrow valuecolor=["0"="#008000", "0-1"="#00ff00", "1"="#ffff00", "1-2"="#ff0000", "2"="#ffa500", "2-3"="#ff0000" , "3"="#ff0000"]
Text item=DWD_Pollen__Birke_dayafter_to valuecolor=["0"="#008000", "0-1"="#00ff00", "1"="#ffff00", "1-2"="#ff0000", "2"="#ffa500", "2-3"="#ff0000" , "3"="#ff0000"] visibility=[DWD_Pollen__Birke_dayafter_to !="-1"]
}
Frame label=" " visibility=[DWDSelectedSite==7] {
Text item=DWD_Pollen_last_update
}
Only one thing I would like to improve.
I would like to change the “last update” item as a String to DateTime.
Unfortunately, I do not know exactly how I should do that.
Thanks a lot to @vzorglub and @Udo_Hartmann
To do that you need another item and a rule:
DateTime PollenLastUpdateDateTime
rule "Pollen datetime"
when
DWD_Pollen_last_update changed
then
PollenLastUpdateDateTime.postUpdate(DWD_Pollen_last_update.toString.substring(0, 16))
end
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
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
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.
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/
it works for existing users, but no one knows how long it will work
Well, I think, they want your money
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…