Log entries for items with multiple channels

  • Platform information:
    • Hardware: Synology DS920+
    • OS: Synology DS (Debian) with Docker
    • Java Runtime Environment: Unknown - whatever the docker image contains
    • openHAB version: 3.4.0 stable
  • Issue of the topic: Thermostat temperature readings of group items toggling permanently

Hi all you out there :vulcan_salute: After switching to a completely file based OH configuration (things and items) everything works fine. One minor issue in the log is bogging me:

22:57:16.839 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'TCOG1Alle_Temperature' changed from 20 °C to 21.5 °C
22:57:16.853 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'TCOG1Alle_Temperature' changed from 21.5 °C to 21 °C
22:57:16.853 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'TCOG1Alle_Temperature' changed from 21 °C to 20 °C

This happens every 15 seconds and is cluttering my log. It always starts with an initial temp value (20° above), then cycles through whatever and ends with its inital value (20° above). I have no idea why - there are no log entries about other items having changed. Especially there are no log entries for the individual items that contribute to this “summary” item. Each of the channels linked to this summary item also has its dedicated item which does NOT log an event.

This is the summary item definition:

Number:Temperature TCOG1Alle_Temperature "OG1 Alle Ist [%.1f %unit%]" <temperature> ( TCOG1Alle ) [ "Measurement", "Temperature" ] {
  channel="somfytahoma:valveheatingsystem:LH30:TSOG1WC:temperature",
  channel="somfytahoma:valveheatingsystem:LH30:TSOG1Wohn:temperature",
  channel="avmfritz:FRITZ_DECT_301:OG1Arbeit:OG1Bad:temperature",
  channel="avmfritz:FRITZ_DECT_301:OG1Arbeit:OG1Essen:temperature",
  channel="avmfritz:FRITZ_DECT_301:OG1Arbeit:OG1Kueche:temperature",
  listWidget="widget:ts-label-item" [
    title="OG1 Alle Ist"
  ],
  widget="widget:ts-label-card"
}

Each of these channels also has a distinct item - for example, but believe me, all of these channels have such an item:

Number:Temperature TCOG1Bad_Temperature "OG1 Bad Ist [%.1f %unit%]" <temperature> ( TCOG1Bad ) [ "Measurement", "Temperature" ] {
  channel="avmfritz:FRITZ_DECT_301:OG1Arbeit:OG1Bad:temperature",
  listWidget="widget:ts-label-item" [
    title="OG1 Bad Ist"
  ],
  widget="widget:ts-label-card"
}

But the log entries only show up for the “summary” item, not for any of the individual ones. When the summary flips, aren’t the individual items are also supposed to change?

Why? :grimacing: Am I doing anything wrong? Or is it just an issue with how OH calculates the overall state of such a summary item and logs “intermediate” results? (If yes, “it shouldn’t” :slight_smile: )

Thanks for any insight!

This has everything to do with how you have set up your “summary” item. This is not really an expected use. Many items such as temperature items receive regular updates from the channels they are connected to. If the item state is currently the same as the update being sent then no change in the item occurs (and therefore no change is reported). With all of the different channels you have connected to this one item, you are getting a constant stream of updates but because each one of those updates is a little different they are all competing to be the “correct” item state.

For example if your TCOG1Bad_Temperature gets an update that it is 21.5 and that is already the state of TCOG1Bad_Temperature then you will not see any change in that item. But if some other item updated just before that with a temperature of 21.0 then your “summary” item’s current state is 21.0 and so will change to 21.5 when TCOG1Bad_Temperature updates.

There is a built in way to get a summary item that doesn’t include connecting all the channels to one item. Use a group. Group items can have any one of several different aggregation functions to give you a single summary state of all the members in a group.

As I am reviewing my post - could it be an issue with the AVM or Somfy binding? I have 2 floors, equipped with several thermostats from AVM and Somfy. All of them (remember, full file definition :slight_smile: ) have the same individual and summary items. This is the full block in the log that occurs every 15 seconds:

23:32:01.917 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'TCOG2Alle_Temperature' changed from 17.5 °C to 17 °C
23:32:01.940 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'TCOG1Alle_TargetTemperature' changed from 22 °C to 21 °C
23:32:01.940 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'TCOG1Alle_Temperature' changed from 20 °C to 21.5 °C
23:32:01.956 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'TCOG2Alle_Temperature' changed from 17 °C to 17.5 °C
23:32:01.956 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'TCOG1Alle_TargetTemperature' changed from 21 °C to 22 °C
23:32:01.957 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'TCOG1Alle_Temperature' changed from 21.5 °C to 21 °C
23:32:01.958 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'TCOG1Alle_Temperature' changed from 21 °C to 20 °C

The _Temperature items are readings, the _TargetTemperature items are Setpoints. Of course they differ from room to room.

The OG1 floor has 2 Somfy thermostats and 3 AVM. The OG2 floor has 1 Somfy thermostat and 5 AVM. Setting the manufacturer count in relation to the events being logged, it “looks” like Somfy might be the culprit.

I will try that at the weekend - thanks for the suggestion :slight_smile: Didn’t want to use it in the first place because the “summary” item gave me an easy way to set all TC target temps at once…

A group item also has this capability. A single command sent to a group item is redistributed to all the member items.

1 Like

Your profile reminded me of putting an image into mine - never mind, there’s always room for improvement :smiley:

Edit: Well humph. There were no replies when I started this and now I see @JustinG has basically said everything I did. Oh well, I’ll leave it be.

If you really mean for this Item to be a summary Item I’m not sure this is doing what you think it’s doing. It’s not going to populate the state of the Item with the average of all the values supplied by all the Channels. When one Channel updates, it’s going to update the state of the Item to that. When another Channel updates it will update to that. There is no correlation or summation of the states from all the Channels. The Item will simply represent the most recently reported value from what ever Channel reported last. So I would guess three of these Channels are reporting their state at basically the same time and the Item gets updated by them in sequence.

Because the update from the Channel is not changing the state of the Items individually linked to the Channel. Only changes and commands get logged by default. Because the Item is being updated from multiple channels, it is likely changing a lot as each Channel updates the Item in turn, causing lots of log entries.

If you are really after a summary Item, create a Group Item with an aggregation function. Add the individual Items linked to each Channel as members of the Group an that is our summary Item.

Got it - perfect explanation! As always: Many thanks for your support :smiley:

As always, it turns out I should rather have asked how to achieve my goal than discussing the wrong way I tried to solve it :smiley:

The goal was to populate the location cards of MainUI with temperature badges. For individual rooms, this works fine. HVAC Group containing a measurement and a setpoint. I now had the idea that it would be nice to also have this on the first floor card as an average:
grafik
(Wrong values obviously, because the HVAC group here has number items with multiple channels linked…)

Should I open a new question for this?

Edit: Sometimes it is useful to simply try things out. I thought that groups are always locations or equipment, but they can also act as points. Everything works now - thanks again for your support!

1 Like