Author Topic: Feature request: Rolling sum of rain  (Read 456 times)

Offline laalves

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
Feature request: Rolling sum of rain
« on: October 18, 2017, 10:32:12 am »
Hi,

It seems the variable SumRain24 is resetting at midnight, so it isn't actually the cumulative rain over the las 24 hours, rather it is accumulated rain since midnight.

For my sprinkler control PLEG this is not useful. Is there a way to create one or more variables like this? Last24, Last48, Last72 that would actually display those accumulated values over the last X hours instead of resetting at midnight?

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6339
  • Karma: +288/-70
  • "Less is more"
Re: Feature request: Rolling sum of rain
« Reply #1 on: October 18, 2017, 10:42:08 am »
This value is taken directly from the Netatmo API, rather than being computed locally in the plugin, so it's consistent with the native Netatmo GUI.  What would be easy enough is to compute your own running average from 1 hour data (SumRain1).

A simple way to do this is to have a scene triggering every hour which updates the buffer and writes the total to a device variable on the Netatmo parent device.  You'd lose the buffer on a Vera reset, unless you stored that as a variable too.  Some power meters do something similar for energy calculations.
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline laalves

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
Re: Feature request: Rolling sum of rain
« Reply #2 on: October 18, 2017, 01:32:23 pm »
Hi again,

Ok, good suggestion, thanks. I was just trying the easy way ;-)