This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

SOLVED - Power consumption per day
#1
Hi. 
I have Wiser with Schneider Powertags and measure the consumption for some of the main consumers. 

JACUZZI 
My jacuzzi has a dedicated power tag and I use trends to log and see the data hour by hour. In trends; when choosing month it will use the daily consumption as average consumption per day and not the exact SUM of the actual power usage for that exact day. I have tried to play around in trends to find a way to sum up the consumption per day so i can see the daily/monthly/yearly consumption easily in a table or in a visualized trend. 
I guess I am doing somtehing wrong in trends as I were unable to find the soltution I was looking for.  Any step by step advise of how I can use trends to achieve what I am looking for? 

PowerTags built in counter. 
The power tags have a built in counter accumulating the used power.  I use it to show todays accumulated consumption before it is reset by a script at midnight every day.
The numbers are quite precise and a good source of data for recording the daily consumption too. 
As there is already a script running by midnight. I guess it should be pretty straight forward to add some lines of code to store this value in a database or a trend before resetting the value to 0 at midnight. Here are my short comings of LUA programming. How to store data and how to retrieve them later. 

I guess (?) that I would only need to register one value per day (per power tag) to get a overall consumption per day? (Regular trends runs as usual).



I see this thread have similarities: https://forum.logicmachine.net/showthrea...ght=trends
Schneider Wiser (homeLynk), Power Tags, DALI, Multitouch Pro, Panasonic Heating pump, Flexit balansed ventilation, HUE integration, Lemus Speaker system. Tibber integration.
Reply
#2
Use trends in counter mode but do not reset the counter value at midnight. No additional programming needed.
Reply
#3
Thank you admin.
I believe I have tried all variants I could think of regarding setting up the trends, but I feel the data is far off expected numbers when trying to get a SUM of daily consumption.

JACUZZI EXAMPLE (Same for other circuits too)
---------------------------------------------------------------
a) POWERTAG COUNTER: The power tags built in resettable counter show me something between 15-40kwh of consumption for the jacuzzi circuit near midnight every day (reset counter at midnight by script). Varies much according to outdoor temperatures, water temperature and of course usage. Which I feel is all quite acurate to my expectations and bills. Quite precise also for the large mains circuits power tag counter. The data is fetched via modbus/IP and is collected via a resettable counter named "PowerTag_152kw - Active Energy Resettable". (152 is the powertag ID and KW due to diveded to get k instead of w).

b) Logic Machine trend:
Settings: Object: "Active Power total", Name "..", Category "...", Log Type "Absolute value", Aggregate func: "Average", Trend res. "5minutes, Dec places "0", Res.data "180days", Daily data "2 years", Show Zero "yes".
For the trend i am now using the "Active Power Total" which shows the current power consumption from the power tag. Seems very precise and correct in view mode "day" or "week". When changing to month it shows correcty the average conspumption for the days as expected. BUT the numbers listed in the "data" is average and I guess they must be multiplied with x24 to get a per-day-consumption. Which for December is between 762- 1152w average consumption (762*24 =18.29kw/h and 1533*24=36.790kw/h). Also very near the expected and very close to the powerTags counter.

SO I want to get the numbers per day and month summed up and visualized so i can calculate my monthly consumption. I have attempted several ways in the trends dialog, but did not get any numbers that make sense.

c) Identical as B, but with "Counter":
SETTINGS: Object "Active Power Total" (Same as for b), Name: "...", Category "...", LogType: Counter, Aggregate function: Average, Trend Res: 5min, Decimal 0, Res data 30d, Daily data, 5yrs, Show Zero.
This setup give me numbers which are very off compared to my expectations. All values in December are as between 80.000W and 117.213W which is far off. It is also not peaking or low on the same days as in the a and b example above.

I am pretty sure I am doing something wrong here. The first question is what is the correct data source to use from the power tags. Is it the Current consumption as in a and b or should I use the power tags logging function?

Alternatively: Can I code a script writing data directly to a trends table in the database? (Are there examples of how to do this and how to retrieve this - preferably directly in trends as a normal trends graph).
Schneider Wiser (homeLynk), Power Tags, DALI, Multitouch Pro, Panasonic Heating pump, Flexit balansed ventilation, HUE integration, Lemus Speaker system. Tibber integration.
Reply
#4
As already mentioned Counter assumes that the value never decreases / resets. Absolute value is meant for values like temperature and humidity but not consumption values.
There are no functions for writing directly to trends. Create a separate object if you want to update trend "manually".
Reply
#5
THANK YOU ADMIN.
Finally I were able to get the results i wanted to achieve and measure the daily consumption. My fault as I had misunderstood how the trend works.

For those encountering the same issue as I had - Short version:
1. Use the correct kind source data (I use the "main counter" of the power tags and NOT the current consumption or resetable counter).
2. Use "counter" in trends setup.
3. Visualize "daily consumption" in trends by selecting month and see day by day consumption for all powertags set up as above.
Schneider Wiser (homeLynk), Power Tags, DALI, Multitouch Pro, Panasonic Heating pump, Flexit balansed ventilation, HUE integration, Lemus Speaker system. Tibber integration.
Reply


Forum Jump: