Page 9 of 15
Re: Energy Dashboard (Build in)
Posted: Tuesday 23 July 2024 0:20
by ChriWo
Ok,
Thank you for the explanation, but where can I find/get the values in the picture?
I cannot find this?
Re: Energy Dashboard (Build in)
Posted: Tuesday 23 July 2024 7:25
by Kedi
Kedi wrote: ↑Tuesday 09 July 2024 11:08
gizmocuz wrote: ↑Tuesday 09 July 2024 8:06
Kedi wrote: ↑Saturday 29 June 2024 21:25
I think that there are still some calculation errors
No there are not.
Grid = 411
PV = 3
Means House = 411 + 3 = 414 Watt
You get power from both Grid and PV
Grid = 0
PV = 0
= House = 0
Grid = 100
PV = 0
= House = 100
Grid = 0
PV = 100
= House = 100
Grid = 100
PV = 100
= House = 200
I placed 2 pictures. The 3 Watts in the Solar circle should be negative, see the widget.
The panels are consuming power instead of delivering power.
I am measuring power with a Shelly EM, and that device can measure in 2 directions positive and negative.
And yes a converter stays on the net and consumes power when there is no sun.
The house get some power and the converter get some power.
So the total of those 2 comes from the net.
Or do I make a mistake?
2 weeks back I asked this question. "Or do I make a mistake?"
I really would appreciate an answer.
Re: Energy Dashboard (Build in)
Posted: Tuesday 23 July 2024 8:59
by waltervl
ChriWo wrote: ↑Tuesday 23 July 2024 0:20
Ok,
Thank you for the explanation, but where can I find/get the values in the picture?
I cannot find this?
The 6.600 Watt at 16:15 should have been visible on the energy board on 16:15 hours.
Re: Energy Dashboard (Build in)
Posted: Tuesday 23 July 2024 9:14
by waltervl
Kedi wrote: ↑Tuesday 23 July 2024 7:25
Kedi wrote: ↑Tuesday 09 July 2024 11:08
gizmocuz wrote: ↑Tuesday 09 July 2024 8:06
No there are not.
Grid = 411
PV = 3
Means House = 411 + 3 = 414 Watt
You get power from both Grid and PV
Grid = 0
PV = 0
= House = 0
Grid = 100
PV = 0
= House = 100
Grid = 0
PV = 100
= House = 100
Grid = 100
PV = 100
= House = 200
I placed 2 pictures. The 3 Watts in the Solar circle should be negative, see the widget.
The panels are consuming power instead of delivering power.
I am measuring power with a Shelly EM, and that device can measure in 2 directions positive and negative.
And yes a converter stays on the net and consumes power when there is no sun.
The house get some power and the converter get some power.
So the total of those 2 comes from the net.
Or do I make a mistake?
2 weeks back I asked this question. "Or do I make a mistake?"
I really would appreciate an answer.
I suppose you do not make a mistake but the dashboard probably does not take into account negative values from a solar panel set. Inverters do not show these negative values. You measure it yourself so you see it. Perhaps it is an easy fix in the web part of the energy dashboard and you can play with it yourself and make an easy update and PR. Else it needs a C++ change.
Edit: looking at the code in
https://github.com/domoticz/domoticz/bl ... troller.js line 405 the Math.abs part should be removed as that makes it a positive value.
Code: Select all
$scope.fActualSolar = Math.round(Math.abs(parseFloat(item["Usage"].replace(' Watt',''))));
should perhaps be
Code: Select all
$scope.fActualSolar = Math.round(parseFloat(item["Usage"].replace(' Watt','')));
Re: Energy Dashboard (Build in)
Posted: Tuesday 23 July 2024 10:22
by Kedi
Tnx, for the answer. I removed the math.abs and will see tonight if that solves the problem, because even with this dark weather and rain the solar panels still produce power.
Re: Energy Dashboard (Build in)
Posted: Wednesday 24 July 2024 12:54
by Satch23
Hi,
Thanks for the new energy dashboard in Domoticz. It's an awesome addition to Domoticz.
I have a remark & question about it tho...
When you activate dynamic price calculation is saves those values at the end of the day in the multimeter_calendar Price column. Which makes sense.
But I think, when energy prices changes you get some weird results in e.g. the Power report log.
The T1, T2, R1, R2 values will be calculated with the new energy prices BUT the total prices will be show as calculated dynamically, unless Price = 0 in DB then it will be recalculated.
Is there a reason why energy prices are not stored for historical reasons? Would be nice to have the prices historically correct.
Also I noticed that costs only have 4 digits after the decimal point but usually the energy prices consist of more digits after the decimal point.
Keep up the good work!
Re: Energy Dashboard (Build in)
Posted: Friday 26 July 2024 6:50
by Kedi
waltervl wrote: ↑Tuesday 23 July 2024 9:14
I suppose you do not make a mistake but the dashboard probably does not take into account negative values from a solar panel set. Inverters do not show these negative values. You measure it yourself so you see it. Perhaps it is an easy fix in the web part of the energy dashboard and you can play with it yourself and make an easy update and PR. Else it needs a C++ change.
Edit: looking at the code in
https://github.com/domoticz/domoticz/bl ... troller.js line 405 the Math.abs part should be removed as that makes it a positive value.
Code: Select all
$scope.fActualSolar = Math.round(Math.abs(parseFloat(item["Usage"].replace(' Watt',''))));
should perhaps be
Code: Select all
$scope.fActualSolar = Math.round(parseFloat(item["Usage"].replace(' Watt','')));
I checked and it is only a small visual solution. Indeed the value on the Dashboard is now negative.
But the dotted line did not change and more important nothing changed in the calculation of prices in the database etc....
So Prices and kWh values are not consistant with each other.
Re: Energy Dashboard (Build in)
Posted: Friday 26 July 2024 9:41
by waltervl
Kedi wrote: ↑Friday 26 July 2024 6:50
waltervl wrote: ↑Tuesday 23 July 2024 9:14
I suppose you do not make a mistake but the dashboard probably does not take into account negative values from a solar panel set. Inverters do not show these negative values. You measure it yourself so you see it. Perhaps it is an easy fix in the web part of the energy dashboard and you can play with it yourself and make an easy update and PR. Else it needs a C++ change.
Edit: looking at the code in
https://github.com/domoticz/domoticz/bl ... troller.js line 405 the Math.abs part should be removed as that makes it a positive value.
Code: Select all
$scope.fActualSolar = Math.round(Math.abs(parseFloat(item["Usage"].replace(' Watt',''))));
should perhaps be
Code: Select all
$scope.fActualSolar = Math.round(parseFloat(item["Usage"].replace(' Watt','')));
I checked and it is only a small visual solution. Indeed the value on the Dashboard is now negative.
But the dotted line did not change and more important nothing changed in the calculation of prices in the database etc....
So Prices and kWh values are not consistant with each other.
Then you need to play a little bit more with the javascript EnergyDashboardController.js, perhaps somewhere else it is calculated wrongly now. If I could find the first change I am sure you can find and modify the rest of it.
Re: Energy Dashboard (Build in)
Posted: Friday 26 July 2024 15:33
by Kedi
I think that the calculation is done in the Source and that the Dashboard is a nice presentation of current power flow.
It is not acurate and I won't persue this because on some other place there might be some flaws.
I have dynamic prices from Tibber.
Tibber has a nice API which, among other things, presents daily totals, which are the basis for the invoice to me every month.
I looked at those and compare them with the content of the MultiMeter_Calendar.
The deviation is too much to be valid.
Nothing wrong with the nice presentation of the Dashboard, but the values don't add up.
Re: Energy Dashboard (Build in)
Posted: Friday 26 July 2024 21:42
by waltervl
Cost calculation is completely different from arrow direction calculation. So strange you give up now....
Re: Energy Dashboard (Build in)
Posted: Saturday 27 July 2024 8:13
by Kedi
I know, I am disappointed in me too.

