# \[SOLVED\] Group:Number:AVG not persisted?

**URL:** <https://community.openhab.org/t/solved-groupavg-not-persisted/78609>\
**Category:** Persistence Services\
**Created:** [July 24, 2019, 4:08pm UTC](https://community.openhab.org/t/solved-groupavg-not-persisted/78609 "2019-07-24T16:08:44Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![kriznik](https://community.openhab.org/letter_avatar_proxy/v4/letter/k/ee7513/32.png) [@kriznik](https://community.openhab.org/u/kriznik)\
**Post date:** [July 24, 2019, 4:08pm UTC](https://community.openhab.org/t/solved-groupavg-not-persisted/78609/1 "2019-07-24T16:08:44Z")

</div>

Hello,  
it does look like my Group:Number:AVG is not persisted by standard rules for some reason.  
All “normal” items are persisted when belongs to the group

```auto
gStore10

```

which is persisted every 10minutes

But none of these are:

```auto
Group:Number:AVG House_Pressure "Avg. Pressure [%.1f hPa]" <pressure> (gStatus, gStore10)
Group:Number:AVG House_Temperature "Avg. House Temperature [%.1f °C]" <temperature> (gStatus, gStore10)
Group:Number:AVG House_Humidity "Avg. House Humidity [%.0f %%]" <humidity> (gStatus, gStore10)
Group:Number:AVG House_Quality "Avg. House Air [%.1f %%]" <carbondioxide> (gStatus, gStore10)
Group:Number:AVG FF_Temperature "Avg. First Floor Temperature [%.1f °C]" <temperature> (gStatus, gStore10)
Group:Number:AVG GF_Temperature "Avg. Ground Floor Temperature [%.1f °C]" <temperature> (gStatus, gStore10)

```

```auto
gStore10* : strategy = every10Minutes, restoreOnStartup

```

Am I doing something wrong?  
Thanks

---

<div class="post-metadata">

**Author:** ![rossko57](https://community.openhab.org/user_avatar/community.openhab.org/rossko57/32/70263_2.png) [@rossko57](https://community.openhab.org/u/rossko57)\
**Post date:** [July 24, 2019, 4:20pm UTC](https://community.openhab.org/t/solved-groupavg-not-persisted/78609/2 "2019-07-24T16:20:51Z")

</div>

gStore10\* means to persist all members of a group named gStore10.  
That’s ambiguous when a group is itself a member - here you want the group value, but its equally valid to interpret as all members of the “subgroup”.

I think you must specify each group individually (with no \*).

---

<div class="post-metadata">

**Author:** ![kriznik](https://community.openhab.org/letter_avatar_proxy/v4/letter/k/ee7513/32.png) [@kriznik](https://community.openhab.org/u/kriznik)\
**Post date:** [July 24, 2019, 4:38pm UTC](https://community.openhab.org/t/solved-groupavg-not-persisted/78609/3 "2019-07-24T16:38:49Z")

</div>

well my thinking was House\_Temperature is member of the group gStore10 so it would be stored as well.  
So you are suggesting to specify those Group items separately in persistence?  
But wouldnt this solution store each value in that average group (which is not wanted)? I would like to store that avg value somehow

Is there any reason why Group which is member of other group is not stored? Eg. This is kind of special group which has got value on top of it, which would be nice to be able to store

---

<div class="post-metadata">

**Author:** ![rlkoshak](https://community.openhab.org/user_avatar/community.openhab.org/rlkoshak/32/75251_2.png) [@rlkoshak](https://community.openhab.org/u/rlkoshak)\
**Post date:** [July 24, 2019, 6:39pm UTC](https://community.openhab.org/t/solved-groupavg-not-persisted/78609/4 "2019-07-24T18:39:09Z")

</div>

I don’t remember the reason but what rossko57 says is the case. The only way to persist the state of a Group Item is to list that Item individually in the .persist file.

---

<div class="post-metadata">

**Author:** ![kriznik](https://community.openhab.org/letter_avatar_proxy/v4/letter/k/ee7513/32.png) [@kriznik](https://community.openhab.org/u/kriznik)\
**Post date:** [July 24, 2019, 7:57pm UTC](https://community.openhab.org/t/solved-groupavg-not-persisted/78609/5 "2019-07-24T19:57:29Z")

</div>

so I’ve tried to put AVG group there and nothing.  
I mean, I do have stored values which are in that group by having tham in gStore10 anyway, but I wanted to store AVG

Do I really need to compute it again from originals? It does not seem to be right  
I can’t draw graph based on Group:Number:AVG then ;/

---

<div class="post-metadata">

**Author:** ![rossko57](https://community.openhab.org/user_avatar/community.openhab.org/rossko57/32/70263_2.png) [@rossko57](https://community.openhab.org/u/rossko57)\
**Post date:** [July 24, 2019, 8:07pm UTC](https://community.openhab.org/t/solved-groupavg-not-persisted/78609/6 "2019-07-24T20:07:19Z")

</div>

Please show us your Item definition and your xxx.persist entry for a group that doesn’t work.

Note that you will need to restart openHAB to pick up most persistence configuration changes (due to essentially being version 1.x legacy service)

---

<div class="post-metadata">

**Author:** ![kriznik](https://community.openhab.org/letter_avatar_proxy/v4/letter/k/ee7513/32.png) [@kriznik](https://community.openhab.org/u/kriznik)\
**Post date:** [July 24, 2019, 8:21pm UTC](https://community.openhab.org/t/solved-groupavg-not-persisted/78609/7 "2019-07-24T20:21:24Z")

</div>

I’ve tried variation with and without \*

```auto
Home_Temperature : strategy = every10Minutes
Home_Humidity* : strategy = every10Minutes
gStore10* : strategy = every10Minutes, restoreOnStartup

```

I don’t think Item definition is somehow important but here it is

```auto
Group:Number:AVG House_Pressure "Avg. Pressure [%.1f hPa]" <pressure> (gStatus, gStore10)
Group:Number:AVG House_Temperature "Avg. House Temperature [%.1f °C]" <temperature> (gStatus, gStore10, Outdoor_Indoor_Graph)

```

members of the AVG group are stored anyway already because of gStore10 membership  
for example

```auto
Number Workroom_Temperature "Workroom [%.1f °C]" <temperature> (gStore10, FF_Temperature, House_Temperature) ["CurrentTemperature"] { channel = "mqtt:topic:Climate_Workroom:temperature" }

```

I might try one more restart, sure … just to be on the safe side

---

<div class="post-metadata">

**Author:** ![rossko57](https://community.openhab.org/user_avatar/community.openhab.org/rossko57/32/70263_2.png) [@rossko57](https://community.openhab.org/u/rossko57)\
**Post date:** [July 24, 2019, 8:38pm UTC](https://community.openhab.org/t/solved-groupavg-not-persisted/78609/8 "2019-07-24T20:38:38Z")

</div>

> [@kriznik](#):
>
> I’ve tried variation with and without \*

I don’t see why. You already know that it will not store the group average with a \* appended.

---

<div class="post-metadata">

**Author:** ![kriznik](https://community.openhab.org/letter_avatar_proxy/v4/letter/k/ee7513/32.png) [@kriznik](https://community.openhab.org/u/kriznik)\
**Post date:** [July 24, 2019, 8:58pm UTC](https://community.openhab.org/t/solved-groupavg-not-persisted/78609/9 "2019-07-24T20:58:01Z")

</div>

because why not as I haven’t have specific group in persistence, just gStore10\* before.  
Anyway, it’s not storing desired number even after restart sadly.  
2.5.1 snap, influx

---

<div class="post-metadata">

**Author:** ![rossko57](https://community.openhab.org/user_avatar/community.openhab.org/rossko57/32/70263_2.png) [@rossko57](https://community.openhab.org/u/rossko57)\
**Post date:** [July 24, 2019, 9:13pm UTC](https://community.openhab.org/t/solved-groupavg-not-persisted/78609/10 "2019-07-24T21:13:51Z")

</div>

Works for me. OH2.4, rrd4j

```csv
Group:Number:AVG gIntTemps "Internal temp sensors" <thermometer>

```

rrd4j.persist

```csv
    gIntTemps : strategy = everyChange, everyMinute

```

REST query response

```csv
{
  "name": "gIntTemps",
  "datapoints": "5",
  "data": [
    {
      "time": 1564002360000,
      "state": "15.5"
    },

```

I doubt its a factor that your target group is _also_ still a member of `gStore10`, where recording of it’s value _will_ be rejected.  
But maybe persistence only gives us one bite at the apple - I know it is clever enough to avoid duplicates.  
Try removing target from other group (and sadly, once more reboot).

---

<div class="post-metadata">

**Author:** ![kriznik](https://community.openhab.org/letter_avatar_proxy/v4/letter/k/ee7513/32.png) [@kriznik](https://community.openhab.org/u/kriznik)\
**Post date:** [July 24, 2019, 9:17pm UTC](https://community.openhab.org/t/solved-groupavg-not-persisted/78609/11 "2019-07-24T21:17:58Z")

</div>

is there a quick way how to check rest api?

---

<div class="post-metadata">

**Author:** ![rossko57](https://community.openhab.org/user_avatar/community.openhab.org/rossko57/32/70263_2.png) [@rossko57](https://community.openhab.org/u/rossko57)\
**Post date:** [July 24, 2019, 9:25pm UTC](https://community.openhab.org/t/solved-groupavg-not-persisted/78609/12 "2019-07-24T21:25:32Z")

</div>

> [@\[SOLVED\] New OpenhabianPi with old KNX binding](https://community.openhab.org/t/new-openhabianpi-with-old-knx-binding/77932/22):
>
> Use rrd4j and your Item name If your result says “datapoints”: “0” your Item is not being saved to rrd4j.

You’ll need the name of your persistence service, snap? influx?

---

<div class="post-metadata">

**Author:** ![kriznik](https://community.openhab.org/letter_avatar_proxy/v4/letter/k/ee7513/32.png) [@kriznik](https://community.openhab.org/u/kriznik)\
**Post date:** [July 24, 2019, 9:38pm UTC](https://community.openhab.org/t/solved-groupavg-not-persisted/78609/13 "2019-07-24T21:38:12Z")

</div>

influx

do i need to install that rest api something in addons?

---

<div class="post-metadata">

**Author:** ![rossko57](https://community.openhab.org/user_avatar/community.openhab.org/rossko57/32/70263_2.png) [@rossko57](https://community.openhab.org/u/rossko57)\
**Post date:** [July 24, 2019, 9:43pm UTC](https://community.openhab.org/t/solved-groupavg-not-persisted/78609/14 "2019-07-24T21:43:47Z")

</div>

Yes. It’s called “REST API Docs”. The actual API is always built in, but the “docs” are the interactive play-with-it utility.

---

<div class="post-metadata">

**Author:** ![rlkoshak](https://community.openhab.org/user_avatar/community.openhab.org/rlkoshak/32/75251_2.png) [@rlkoshak](https://community.openhab.org/u/rlkoshak)\
**Post date:** [July 24, 2019, 9:48pm UTC](https://community.openhab.org/t/solved-groupavg-not-persisted/78609/15 "2019-07-24T21:48:30Z")

</div>

> [@kriznik](#):
>
> influx

influxdb

Don’t forget the “db” part or it won’t work.

---

<div class="post-metadata">

**Author:** ![rossko57](https://community.openhab.org/user_avatar/community.openhab.org/rossko57/32/70263_2.png) [@rossko57](https://community.openhab.org/u/rossko57)\
**Post date:** [July 24, 2019, 9:53pm UTC](https://community.openhab.org/t/solved-groupavg-not-persisted/78609/16 "2019-07-24T21:53:59Z")

</div>

Thinks: what is the name of the .persist file being edited here …

---

<div class="post-metadata">

**Author:** ![kriznik](https://community.openhab.org/letter_avatar_proxy/v4/letter/k/ee7513/32.png) [@kriznik](https://community.openhab.org/u/kriznik)\
**Post date:** [July 24, 2019, 9:57pm UTC](https://community.openhab.org/t/solved-groupavg-not-persisted/78609/17 "2019-07-24T21:57:12Z")

</div>

filename is influxdb.persist 😉 and all other persisted items simply works, but not those avg’s

anyway, my rest is taking shit probably  
**Can’t read swagger JSON from [http://10.10.1.5:8080/rest/swagger.json](http://10.10.1.5:8080/rest/swagger.json)**

---

<div class="post-metadata">

**Author:** ![kriznik](https://community.openhab.org/letter_avatar_proxy/v4/letter/k/ee7513/32.png) [@kriznik](https://community.openhab.org/u/kriznik)\
**Post date:** [July 24, 2019, 10:21pm UTC](https://community.openhab.org/t/solved-groupavg-not-persisted/78609/18 "2019-07-24T22:21:45Z")

</div>

and… because I’m blind I’ve fixed it by naming those persistence groups correctly as they were Home instead of House … jeez  
that dumb feeling

btw it’s not needed to restart OH, it refreshed persistence and worked without restart

---

<div class="post-metadata">

**Author:** ![rossko57](https://community.openhab.org/user_avatar/community.openhab.org/rossko57/32/70263_2.png) [@rossko57](https://community.openhab.org/u/rossko57)\
**Post date:** [July 24, 2019, 10:46pm UTC](https://community.openhab.org/t/solved-groupavg-not-persisted/78609/19 "2019-07-24T22:46:18Z")

</div>

We all looked at that and missed it 🤪

---

<div class="post-metadata">

**Author:** ![rlkoshak](https://community.openhab.org/user_avatar/community.openhab.org/rlkoshak/32/75251_2.png) [@rlkoshak](https://community.openhab.org/u/rlkoshak)\
**Post date:** [July 25, 2019, 2:18pm UTC](https://community.openhab.org/t/solved-groupavg-not-persisted/78609/20 "2019-07-25T14:18:29Z")

</div>

> [@kriznik](#):
>
> anyway, my rest is taking shit probably  
> **Can’t read swagger JSON from [http://10.10.1.5:8080/rest/swagger.json](http://10.10.1.5:8080/rest/swagger.json)**

That was a momentary bug that appeared somewhere around snapshot build #1638 and was fixed somewhere around build #1640. You just need to upgrade to a newer snapshot.

[Next page](https://community.openhab.org/t/solved-groupavg-not-persisted/78609.md?page=2)
