CoVid Information examples

Did you installed JSON-Transformation?

1 Like

No. I didn’t know I have to install it. What do i have to do?

I found it, installed it, but I see no difference.

I found the error! The line

stateTransformation: JSONPATH($.data.09375.weekIncidence)

has to be omitted. With


in the “JSONPath Expression”-field of the item, it works.

In the thing channel the syntax is:


Note the colon instead of parentheses

1 Like

Just want to share the textual configuration for the http binding v2 (since OH3).

Thing file:
Note: refresh time is in seconds, timeout in ms. The jsonpath part has an extra “:” and no parenthesis “)” compared to the gui based config. Also, the server limits the accesses per second so make sure the delay parameter is set. Otherwise each channel will trigger a http request at the same time and the server will not answer.

Thing http:url:rki "RKI CoVid-19"   [baseURL="", commandMethod="GET", delay="1000", refresh="600", timeout="1000"]   {
        Type number : Channel_Corona_LK_Regensburg_Incidence    "LK Rgbg 7d [%.1f]"        [ stateExtension="districts/09375", stateTransformation="JSONPATH:$.data.09375.weekIncidence"]
        Type number : Channel_Corona_S_Regensburg_Incidence     "Stadt Rgbg 7d [%.1f]"     [ stateExtension="districts/09362", stateTransformation="JSONPATH:$.data.09362.weekIncidence"]
        Type number : Channel_Corona_Deutschland_Incidence      "Deutschland 7d [%.1f]"    [ stateExtension="germany", stateTransformation="JSONPATH:$.weekIncidence"]
        Type number : Channel_Corona_Deutschland_R              "Deutschland R [%.2f]"     [ stateExtension="germany", stateTransformation="JSONPATH:$.r.value"]

Items file:

Number    Corona_LK_Regensburg_Incidence    "LK Rgbg 7d [%.1f]"        <line>     (store)    {channel="http:url:rki:Channel_Corona_LK_Regensburg_Incidence", expire="15m" }
Number    Corona_S_Regensburg_Incidence     "Stadt Rgbg 7d [%.1f]"     <line>     (store)    {channel="http:url:rki:Channel_Corona_S_Regensburg_Incidence", expire="15m" }
Number    Corona_Deutschland_Incidence      "Deutschland 7d [%.1f]"    <line>     (store)    {channel="http:url:rki:Channel_Corona_Deutschland_Incidence", expire="15m" }
Number    Corona_Deutschland_R              "Deutschland R [%.2f]"     <chart>    (store)    {channel="http:url:rki:Channel_Corona_Deutschland_R", expire="15m" }

sitemap file “corona.sitemap”:

sitemap corona label="Corona" {
    Frame label="Corona" {
    Default item=Corona_LK_Regensburg_Incidence
    Default item=Corona_S_Regensburg_Incidence
    Default item=Corona_Deutschland_Incidence
    Default item=Corona_Deutschland_R

Keep in mind that if you change the things file after the initial save, you have to restart OH. Its a known bug.

Hi S0170071,
Great work! I’ve implemented it in my openHAB and it works fine. I found the RKI-Number for my hometown Ingolstadt but how can I crate the thing for Bavaria? I’ve tested something like this:

Type number : Channel_Corona_Bayern_Incidence    "Bayern 7d [%.1f]"        [ stateExtension="state/bavaria", stateTransformation="JSONPATH:$.weekIncidence"]

Without success :frowning:
Any Idea?
Best regards

Hi, I found it out! The thing for Bavaria is:

Type number : Channel_Corona_Bayern_Incidence    "Bayern 7d [%.1f]"        [ stateExtension="states/BY", stateTransformation="JSONPATH:$.data.BY.weekIncidence"]

Has anyone a data source for the incidence per age group ?
I am particularly interested in that for the kids.
The data seems to be there, this page has a daily updated graphics in it…

Try this: RKI COVID19