Re: Energy Dashboard (Build in)
Posted: Sunday 04 August 2024 7:57
by Toulon7559
Nice Dashboard.
Would be fun to show on private website:
(how) is online export easily possible as weblink (or as graphic-file)?
Re: Energy Dashboard (Build in)
Posted: Sunday 04 August 2024 10:58
by imautohuttraeger
Toulon7559 wrote: ↑Sunday 04 August 2024 7:57
Nice Dashboard.
Would be fun to show on private website:
(how) is online export easily possible as weblink (or as graphic-file)?
You can try to integrate it via iframe. But of course you have to open your lokal URL to the public internet first. Something like this:
Code: Select all
<h1>Energy Dashboard iFrame Integration</h1>
<iframe src="http://YOUR-LOCAL-IP:8080/#/Energy" width="100%" height="600" style="border:none;">
</iframe>
pls expain energy dashboard
Posted: Monday 05 August 2024 19:44
by BartSr
Hi!
Anyone who can explain the figures on the dashboard?
Especially those of PV-panels.
I can see that 389W is currently generated which is correct but -10.325 kWh is weird to me.
I am having three sets of panels:
Solaredge: generated today 16.091 kWh value taken from Solaredge API
Mastervolt set 1: generated today 6.355 kWh value taken from powerplug between inverter and mains
Mastervolt set 2: generated today 6.909 kWh value taken from powerplug between inverter and mains
So I 'had expected to see some like - ca. -29.355 kWh iso ca. -10.325 kWh
To be sure no history of PV-total should disturb proper display I yesterday created a new device for PV-total so without history.
Real weird to me.
This the script to sum the three sets
Code: Select all
return
{
on =
{
timer = { 'every minute',
'at 21:48',
},
},
execute = function(domoticz, item)
local PVcellenInverter = domoticz.devices(107) -- garage
local PVtuinhuis = domoticz.devices(970) -- house
local PVschuurplug7 = domoticz.devices(1532) -- house
local PVtotal = domoticz.devices(1616) -- total (Create a dummy kWh, Electricity (instant and counter) device)
a= (domoticz.devices(107).counterToday)
b= (domoticz.devices(970).counterToday)
c= (domoticz.devices(1532).counterToday)
--print (a)
--print (b)
--print (c)
PVtotal.updateElectricity(
( PVcellenInverter.actualWatt + PVtuinhuis.actualWatt + PVschuurplug7.actualWatt)*-1 , (a+b+c) *-1000
-- PVcellenInverter.WhTotal + PVtuinhuis.WhTotal --+ PVschuurplug7.WhTotal
)
-- if domoticz.time.matchesRule('at 21:48') then
-- print ("het is de juiste tijd")
-- PVtotal.updateElectricity(0,0)
-- end
end
}
Re: Energy Dashboard (Build in)
Posted: Monday 05 August 2024 22:00
by waltervl
I don't know why you used counterToday as that is not the value you want to use. See the example script in this topic how to add multiple inverters.
https://www.domoticz.com/forum/viewtopi ... 34#p317834
Also check that the solar device are all set as generating and not as usage devices. (Check through edit button)
Re: Energy Dashboard (Build in)
Posted: Tuesday 06 August 2024 20:41
by BartSr
@ Walter,
I used your advice to sum my 3 PV-systems.
system1's values taken from inverter. This seems to meet NO problems.
both system 2 and 3 's values ar taken from powerplugs flashed with Tasmota.
These are causing errors.
script to sum values
Code: Select all
{
on =
{
timer = { 'every minute' }
},
execute = function(domoticz, item)
local Solar1Power = domoticz.devices(107) -- Solar set 1, existing General kwh device
local Solar2Power = domoticz.devices(970) -- Solar set 2, existing General kwh device
local Solar3Power = domoticz.devices(1532) -- Solar set 3, existing General kwh device
-- Create manually a dummy kWh, Electricity (instant and counter) device in generation mode
local SolarTotal = domoticz.devices(1617) -- total, to be used in Energy dashboard configuration
SolarTotal.updateElectricity(
Solar1Power.actualWatt + Solar2Power.actualWatt + Solar3Power.actualWatt,
Solar1Power.WhTotal + Solar2Power.WhTotal + Solar3Power.WhTotal
)
end
}
error which pops up
Code: Select all
2024-08-06 20:33:00.509 Error: dzVents: ...domoticz/scripts/dzVents/generated_scripts/Script #9.lua:19: attempt to perform arithmetic on a nil value (field 'WhTotal')
all power generating devices flashed with Tasmota are hooked up via mqtt towards devices "General, kWh"
So what's wrong.
Why I used counter-Today? Well I'm interested in total generated solar-power / day.
Thanks again for your help
Re: Energy Dashboard (Build in)
Posted: Tuesday 06 August 2024 21:13
by waltervl
When using the General kWh devices also for the total devices you automatically get the daily values reported (and also the weekly, monthly and yearly).
Why the Tasmota filled devices are not working I have no idea. The Whtotal value should work for this as they also work for the inverter.
Re: Energy Dashboard (Build in)
Posted: Thursday 08 August 2024 14:10
by BartSr
Walter,
This teaches the MQTT explorer about data sent to Dz and causing errors. Does this makes sense?
-Bart
Re: Energy Dashboard (Build in)
Posted: Thursday 08 August 2024 15:29
by waltervl
Perhaps the svalue with Energy (Wh) not being an integer?
What do you get of you log the values to the Domoticz logging eg add these lines just before the SolarTotal.updateElectricity statement?
There should be normal values displayed and not a NIL
Code: Select all
domoticz.log(' Solar2 total Energy: ' .. Solar2Power.WhTotal, domoticz.LOG_INFO)
domoticz.log(' Solar3 total Energy: ' .. Solar3Power.WhTotal, domoticz.LOG_INFO)
Re: Energy Dashboard (Build in)
Posted: Thursday 08 August 2024 16:56
by Toulon7559
You can try to integrate it via iframe. But of course you have to open your lokal URL to the public internet first. Something like this:
Code: Select all
<h1>Energy Dashboard iFrame Integration</h1>
<iframe src="
http://YOUR-LOCAL-IP:8080/#/Energy" width="100%" height="600" style="border:none;">
</iframe>
Iframe is OK, but exposing a local, dynamic Domoticz-URL to the world is not my favorite.
Instead thinking towards a 2-step approach which first locally, periodically grabs/webscrapes the picture and puts it in a graphic file, and
then as 2nd step exports & integrates that file into the website.
Have to think how your proposed setup for iframe might be tweaked for that realisation ......