Page 2 of 2

Re: Electricity consumption & cost per day, month and year

Posted: Friday 21 June 2024 15:37
by McMelloW
mojso wrote: Friday 21 June 2024 13:17 I made a change in the script, in line 150, 158, 167
if you plan to update domoticz immediately, you can do it before or after,
I have last beta update of Domoticz
Thanks a lot It works OK now.

Missing 5 days - Electricity consumption & cost per day, month and year

Posted: Friday 21 June 2024 20:09
by McMelloW
These 2 lines (179-180) in the source code

Code: Select all

            dz.log('daysCounterMonth: '  .. daysCounterMonth, dz.LOG_DEBUG)
            dz.log('daysCounterYear: '  .. daysCounterYear, dz.LOG_DEBUG)
Showing these results in the domoticz log

Code: Select all

2024-06-21 19:39:00.579  Status: dzVents: Debug: ElecConsCost: daysCounterMonth: 16
2024-06-21 19:39:00.579  Status: dzVents: Debug: ElecConsCost: daysCounterYear: 168
Today it is day 173 of 2024 and day 21 of June so I miss 5 days of the year and of the month. The date on my Raspberry Pi is the actual date & time. It is also synchronized with ntp

Does somebody has an explanation for this difference.

Re: Electricity consumption & cost per day, month and year

Posted: Friday 21 June 2024 20:29
by waltervl
It seems to count the number of entries in the database. So probably Domoticz did not register your energy every day.
Do you see gaps in the graphs of your original energy devices?

Re: Electricity consumption & cost per day, month and year

Posted: Friday 21 June 2024 23:38
by McMelloW
waltervl wrote: Friday 21 June 2024 20:29 It seems to count the number of entries in the database. So probably Domoticz did not register your energy every day.
Do you see gaps in the graphs of your original energy devices?
Yes there are gaps in these devices. I had to go back 5 days after an updatebeta. This causes the gaps in the database.
The energy data consumed and delivered is registered by my energy provider as I can see.

I had the impression the days and month were just counted by de calendar. But it is not.