I work with Openhab2 on a Synology Diskstation.
I use the JDBC Persistence Service für MaraiDB.
The persistence service works well and so I can show the pre-defined charts in sitemaps.
But if I will access the same charts via URL I get only an empty chart with time-axis.
These are my definitions:
jdbc.cfg:
url=jdbc:mariadb://myIP:3306/openhab
.items:
// Anzeige aller Werte der Gruppe in einem Chart
Group Solvis_Chart
// Benoetigt, um die Zeitintervalle fuer die grafische Darstellung festlegen zu koennen
Number Solvis_Chart_Intervall "Chart-Intervall"
Number Solvis_Warmwasserpuffer "Solvis - Warmwasserpuffer [%.1f °C]" (Solvis_Chart)
Number Solvis_Warmwassertemp "Solvis - Warmwassertemp [%.1f °C]" (Solvis_Chart)
Number Solvis_Speicherreferenz "Solvis - Speicherreferenz [%.1f °C]" (Solvis_Chart)
Number Solvis_Heizungspuffer "Solvis - Heizungspuffer [%.1f °C]" (Solvis_Chart)
.sitemap
sitemap Solvis label="Solvis" {
Frame label="Solvis Charts" {
Switch item=Solvis_Chart_Intervall label="Chart_Intervall" mappings=[0="Stunde", 1="Tag", 2="Woche"]
Chart item=Solvis_Chart period=h refresh=30000 visibility=[Solvis_Chart_Intervall==0, Solvis_Chart_Intervall=="Uninitialized"]
Chart item=Solvis_Chart period=D refresh=30000 visibility=[Solvis_Chart_Intervall==1]
Chart item=Solvis_Chart period=W refresh=30000 visibility=[Solvis_Chart_Intervall==2]
}
}
To acess the chart via URL I use
a)
http://myIP:8080:chart?groups=Solvis_Chart&period=h
b)
http://myIP:8080:chart?groups=Solvis_Chart&period=h&service=jdbc
But in both cases it shows only empty charts with a time-axis.
What is wrong ?
My goal ist to show a chart for which I define any starttime/endtime through parameters begin / end.
The values for the start/endtime will I ask in the sitemap and with that Info I will dynamical build the URL-Call for the chart. Then this URL-Call should be shown in the sitemap as webview.
The point is, that so I can show the chart with any start- and end-times.
If there is another solution I will be glad to hear about this.
Many thanks and greetings
Wolfgang