Hi all,
I'm currently using the custom graph function to display information regarding my solar energy equipment.
It works pretty well. Please see the picture.
In yellow : solar production
In red : solar injection in the grid (negative value). It corresponds to the "surplus"
In blue : consumption from the grid (EDF as I reside in France).
What I want is to automatically calculate and display my self-consumption percentage (see the black line).
self-consumtion = (solar_prod + solar_injection) / solar_prod (solar_injection is negative so that's OK).
Graph display works well for Daily report since Dashticz makes the calculation based on the CounterToday information I believe.
However, I'm struggling to have a good monthly report.
What I want is just to display the self-consumption line based on accumulated energy : (Sum_SolarProd + Sum_SolarInjection)/Sum_SolarProd
So simply it corresponds to (YellowBox + RedBox)/YellowBox
But Dashticz is calculating the self-conso percentage for each day, and make the average for the entire month.
In other words, Dashticz calculates this value: avg((SolarProd/SolarInjection)/SolarProd)). avg stands for "average of".
But I would like this calculation : (Sum_SolarProd + Sum_SolarInjection)/Sum_SolarProd
If someone could help me. Thanks in advance.
Monthly self-consumption percentage for solar energy.
Moderators: leecollings, htilburgs, robgeerts
-
- Posts: 9
- Joined: Saturday 23 September 2023 12:19
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Monthly self-consumption percentage for solar energy.
- Attachments
-
- simplified_config.js
- (849 Bytes) Downloaded 92 times
-
- Capture_autoconso.JPG (85.38 KiB) Viewed 3557 times
Last edited by pat44 on Sunday 24 September 2023 19:39, edited 1 time in total.
-
- Posts: 9
- Joined: Saturday 23 September 2023 12:19
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Monthly self-consumption percentage for solar energy.
See the json code here:
- Attachments
-
- Capture_autoconso_code.JPG (46.42 KiB) Viewed 3536 times
-
- Posts: 9
- Joined: Saturday 23 September 2023 12:19
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Monthly self-consumption percentage for solar energy.
Please see below the picture showing the issue I have for August.
Self-consumption (also called auto-consumption) should be "100*(833,74-196,56)/833,74 = 76,4 %"
But Dashticz is returning 79,81% because it calculates the average of daily percentage for all the days in August.
The problem seems to be very straighforward and easy to solve.
But I think Dashticz is simply not appropriate to make such a calculation. It would require something as an intermediate function to make a monthly calculation and return this value to the custom graphic function. I dont' know if this is possible ? Or maybe I'm missing a simpler solution ?
However, I love very much Dashticz for its infinite possiblities, it is a very nice domoticz extension.
Self-consumption (also called auto-consumption) should be "100*(833,74-196,56)/833,74 = 76,4 %"
But Dashticz is returning 79,81% because it calculates the average of daily percentage for all the days in August.
The problem seems to be very straighforward and easy to solve.
But I think Dashticz is simply not appropriate to make such a calculation. It would require something as an intermediate function to make a monthly calculation and return this value to the custom graphic function. I dont' know if this is possible ? Or maybe I'm missing a simpler solution ?
However, I love very much Dashticz for its infinite possiblities, it is a very nice domoticz extension.
- Attachments
-
- Capture_autoconso_code_august.JPG (27.03 KiB) Viewed 3487 times
-
- Posts: 2290
- Joined: Monday 29 August 2016 22:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Monthly self-consumption percentage for solar energy.
I understand the issue.
Probably I can add something to compute results from the aggregated data.
Like:
Would this fulfill your needs? Additional suggestions?
Probably I can add something to compute results from the aggregated data.
Like:
Code: Select all
data: [
SolarInj: 'd.v_277',
SolarProd: 'd.v_274',
GridConso: 'd.v_278'
],
data_aggr: [
AutoConso: '(aggr.SolarProd + aggr.SolarInj)*100/aggr.SolarInj'
]
-
- Posts: 9
- Joined: Saturday 23 September 2023 12:19
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Monthly self-consumption percentage for solar energy.
Yes it would fully satisfy my needs.
Is this "data_aggr" method already present or you plan to add it ?
Thanks so much for your quick answer.
Is this "data_aggr" method already present or you plan to add it ?
Thanks so much for your quick answer.
-
- Posts: 9
- Joined: Saturday 23 September 2023 12:19
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Monthly self-consumption percentage for solar energy.
Perfect, thanks!
-
- Posts: 9
- Joined: Saturday 23 September 2023 12:19
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Monthly self-consumption percentage for solar energy.
Hi @Lokonli, did you have time to work on this issue ?
Thanks.
Thanks.
Who is online
Users browsing this forum: No registered users and 1 guest