Energy Dashboard (Build in)

In this subforum you can show projects you have made, or you are busy with. Please create your own topic.

Moderator: leecollings

ChriWo
Posts: 8
Joined: Tuesday 13 June 2017 8:54
Target OS: NAS (Synology & others)
Domoticz version: 2022.1
Location: Germany
Contact:

Re: Energy Dashboard (Build in)

Post by ChriWo »

Ok,
Thank you for the explanation, but where can I find/get the values in the picture?
I cannot find this?
Attachments
Bildschirmfoto 2024-07-22 um 21.15.08.png
Bildschirmfoto 2024-07-22 um 21.15.08.png (108.29 KiB) Viewed 2222 times
Kedi
Posts: 569
Joined: Monday 20 March 2023 14:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Somewhere in NL
Contact:

Re: Energy Dashboard (Build in)

Post 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.
Logic will get you from A to B. Imagination will take you everywhere.
User avatar
waltervl
Posts: 5766
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Energy Dashboard (Build in)

Post 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.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
waltervl
Posts: 5766
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Energy Dashboard (Build in)

Post 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','')));
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Kedi
Posts: 569
Joined: Monday 20 March 2023 14:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Somewhere in NL
Contact:

Re: Energy Dashboard (Build in)

Post 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.
Logic will get you from A to B. Imagination will take you everywhere.
Satch23
Posts: 1
Joined: Monday 15 June 2020 11:09
Target OS: -
Domoticz version:
Contact:

Re: Energy Dashboard (Build in)

Post 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!
Kedi
Posts: 569
Joined: Monday 20 March 2023 14:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Somewhere in NL
Contact:

Re: Energy Dashboard (Build in)

Post 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.
Logic will get you from A to B. Imagination will take you everywhere.
User avatar
waltervl
Posts: 5766
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Energy Dashboard (Build in)

Post 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.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Kedi
Posts: 569
Joined: Monday 20 March 2023 14:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Somewhere in NL
Contact:

Re: Energy Dashboard (Build in)

Post 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.
Logic will get you from A to B. Imagination will take you everywhere.
User avatar
waltervl
Posts: 5766
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Energy Dashboard (Build in)

Post by waltervl »

Cost calculation is completely different from arrow direction calculation. So strange you give up now....
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Kedi
Posts: 569
Joined: Monday 20 March 2023 14:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Somewhere in NL
Contact:

Re: Energy Dashboard (Build in)

Post by Kedi »

I know, I am disappointed in me too. ;)
Logic will get you from A to B. Imagination will take you everywhere.
Toulon7559
Posts: 856
Joined: Sunday 23 February 2014 17:56
Target OS: Raspberry Pi / ODroid
Domoticz version: mixed
Location: Hengelo(Ov)/NL
Contact:

Re: Energy Dashboard (Build in)

Post by Toulon7559 »

Nice Dashboard.

Would be fun to show on private website:
(how) is online export easily possible as weblink (or as graphic-file)?
Set1 = RPI-Zero+RFXCom433+S0PCM+Shield for BMP180/DS18B20/RS485+DDS238-1ZNs
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
imautohuttraeger
Posts: 112
Joined: Saturday 14 March 2020 13:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Energy Dashboard (Build in)

Post 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>
BartSr
Posts: 395
Joined: Sunday 03 July 2016 16:16
Target OS: Raspberry Pi / ODroid
Domoticz version: V2024.7
Location: Netherlands
Contact:

pls expain energy dashboard

Post 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
	
}
Attachments
Schermafbeelding 2024-08-05 193017.png
Schermafbeelding 2024-08-05 193017.png (40.36 KiB) Viewed 1679 times
Raspberry pi 3b
Arduino
KAKU
RfxCom
Zwave2MQTT
OTGW
Chinese sensors temp (Dallas),movement
Tasmota
Esp8266 / 32 espeasy
Zigbee2MQTT
User avatar
waltervl
Posts: 5766
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Energy Dashboard (Build in)

Post 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)
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
BartSr
Posts: 395
Joined: Sunday 03 July 2016 16:16
Target OS: Raspberry Pi / ODroid
Domoticz version: V2024.7
Location: Netherlands
Contact:

Re: Energy Dashboard (Build in)

Post 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
Raspberry pi 3b
Arduino
KAKU
RfxCom
Zwave2MQTT
OTGW
Chinese sensors temp (Dallas),movement
Tasmota
Esp8266 / 32 espeasy
Zigbee2MQTT
User avatar
waltervl
Posts: 5766
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Energy Dashboard (Build in)

Post 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.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
BartSr
Posts: 395
Joined: Sunday 03 July 2016 16:16
Target OS: Raspberry Pi / ODroid
Domoticz version: V2024.7
Location: Netherlands
Contact:

Re: Energy Dashboard (Build in)

Post by BartSr »

Walter,
This teaches the MQTT explorer about data sent to Dz and causing errors. Does this makes sense?
-Bart
Attachments
forum2.png
forum2.png (4.55 KiB) Viewed 1509 times
forum1.png
forum1.png (4.2 KiB) Viewed 1509 times
Raspberry pi 3b
Arduino
KAKU
RfxCom
Zwave2MQTT
OTGW
Chinese sensors temp (Dallas),movement
Tasmota
Esp8266 / 32 espeasy
Zigbee2MQTT
User avatar
waltervl
Posts: 5766
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Energy Dashboard (Build in)

Post 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)
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Toulon7559
Posts: 856
Joined: Sunday 23 February 2014 17:56
Target OS: Raspberry Pi / ODroid
Domoticz version: mixed
Location: Hengelo(Ov)/NL
Contact:

Re: Energy Dashboard (Build in)

Post 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 ......
Set1 = RPI-Zero+RFXCom433+S0PCM+Shield for BMP180/DS18B20/RS485+DDS238-1ZNs
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest