Electricity meter total value weekly comparison

Hi All,

I use OH3.3 on a Rasperrypi4 8GB.
I have an electricity meter that I read via MBus. The meter gives me current consumption values.
Additionally I always get the current meter reading (as Total Number).
My goal is to see how much electricity I have consumed on which day of the week or in the month.
That works also almost everything.

My error, however, is that always the first day / first month, etc. in the diagram is without values (See picture).
I have the data since 04 September about OH3 written.
However, each week is always displayed only Tuesday - Sunday.
In the annual overview (how much I have consumed per month) it is also not displayed.

What am I doing wrong?

Thanks for your help.

BR
Marvin

config:
  chartType: isoWeek
  label: Zaehlerstand
  sidebar: true
slots:
  grid:
    - component: oh-chart-grid
      config: {}
  legend:
    - component: oh-chart-legend
      config:
        bottom: 3
        type: scroll
  series:
    - component: oh-aggregate-series
      config:
        aggregationFunction: diff_last
        dimension1: isoWeekday
        gridIndex: 0
        item: Zaehlerstand_proxy
        markLine:
          data:
            - type: average
        markPoint:
          data:
            - name: min
              type: min
            - name: max
              type: max
          label:
            backgroundColor: auto
        name: Stromverbrauch
        service: rrd4j
        type: bar
        xAxisIndex: 0
        yAxisIndex: 0
  title:
    - component: oh-chart-title
      config:
        show: true
        text: "Test "
  tooltip:
    - component: oh-chart-tooltip
      config:
        confine: true
  xAxis:
    - component: oh-category-axis
      config:
        categoryType: week
        gridIndex: 0
        monthFormat: short
        weekdayFormat: short
  yAxis:
    - component: oh-value-axis
      config:
        gridIndex: 0
        scale: false
        splitLine:
          show: false
        name: kw/h
        nameLocation: center


That should be expected behavior and not an error.

Your aggregation function “diff_first” is comparing any value to the first value in your data. Therefore comparing first day /month of a week with itself is not showing data

Is there a workaround or something like that?
In principle, it is correct that only the difference from the previous day should be displayed.
So if yesterday the meter reading was 2000kw/h and today 2100kw/h it should show 100kw/h as consumption today.

I Just Seen this… but I don’t get it running

https://community.openhab.org/t/chart-fixed-aggregate-month-difference-last-1st-day-is-blank/120463

I noticed the same behavior. Is there another way of is this really by design. The same happens when selecting influx as service.

That’s more a mathematical issue then an openhab issues. Even at work our expensive sap system is showing same behavior for reporting

I found a solution

I played a little bit with the offset of the aggregate-series

offsetUnit: hour
offsetAmount: 1

Here is an example for my year chart, and I do the same for a month chart.

For the daily graphs I use minute as offsetUnit
image

1 Like