Show stored values in chart

Hi,

I use a mysql database to store the state of all items of my homematic system. Here is my mysql.persist:

Strategies {
everyMinute : “0 * * * * ?”
everyHour : “0 0 * * * ?”
everyDay : “0 0 0 * * ?”
}

Items {
* : strategy = everyMinute, restoreOnStartup
}

The states are written to all different tables every minute, i checked that in the database. Now i want to show a chart with the temperature in the livingroom during the last 24h.

My items file contains this:

Number Temp_Wohnzimmer_akt “Ist-Temperatur [%.1f °C]” (EG_Wohnzimmer) {homematic=“address=MEQ1812709,channel=4, parameter=ACTUAL_TEMPERATURE”}

Which gives the correct current temperature, shown in the sitemap and also written to database. In the sitemap this looks like:

Frame label=“Klima”{
Text item=Temp_Wohnzimmer_akt
Setpoint item=Temp_Wohnzimmer_set label=“Soll [%.1f °C]” icon=“heating” minValue=“15” maxValue=“25” step=“1”
Chart item=Temp_Wohnzimmer_akt,Temp_Wohnzimmer_set period=D refresh=100
}

The chart does not contain any information, however the timestamp seem coorect.

What can I do to show the values from the last day?

Are you sure you can specify multiple items in one line separated by a comma? I’m used to create a group and show that as a Chart type in the sitemap.

Another point: did you setup mysql as standard persistence? if not, you have to set the persistence from where the chart should be built.

To expand on @digineut’s answer:

When using rrd4j you can indeed list the items with commas separating them but you would put the chart on your sitemap using an Image element, not a Chart element. But when using the Chart element you can only provide one Item at a time. If you need more than one Item in the chart, you must put those Items into a Group and use the Group as the “item=”.

To expand on @Udo_Hartmann’s answer:

You set the default persistence in openhab.cfg near the top. The parameter is persistence:default and it should be set to mysql. Otherwise you would add a “service=mysql”.

Thanks for your answer.
I changed the persistence line

The name of the default persistence service to use

persistence:default=mysql

The mysql location looks like this:

############################ SQL Persistence Service ##################################

the database url like ‘jdbc:mysql://:/’ (without quotes)

mysql:url=jdbc:mysql://192.168.0.17/openhab

the database user

mysql:user=openhab

the database password

mysql:password=openhab

the reconnection counter

#mysql:reconnectCnt=

the connection timeout (in seconds)

#mysql:waitTimeout=

OpenHAB is still writing all items to the database but I could not show any historical data in a chart. I removed the comma seperation, it should now show only one data set. For a first test this would be fine.