I have an issue with grafana on habpanel: I have created a graph with grafana that I have embedded into habpanel’s frame. My issue is that I used “Today” as timeframe for the graph that shows the actual day when I open it up via grafana but stays the same day I have embedded it into habpanel, so it is not dynamically updated.
Could you help me how to reach that the graph is to be updated on habpanel as well or what I am doing wrong here?
I’m using a number item for the last X hours to display. The URL is a text item that get’s updated once the number item is changed by a knob in habpanel. You just need to set the URL-source for the frame on the openHAB string item.
rule "Change Chart Timeframe"
Item timeframe_h received update
//die beiden URLs fuer den Wechsel
chart_url_wka_pegel.postUpdate("http://server:3000/d-solo/mOdBpqrWz/wka?orgId=1&from=now-" + timeframe_h.state.toString + "h&to=now&panelId=4")
chart_url_wka_power.postUpdate("http://server:3000/d-solo/mOdBpqrWz/wka?orgId=1&from=now-" + timeframe_h.state.toString + "h&to=now&panelId=2")
If anyone has a better solution to select shorter and broader timeframes (a month in 720 hours is not very user-friendly), any hint would be appreciated.
When you “share” the graph from Grafana, you will have an option to use the current time range. This is checked by default. Uncheck this and the chart should display the current time period. Ensure the time period is the “Last 24 Hours” or “Today”
You can also manually edit the URL to remove the time range ie delete