Grafana 5.4.3 works with MariaDB/MySQL ... but no refresh in sitemap with switch?

Hi all,

I am running OH 2.5-snap (build #1484) in a docker container on an x86 NAS box. Everything works great and while testing Grafana 5.4.3 I found that mysql ist now supported as database source and therefore I don’t need the separate InfluxDB instance anymore.

I updated Grafana because I have an issue with the shared graphs via webview in my sitemap. I created an switch for different time intervals and created four corresponding graphs on a dashboard in Grafana. The shared link that I use in the four webview urls are the links to Grafana leveraging the “Embed” link share method from Grafana.

     Switch item=WDruckChart label="Wasserdruck" mappings=[0="2 Tage", 1="1 Woche", 3="1 Monat", 4="2 Monate"]
       Webview url="http://richcube:3001/d-solo/X8Ljipliz/heizungsdruck?orgId=1&panelId=2&from=now-2d&to=now&width=450&height=200"  height=10 visibility=[ WDruckChart == "0", WDruckChart == "Uninitialized" ]
       Webview url="http://richcube:3001/d-solo/X8Ljipliz/heizungsdruck?orgId=1&panelId=3&from=now-7d&to=now&width=450&height=200"  height=10 visibility=[ WDruckChart == "1" ]
       Webview url="http://richcube:3001/d-solo/X8Ljipliz/heizungsdruck?orgId=1&panelId=4&from=now-30d&to=now&width=450&height=200" height=10 visibility=[ WDruckChart == "3" ]
       Webview url="http://richcube:3001/d-solo/X8Ljipliz/heizungsdruck?orgId=1&panelId=5&from=now-60d&to=now&width=450&height=200" height=10 visibility=[ WDruckChart == "4" ]

When I now load the sitemap it shows the default chosen graph appropriately but when I switch between the time intervals to show other graphs I always need to reload the page of the Basic UI on my PC web browser. It all works well in the android app.

Has anyone an idea how this could be solved. I found nothing comparable in the community …

Thanks for your thoughts

Cheers
Justus

Unrelated but Uninitialized doesn’t exist anymore, use UNDEF instead:

       Webview url="http://richcube:3001/d-solo/X8Ljipliz/heizungsdruck?orgId=1&panelId=2&from=now-2d&to=now&width=450&height=200"  height=10 visibility=[ WDruckChart == "0", WDruckChart == "UNDEF" ]

1 Like

mysql is already supported for a long time in Grafana I think, I use it since the beginning (+/- 2 years)
I always used the standard chart elements of the sitemap. Is there a advantage to use if directly with grafana?

Switch item=General_ChartPeriod label="Choose" mappings=[0="Hour", 1="Day", 2="Week", 3="Month", 4="Year"]
Chart item=Grp_Xiaomi_Temp_1 period=h refresh=600 service="jdbc" visibility=[General_ChartPeriod==0]
Chart item=Grp_Xiaomi_Temp_1 period=D refresh=900 service="jdbc" visibility=[General_ChartPeriod==1, General_ChartPeriod=="NULL"]
Chart item=Grp_Xiaomi_Temp_1 period=W refresh=3600 service="jdbc" visibility=[General_ChartPeriod==2]
Chart item=Grp_Xiaomi_Temp_1 period=M refresh=3600 service="jdbc" visibility=[General_ChartPeriod==3]
Chart item=Grp_Xiaomi_Temp_1 period=Y refresh=3600 service="jdbc" visibility=[General_ChartPeriod==4]

edit: I see the changes now: I always used an own query, now it’s possible to configure mysql the same way as influxdb

Thanks, updated my sitemap!