Open ManfredHi opened 11 months ago
Hi, thank you for the tool. But I also have no rotation (seen for daily rotation in the screenshot) at midnight with seldom changing values. The thin BLUE line is from my ancient calculation before I used Sourceanalytics, the value rises and drops to ZERO at midnight.
The RED line is from sourceanalytics. Around midnight it continues at the last level until a new datapoint arrives. and then the sourceanalytics value does not go to ZERO but starts with the first value of the new day. So the red line never touches the x-axis=ZERO. My idea is that at midnight all daily counters are rotated (to zero) , even without new values. May be this midnight rotation should be considered for rotation weekly/monthly/quarterly/yearly also. Normally only a small glitch, but very seldom counters will show a difference, eg. if a value is change on the 5th day of the month for the first time.
I checked with monthly rotation: it also only takes place with a new value for the datapoint, which in my case was on the 2. day of the month. So I think, that a automatically daily midnight rotation should be done to all time ranges.
Looking into the code around line 620 I found a "schedule 0 0 *" statement, is it possible, that this schedule never runs? Hoe To check?
cu Harvey
The reason for this request seams to be described also in https://github.com/DrozmotiX/ioBroker.sourceanalytix/issues/478
So the problem will vanish with a stable schedule around midnight, which is not affected by high cpu consumption or other timeouts. Near midnight time (within minutes) seems better than NOT running the midnight rotation! Under "all" circumstances the rotation (thus nulling seldom updated values) should run!
The reason for this request seams to be described also in #478
So the problem will vanish with a stable schedule around midnight, which is not affected by high cpu consumption or other timeouts. Near midnight time (within minutes) seems better than NOT running the midnight rotation! Under "all" circumstances the rotation (thus nulling seldom updated values) should run!
I'm rebuilding the adapter (also moving to typescript) to solve some issue and add new functionality.
Current implementation only handles 1-time schedule, future will be handled also at midnight but also at adapter started by comparing data & time with know values
Wenn aus irgendeinem Grund die SA-Instanz genau um MItternacht nicht läuft, werden keine berechnungen von SA durchgeführt. D.h. die Werte von currentDay, previousDay usw. werden nicht aktualisiert. Es wäre meiner Meinung nach sinnvoll, dass man die Funktion die um MItternacht automatisch abläuft auch manuell anstossen kann. Sinnvoll ist dies z.b. dann wenn man zeitnah merkt dass die Instanz nicht läuft. Auch wenn dann die Werte nicht 100%ig stimmen, ist es immer noch besser, als komplett falsche Werte zu haben bzw. alle einträge manuell ändern zu müssen.