Hello @jswim788, @rossko57,
I only used Grafana to verify the data.
I found that the 24hours value I retrieved in openhab for the item
netatmo_rain_24hours
was always the double of the item netatmo_rain_1hour
for the same duration of time I checked.
Below is getting the correct value. The strategy for this item is to store write the data every hour.
rain_last_24hrs = Netatmo_Rain_1hour.sumSince(now.minusHours(24))
When I retrieve the data for the 24hours item with OpenHAB REST API I get the following 2 datapoint. I think this confirms the data from Grafana.
{
"name": "Netatmo_Rain_24hours",
"datapoints": "2",
"data": [
{
"time": 1584053877967,
"state": "3.299999952316284"
},
{
"time": 1584053880967,
"state": "3.299999952316284"
}
]
}
The following is the statistic with 1sec steps.
Below are the records of the 1hour item
{
"name": "Netatmo_Rain_1hour",
"datapoints": "26",
"data": [
{
"time": 1583967600533,
"state": "0.0"
},
{
"time": 1583971200580,
"state": "0.0"
},
{
"time": 1583974800581,
"state": "0.0"
},
{
"time": 1583978400581,
"state": "0.0"
},
{
"time": 1583982000581,
"state": "0.11100000143051147"
},
{
"time": 1583985599960,
"state": "0.0"
},
{
"time": 1583985600961,
"state": "0.0"
},
{
"time": 1583989200961,
"state": "0.0"
},
{
"time": 1583992800961,
"state": "0.11100000143051147"
},
{
"time": 1583996400961,
"state": "0.3330000042915344"
},
{
"time": 1584000000961,
"state": "0.11100000143051147"
},
{
"time": 1584003600963,
"state": "2.3239998817443848"
},
{
"time": 1584007200964,
"state": "0.0"
},
{
"time": 1584010800964,
"state": "0.0"
},
{
"time": 1584014400964,
"state": "0.0"
},
{
"time": 1584018000965,
"state": "0.0"
},
{
"time": 1584021599824,
"state": "0.0"
},
{
"time": 1584021600824,
"state": "0.0"
},
{
"time": 1584025200026,
"state": "0.0"
},
{
"time": 1584028800026,
"state": "0.0"
},
{
"time": 1584032400026,
"state": "0.0"
},
{
"time": 1584036000027,
"state": "0.0"
},
{
"time": 1584039600027,
"state": "0.0"
},
{
"time": 1584043200027,
"state": "0.0"
},
{
"time": 1584046800028,
"state": "0.0"
},
{
"time": 1584050400028,
"state": "0.0"
}
]
}