Group-item persistence-jdbc-mariadb no graph in Analyzer

Hi,

I’m running openhab 3.1.0 on x64 windows 2019 server.
I have a group ‘electric_consumer’ with aggregation function SUM for total consumed energy.
I added it to persistence but I get empty no Analyzer graph (empty).

My configurations:

energymeter.items (group-item)

Group:Number:SUM electric_consumer "electric consumption [%.3f kW]" <energy> 

ID15x.items (group-members)

Number:Power			 	ID150_AC1_Power       "Heatpump Power consumption   [%.3f kW]" (electric_consumer)  	{ channel="modbus:data:Acti9_ID150:Acti9_ID150_Holding:Acti9_ID150_RMS_AC1P:number"	[ profile="modbus:gainOffset", gain="-1.0 W", pre-gain-offset="0" ]}
Number:Power			 	ID151_AC1_Power       "Buiten AC1 Power   [%.3f kW]" (electric_consumer)  	{ channel="modbus:data:Acti9_ID151:Acti9_ID151_Holding:Acti9_ID151_RMS_AC1P:number"	[ profile="modbus:gainOffset", gain="-1.0 W", pre-gain-offset="0" ]}
Number:Power			 	ID152_AC1_Power       "Berging   [%.3f kW]" (electric_consumer)  	{ channel="modbus:data:Acti9_ID152:Acti9_ID152_Holding:Acti9_ID152_RMS_AC1P:number"	[ profile="modbus:gainOffset", gain="1.0 W", pre-gain-offset="0" ]}
Number:Power			 	ID152_AC2_Power       "Oven A   [%.3f kW]"  (electric_consumer) 	{ channel="modbus:data:Acti9_ID152:Acti9_ID152_Holding:Acti9_ID152_RMS_AC2P:number"	[ profile="modbus:gainOffset", gain="1.0 W", pre-gain-offset="0" ]}
Number:Power			 	ID152_AC3_Power       "Oven B   [%.3f kW]"  (electric_consumer) 	{ channel="modbus:data:Acti9_ID152:Acti9_ID152_Holding:Acti9_ID152_RMS_AC3P:number"	[ profile="modbus:gainOffset", gain="1.0 W", pre-gain-offset="0" ]}
Number:Power			 	ID153_AC1_Power       "Beganegrond   [%.3f kW]"  (electric_consumer) 	{ channel="modbus:data:Acti9_ID153:Acti9_ID153_Holding:Acti9_ID153_RMS_AC1P:number"	[ profile="modbus:gainOffset", gain="1.0 W", pre-gain-offset="0" ]}
Number:Power			 	ID153_AC2_Power       "Bar keuken   [%.3f kW]"   (electric_consumer)	{ channel="modbus:data:Acti9_ID153:Acti9_ID153_Holding:Acti9_ID153_RMS_AC2P:number"	[ profile="modbus:gainOffset", gain="1.0 W", pre-gain-offset="0" ]}
Number:Power			 	ID153_AC3_Power       "Doushe toilet   [%.3f kW]" (electric_consumer)  	{ channel="modbus:data:Acti9_ID153:Acti9_ID153_Holding:Acti9_ID153_RMS_AC3P:number"	[ profile="modbus:gainOffset", gain="1.0 W", pre-gain-offset="0" ]}
Number:Power			 	ID154_AC1_Power       "ID154 AC1 Power   [%.3f kW]"  (electric_consumer) 	{ channel="modbus:data:Acti9_ID154:Acti9_ID154_Holding:Acti9_ID154_RMS_AC1P:number"	[ profile="modbus:gainOffset", gain="1.0 W", pre-gain-offset="0" ]}
Number:Power			 	ID154_AC2_Power       "ICT Power   [%.3f kW]"   (electric_consumer)	{ channel="modbus:data:Acti9_ID154:Acti9_ID154_Holding:Acti9_ID154_RMS_AC2P:number"	[ profile="modbus:gainOffset", gain="1.0 W", pre-gain-offset="0" ]}
Number:Power			 	ID154_AC3_Power       "DHW spiral Power   [%.3f kW]"   (electric_consumer)	{ channel="modbus:data:Acti9_ID154:Acti9_ID154_Holding:Acti9_ID154_RMS_AC3P:number"	[ profile="modbus:gainOffset", gain="1.0 W", pre-gain-offset="0" ]}
Number:Power			 	ID155_AC1_Power       "Kookplaat [%.3f kW]"  (electric_consumer) 	{ channel="modbus:data:Acti9_ID155:Acti9_ID155_Holding:Acti9_ID155_RMS_AC1P:number"	[ profile="modbus:gainOffset", gain="1.0 W", pre-gain-offset="0" ]}
Number:Power			 	ID155_AC2_Power       "Zolder    [%.3f kW]"   (electric_consumer)	{ channel="modbus:data:Acti9_ID155:Acti9_ID155_Holding:Acti9_ID155_RMS_AC2P:number"	[ profile="modbus:gainOffset", gain="1.0 W", pre-gain-offset="0" ]}
Number:Power			 	ID155_AC3_Power       "Verdieping   [%.3f kW]" (electric_consumer)  	{ channel="modbus:data:Acti9_ID155:Acti9_ID155_Holding:Acti9_ID155_RMS_AC3P:number"	[ profile="modbus:gainOffset", gain="1.0 W", pre-gain-offset="0" ]}

