[Solved] Group:Number:Sum --> not working anymore

Hi@all

I used Group:Number:Sum for a while, was summing up energy values in order to display whole power consumption of an KNX actor. This was working fine for months, also the charts were displayed correctly but for ~2 weeks the calculation seems not to work anymore. The underlying items still deliver data, only the “Group:Number:Sum” doesn’t create the sum.

What’s wrong here?

Thx & Regards
John

Did you change any aspect of your openHAB installation about ~2 weeks ago? Was there any change to your .items files around that time?

I added one new rule and I changed the persistence (created a new group for items which I want to have persisted - the affected items are part of these new group).

For better understanding a screenshot of what is not working anymore. In the top right corner the value is a summary value of the power consumption. This is correct. But the displayed value in the chart is not correct.

Do you have unplugged device, but binding still in items file???

I have same problem with HTTP binding, when i have unplugged device from power, all charts who use information from HTTP binding stop work, and all items thet use HTTP binding refreshing slow.

No hardware changes. No unplugged devices.

Is there any non-Number item in the group that wasn’t there when it was working?

It is configures like that:

items:

Group:Number:SUM	gStrom1	"Strommessung pro Sicherung, Detailansicht [%.3f kW]"	<energy>		(gSQL, gStrom2, gStrom)
Group:Number:SUM	gStrom2	"Strommessung (kumuliert) [%.3f kW]"					<energy>		(gSQL, gStrom)
Number gStrom2_ChartSwitch01			"Stromverbrauch gem. gewähltem Zeitraum in kW"		(gAll, gSQL)

explanation:
behind the group “gStrom1” are many values; in order to display the Group:Sum as one line chart I created gStrom 2 which contains gStrom1

sitemap

			Frame {								//Darstellung aller Einzelwerte der Gruppe gStrom1 = momentaner Stromverbrauch pro Sicherung, alle in einem Chart
					Switch item=gStrom1_ChartSwitch01 mappings=[0="1d", 1="1W", 2="2W", 3="1M", 4="2M", 5="4M", 6="1J"]
				    Chart item=gStrom1 icon="energy"		service="mysql" period=D 	refresh=360000 visibility=[gStrom1_ChartSwitch01==0, gStrom1_ChartSwitch01=="Uninitialized"]
				    Chart item=gStrom1 icon="energy"		service="mysql" period=W 	refresh=360000 visibility=[gStrom1_ChartSwitch01==1]
				    Chart item=gStrom1 icon="energy"		service="mysql" period=2W 	refresh=360000 visibility=[gStrom1_ChartSwitch01==2]
				    Chart item=gStrom1 icon="energy"		service="mysql" period=M 	refresh=360000 visibility=[gStrom1_ChartSwitch01==3]
				    Chart item=gStrom1 icon="energy"		service="mysql" period=2M 	refresh=360000 visibility=[gStrom1_ChartSwitch01==4]
				    Chart item=gStrom1 icon="energy"		service="mysql" period=4M 	refresh=360000 visibility=[gStrom1_ChartSwitch01==5]
				    Chart item=gStrom1 icon="energy"		service="mysql" period=Y 	refresh=360000 visibility=[gStrom1_ChartSwitch01==6]
				}	

Frame {								//Darstellung der kumulierten Werte aus "gStrom1" in einem Chart
Switch item=gStrom2_ChartSwitch01 mappings=[0="4h", 1="12h", 2="1D", 3="1W", 4="2W", 5="1M", 6="4M", 7="1J"]
	    Chart item=gStrom2 icon="energy"		service="mysql" period=4h 	refresh=360000 visibility=[gStrom2_ChartSwitch01==0, gStrom2_ChartSwitch01=="Uninitialized"]
	    Chart item=gStrom2 icon="energy"		service="mysql" period=12h 	refresh=360000 visibility=[gStrom2_ChartSwitch01==1]
	    Chart item=gStrom2 icon="energy"		service="mysql" period=D 	refresh=360000 visibility=[gStrom2_ChartSwitch01==2]
	    Chart item=gStrom2 icon="energy"		service="mysql" period=W 	refresh=360000 visibility=[gStrom2_ChartSwitch01==3]
	    Chart item=gStrom2 icon="energy"		service="mysql" period=2W 	refresh=360000 visibility=[gStrom2_ChartSwitch01==4]
	    Chart item=gStrom2 icon="energy"		service="mysql" period=M 	refresh=360000 visibility=[gStrom2_ChartSwitch01==5]
	    Chart item=gStrom2 icon="energy"		service="mysql" period=4M 	refresh=360000 visibility=[gStrom2_ChartSwitch01==6]
	    Chart item=gStrom2 icon="energy"		service="mysql" period=Y 	refresh=360000 visibility=[gStrom2_ChartSwitch01==7]
		}

the persistence is configured like that:

Strategies {
everyMinute : "0 * * * * ?"
everyHour : "0 0 * * * ?"
everyDay  : "0 0 0 * * ?"

default = everyChange
}

 		Items {
gSQL* : strategy = everyChange, everyMinute, everyHour, everyDay, restoreOnStartup        
}

As I said, I only changed persistence according to this post:

For many other charts this working absolutely fine. Only two charts (that are related to my gStrom* groups are not working anymore.

Any advice?

No. The groups contain only number items.

From the wiki page, I think you don’t need as many strategies and can simplify your persistence config:

Strategies {
everyMinute : "0 * * * * ?"
default = everyChange, everyMinute, restoreOnStartup
}

Items {
gSQL* : 
}

This may not help with the Group:Number:SUM issue, but might be worth changing.

Done. Tanks for that hint.

I just figured out that since 2015-12-01 11:58:54 no further data were stored in the MySQL database for the affected items.

Since these items are part of my persistence how can this be? Can I somehow “reactive” persistence for these items?

Thx
John

P.S: Topic of my problem does not match anymore. The Group:SUM works fine, it’s a persistence issue.

Some days ago I found the solution:

  • in previous setup I persisted all data, both group items and items of a group
  • in new setup I’ve persisted items without group items

Since my Group:Number:Sum calculates a group value but this wasn’t persisted obviously there was nothing to display :smile: