29.04.2021, 07:57
Looks good to me. It can also be done without the third script by adding this to the end of the second script that runs every hour at 59 minutes:
Code:
-- run only on the last hour of the day
hour = os.date('*t').hour
if hour == 23 then
total = energia_autoconsumata + grp.getvalue('32/1/16')
grp.write('32/1/16', total)
end