jdbc.persist (MariaDB)

Strategies {
	everyMinute	:	"0 * * * * ?"
	everyHour	:	"0 0 * * * ?"
	every5Minute : "0 0/5 * * * ?"
	everyDay	:	"0 0 0 * * ?"
	
	default 	= every5Minute, restoreOnStartup
}

Items {  
    electric_total , electric_producer , electric_consumer	: strategy =  everyMinute, restoreOnStartup
	electric_total*, electric_producer*, electric_consumer*	: strategy =  everyMinute, restoreOnStartup
}

I’ve created a log on ‘org.openhab.persistence.jdbc’ and see writes to group members and the group item

2021-12-02 13:55:00.808 [DEBUG] [jdbc.internal.JdbcPersistenceService] - JDBC: Stored item 'electric_consumer' as '-1.266' in SQL database at Thu Dec 02 13:55:00 CET 2021 in 1 ms.
...
2021-12-02 13:55:00.808 [DEBUG] [persistence.jdbc.internal.JdbcMapper] - JDBC::storeItemValue: item=ID153_AC3_Power (Type=NumberItem, State=0 kW, Label=Doushe toilet, Category=null, Groups=[electric_consumer])
...
2021-12-02 13:55:00.810 [DEBUG] [nhab.persistence.jdbc.db.JdbcBaseDAO] - JDBC::storeItemValueProvider: item 'ID154_AC2_Power' as Type 'NUMBERITEM' in 'id154_ac2_power_0130' with state '-0.209 kW'

And if I take a look at the REST interface for the group member I get data back:
:8080/rest/persistence/items/electric_consumer

...
{"time":1638450060682,"state":"-1.279"},
{"time":1638450120684,"state":"-1.275"},
{"time":1638450180681,"state":"-1.276"}]}

I see the group with members, and the small graph behind the summed group value

But there is no graph, nor axe info available for the group-item

There is a graph for the group-members (one displayed here)

I have only ONE persistency service installed in the UI.
Reboots don’t solve the issue.

Am I doing something wrong?

Best regards,

See

Charting doesn’t care, it tries to use whatever the ‘default’ service is set to. You must check that.

Having said that, the problem may be that the charting tool wants to plot members of a Group, not the Group itself.
Open issue -

Hi @rossko57 ,

Thank you for your reply. It’s better to summarize by using a cron rule and write to an new item instead of using the aggregation group?

Best regards,

I wouldn’t say ‘better’ but that looks like your best chance of making it work in the face of the existing limitation.

But you don’t need cron rules,unless you have some particular reason. A rule can trigger from changes in your electric_consumer Group state, and copy state to an ordinary Item.