Logic Machine Forum
Record of wrong trends - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Application Store (https://forum.logicmachine.net/forumdisplay.php?fid=11)
+--- Thread: Record of wrong trends (/showthread.php?tid=3541)



Record of wrong trends - davidchispas - 03.09.2021

Hello, after a while I was able to recover the remote connection of an LM device.

It is configured to obtain a record of hot water and heating consumption trends.

I could see that until a while ago those monthly data at annual view were correct, but currently the same value is repeated. On a monthly basis, the daily data can be seen to be correctly recorded. Somehow, that type of data is not reset and maintains that total value for months.

Attached some images where you can see the error. I do not know if it agrees with previous Firm updates, since yesterday I was able to update to the latest firm. The consumption data until yesterday was reset to day 28, but from today it is to day 1.


       


RE: Record of wrong trends - admin - 03.09.2021

This can possibly happen if the device was powered off for a long time period. What are the settings for other trend logs?


RE: Record of wrong trends - davidchispas - 06.09.2021

(03.09.2021, 10:35)admin Wrote: This can possibly happen if the device was powered off for a long time period. What are the settings for other trend logs?

He was always under tension and recording values daily. The loss of my connection has been due to problems with the company router and that would not affect.

It is curious but, the daily records are fine as you can see in the image, but in the monthly total in annual view, that value per month is repeated..


RE: Record of wrong trends - davidchispas - 20.09.2021

Hello, at the end of the month I will check again what total value is registered to see if the problem is solved with the new Firm.

Reviewing the daily data, for some reason a counter has sent an erroneous value and this has been recorded. Can it be removed or modified in any way?


RE: Record of wrong trends - Daniel - 27.09.2021

You probably using trend type 'counter' and you had a drop in value which is not allowed there. Try using 'Counter with Negative delta' instead. No this cannot be modified.


RE: Record of wrong trends - davidchispas - 27.09.2021

(27.09.2021, 08:12)Daniel Wrote: You probably using trend type 'counter' and you had a drop in value which is not allowed there. Try using 'Counter with Negative delta' instead. No this cannot be modified.

record type is 'absolute value'. In the shared image above you can see the parameterization. This is a record that every month starts from the value 0 and increases according to the consumption of the meter.


RE: Record of wrong trends - davidchispas - 06.10.2021

Hello, I was waiting for a new month to start. With the new firm my problem is not solved. There is some error in the trend recording app, since the values in monthly view are being recorded correctly, but in annual view the value does not correspond to the monthly table. The same thing happens as the images shared above.

Any ideas so I can fix this?


RE: Record of wrong trends - admin - 06.10.2021

Can you send your backup via PM?


RE: Record of wrong trends - admin - 06.10.2021

Thanks for the backup. This bug will be fixed in the next release soon. I've also noticed an issue with the counter reset in your scripts. Because scheduled scripts and trends data collection run in parallel it's possible that trends get the older values and previous month value goes into the current month. You should reset the values not exactly at 0:00 but several minutes before that.


RE: Record of wrong trends - davidchispas - 06.10.2021

(06.10.2021, 08:48)admin Wrote: Thanks for the backup. This bug will be fixed in the next release soon. I've also noticed an issue with the counter reset in your scripts. Because scheduled scripts and trends data collection run in parallel it's possible that trends get the older values and previous month value goes into the current month. You should reset the values not exactly at 0:00 but several minutes before that.

1- Ok, thanks.

2- Indeed, previously that restoration was carried out every day 28, this month I changed it to day 1 to see what happened. How can I get my script to run before day 1?


RE: Record of wrong trends - admin - 08.10.2021

You can use a scheduled script that runs daily at some time close to midnight.
This example adds 1 hour to the current time and checks the day number. If it is 1 it means that the current day is the last day of the month.
Code:
date = os.date('*t', os.time() + 3600) -- 1 hour from now
if date.day == 1 then
-- do something
end



RE: Record of wrong trends - davidchispas - 02.12.2021

Hello, what total MB limitation do we have in the trend register? I had read a long time ago that this space was shortened with the last firm.

I want to log 3 4byte values per counter. (Total consumption, Monthly consumption and cost). I will have around 300 meters and surely this space will not be enough for everyone. 300x72KB = 21.6MB

Being this insufficient space, would I have to add more LMs to the installation or do we have another alternative to add more space?

Thanks


RE: Record of wrong trends - Daniel - 02.12.2021

Having 300 trends it is significant load also for CPU. You better split this.


RE: Record of wrong trends - davidchispas - 02.12.2021

(02.12.2021, 09:48)Daniel Wrote: Having 300 trends it is significant load also for CPU. You better split this.

and what limit do we have for each LM?


RE: Record of wrong trends - Daniel - 02.12.2021

The limit is 20MB but this is just not to overload memory and SPI. You also have to watch other factors like CPU load and all other stuff you will put it there. How are you going to connect 300 meters? I assume it is modbus and each line has a limit of 31. OK we do not limit this in LM but this is modbus specification. The reading from so many meters will be also a slow process.


RE: Record of wrong trends - davidchispas - 02.12.2021

(02.12.2021, 10:10)Daniel Wrote: The limit is 20MB but this is just not to overload memory and SPI. You also have to watch other factors like CPU load and all other stuff you will put it there. How are you going to connect 300 meters? I assume it is modbus and each line has a limit of 31.  OK we do not limit this in LM but this is modbus specification. The reading from so many meters will be also a slow process.

In this case, it arises with KNX electrical measurement meters. Although the idea is to be able to adjust it to any installation. In a previous similar project, but smaller, they were modbus and only 12 units.

Now I am in the discussion of how many LM to use for this project and even put a logical limitation not to saturate the machine.


RE: Record of wrong trends - Daniel - 02.12.2021

You should be OK with 2


RE: Record of wrong trends - davidchispas - 02.12.2021

(02.12.2021, 10:40)Daniel Wrote: You should be OK with 2

Thanks Daniel, I just realized I did the trend register calculation wrong. There are 300 counters x (72KB x 3 trends) = 64.8MB total

Following your advice and correct me if I am wrong, I could not exceed more than 150 records for each LM (10.8MB) that would be 50 counters. In total 6 LM.