Group Charts with jdbc (irregular data)

I have temperature data stored in jdbc for multiple items using a rule (not a persistence file config). When I try to graph an individual item it works, but the group is always blank. I think I have followed the directions (naming each item separately). Is there any limitation with groups and jdbc data?

items:

Group gtemps
Number nOffice_rYesterday “Office [%d]” (gtemps)
Number nBedroom_rYesterday “Bedroom [%d]” (gtemps)

and the graph in the sitemap:

Frame label=“Furnace Time”
{
Chart item=gtemps service=“jdbc” period=W
}

If I change the chart item to be just one item it works:
one

But the group item is always empty:
two

Not sure if I am doing something wrong. The data for all items is in the database.

You need to define a type (and optionally a function) for the group in order for it to get state updates. Without this, the Group will remain at NULL state.

Group:Number gtemps 
or
Group:Number:AVG gtemps 
or
Group:Number:MAX gtemps 

read more @ http://docs.openhab.org/configuration/items.html#group-type
& Groups seem to be broken - #4 by sihui

Thanks Dim, actually I had tried some of those, but the charts are always empty even when I try to assign a type and a function. All I want is for the two thermostats to be on the same graph. I’m wondering if it has something to do with the values not being stored based on persistence file configuration, but rather in the rules file with a cron expression. The values in the datbase look like:

sqlite> select * from item0007;
2017-11-11 01:00:02.790|403.0
2017-11-12 01:00:03.064|534.0
2017-11-13 01:00:02.838|455.0
2017-11-14 01:00:02.923|317.0

As I said, when I graph the items individually they appear fine.

I tried moving the cron rule into a persistence file like:

Items {
gtemps: strategy = everyMinute, restoreOnStartup
}

But get an error

2017-11-14 17:31:00.026 [WARN ] [jdbc.internal.JdbcPersistenceService] - JDBC::store: ignore Item ‘gtemps’ because it is UnDefType

Even if I define the group as

Group:Number:AVG gtemps <clock>

and other similar functions.

I’ve also tried using gtemps* in the persitence file but that doesn’t log anything or print out any error.

So not sure what I’m doing wrong. But maybe something to do with jdbc and the fact that I’m only storing it once a day (when not testing).