@ohb1138 (Justus Reich) posted a new topic, subject "Grafana 5.4.3 works with MariaDB/MySQL ... but no refresh in sitemap with switch?". It read:

   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.
    [code] 
             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" ]
        
        
    [/code]
    
    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

So @vzorglub (Vincent Regaud) replied

    Unrelated but Uninitialized doesn't exist anymore, use UNDEF instead:
    [code] 
               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" ]
        
        
    [/code]

So @wars (Ward) replied

    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?
    [code] 
        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]
        
    [/code]
    
    edit: I see the changes now: I always used an own query, now it's possible to configure mysql the same way as influxdb

Then @ohb1138 (Justus Reich) said

    vzorglub:
    
    > Unrelated but Uninitialized doesn't exist anymore, use UNDEF instead:
    [code] 
    >            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" ]
    >     
    [/code]
    
    Thanks, updated my sitemap!


{'source': 'discourse', 'url': 'https://community.openhab.org/t/grafana-5-4-3-works-with-mariadb-mysql-but-no-refresh-in-sitemap-with-switch/65872', 'title': 'Grafana 5.4.3 works with MariaDB/MySQL ... but no refresh in sitemap with switch?', 'views': 243, 'has_accepted_answer': False, 'word_count': 543, 'like_count': 1, 'reply_count': 1, 'participant_count': 3, 'posts': 4, 'tags': '', 'author': '@ohb1138 (Justus Reich)', 'participants': '@ohb1138 (Justus Reich), @vzorglub (Vincent Regaud), @wars (Ward)', 'image_url': [None], 'created_at': '2019-01-28T15:45:25.906Z', 'last_posted_at': '2019-02-01T16:56:28.858Z'}