Energy Dashboard - Template

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

Moderator: leecollings

User avatar
FireWizard
Posts: 1745
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Energy Dashboard - Template

Post by FireWizard »

@McMellow,

Thanks for the link.
I will have a look.

Regards
User avatar
gizmocuz
Posts: 2350
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Energy Dashboard - Template

Post by gizmocuz »

My template adjustments are only for users with a battery, do not use it if you have no battery
The code needs adjustedments if you want disable the battery
I posted it here as as is... Will do some more work

Cache is still an issue, will look at it later...
Quality outlives Quantity!
User avatar
FireWizard
Posts: 1745
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Energy Dashboard - Template

Post by FireWizard »

Good evening @gizmocuz,

Thanks for your response.

I did not know, that it was only intended for users with a battery.

Regards
User avatar
gizmocuz
Posts: 2350
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Energy Dashboard - Template

Post by gizmocuz »

No worries... But... please find here a version that you can also use without a battery, please see inside the file how to use it

I also added the option for a Water meter
EnergyDashboardBattery.jpg
EnergyDashboardBattery.jpg (108.97 KiB) Viewed 1042 times
Edit: New dashboard where items are placed aligned, and changed the icons
Attachments
Energy_Dashboard.zip
(6.47 KiB) Downloaded 35 times
Quality outlives Quantity!
HvdW
Posts: 504
Joined: Sunday 01 November 2015 22:45
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Twente
Contact:

Re: Energy Dashboard - Template

Post by HvdW »

Three things
- wonderfull, I like it
- I changed the background color to #48597f which comes near to the simple-gray color I'm using in my domoticz (which # is the simple-gray?)
- It does update in Edge, in Firefox it's the basic display without the input being displayed. How come?
Bugs bug me.
User avatar
gizmocuz
Posts: 2350
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Energy Dashboard - Template

Post by gizmocuz »

@HvdW, which version are you using? Did you try mine? Does that work in Firefox?
You can open the browsers developers console to check for errors

Edit: Just checked, it works in Firefox as well, so have a look at the browsers error console
Quality outlives Quantity!
User avatar
HansieNL
Posts: 957
Joined: Monday 28 September 2015 15:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Energy Dashboard - Template

Post by HansieNL »

@HvdW You can find the simple-gray color in the domoticz/www/styles/simple-gray/custom.css file. The simple-gray color seems to be #606c88.
Blah blah blah
User avatar
FireWizard
Posts: 1745
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Energy Dashboard - Template

Post by FireWizard »

Hi @gizmocuz

i tested your latest version. looks nice. but I have also a couple of things.

I tested with Firefox and Chrome browser

1.
If I start the "Custom" page in Firefox it does not update the data.
It starts updating after I loaded the first version (1.1) of MeneerKlaas.
Returning to your latest version updates the values, but the calculation is not correct.

To show the correct picture with updating values and animation of have to refresh the page by pressing F5.
I do not know, if this is caused by the updated cache functionality.

See:
Screenshot_Energy Dashboard.png
Screenshot_Energy Dashboard.png (60.45 KiB) Viewed 1038 times

The values in the "Solar circle" and the "P1 circle" are correct.
Therefore I don't see any animation from the Solar panels to the grid.
Sometimes I notice negative values in the "Home circle". This is not expected.

2.
As I receive the water value in Liters and not in m3, I changed the script to display L instead of m3.
See the screenshot

3. If I change the viewBox:
Notes:

When not using a battery and/or water meter, set the viewBox of the SVG object below to viewBox="0 0 60 40" to remove the empty space below
I did that, because I do not have a Battery yet. (Perhaps we can use the battery of my car)
In this case the screen does not show the lower circles in landscape mode. It is okay in portrait.

I do not see, why the calculations are wrong, as they are correct in version 1.1

Regards
User avatar
HansieNL
Posts: 957
Joined: Monday 28 September 2015 15:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Energy Dashboard - Template

Post by HansieNL »

Hello @gizmocuz
When I try your version the P1 Gas correct value is shown for 1 second and then it shows 0 m3. If I use the latest MeneerKlaas version I see the correct value.
I tried different browsers and a new installed portable Firefox version. I don't see an error in the log for the gas idx. Status 200 OK.

Code: Select all

let idP1Meter = 274;		// Change this value to be your ID for the Electricity Meter (P1)
let idGas = 320;		// Change this value to be your ID for the Gas meter. Set to -1 when not used.
let idWater = -1;		// Change this value to be your ID for the Water meter. Set to -1 when not used.
let idSolar = -1;		// Change this value to be your ID for your Solar Power. Set to -1 when not used.
let idBattSetpoint = -1;	// Change this value to be your ID for your Battery Watt. Set to -1 when not used.
let idBattSoc = -1;		// Change this value to be your ID for your Battery SOC. Set to -1 when not used.
let sLocales = 'nl-NL';	// Update your locales. For more information see: https://www.w3schools.com/jsref/jsref_tolocalestring.asp
Last edited by HansieNL on Wednesday 05 June 2024 13:28, edited 1 time in total.
Blah blah blah
Kedi
Posts: 536
Joined: Monday 20 March 2023 14:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Somewhere in NL
Contact:

Re: Energy Dashboard - Template

Post by Kedi »

Lastest from @gismocuz Animation and figures are not completely correct.
02.06.2024_19.04.05_REC.png
02.06.2024_19.04.05_REC.png (64.16 KiB) Viewed 1021 times
Logic will get you from A to B. Imagination will take you everywhere.
User avatar
FireWizard
Posts: 1745
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Energy Dashboard - Template

Post by FireWizard »

Hi @Kedi,

I see you have the same issue with the calculation of the power at home, as I have.
Now, when the solar panels stop producing, it is correct.
And how is your screen?

Also, you used a lot of water 😀.

You can change that to L, like I did, or you can divide it by 1000.

Regards
HvdW
Posts: 504
Joined: Sunday 01 November 2015 22:45
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Twente
Contact:

Re: Energy Dashboard - Template

Post by HvdW »

gizmocuz wrote: Sunday 02 June 2024 16:26 @HvdW, which version are you using? Did you try mine? Does that work in Firefox?
You can open the browsers developers console to check for errors

Edit: Just checked, it works in Firefox as well, so have a look at the browsers error console
Did a restart of Firefox and now it's there.
After every change of code for a Custom page I always do a <sudo service domoticz restart> anyway. Many Ctrl-F5 didn't help.
Same problem occured to other Custom pages as well.
Changes in a page take a long time to be displayed.
@HansieNL thanks for the color tip. Didn't know where to search inside Domoticz.

I like the square forms from the first versions more than the round forms, that why I am using that.

Domoticz may be less sophisticated than HomeAssistent but the way one can manipulate all kinds of things make it far more attrictive for me.
Thanks everyone for the nice contributions lately like those of JanPep f.i.
Bugs bug me.
Kedi
Posts: 536
Joined: Monday 20 March 2023 14:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Somewhere in NL
Contact:

Re: Energy Dashboard - Template

Post by Kedi »

FireWizard wrote: Sunday 02 June 2024 22:05 Hi @Kedi,

I see you have the same issue with the calculation of the power at home, as I have.
Now, when the solar panels stop producing, it is correct.
And how is your screen?
My screen is also fine when the solar panels stop producing.
Also, you used a lot of water 😀.

You can change that to L, like I did, or you can divide it by 1000.

Regards
On my widget it is L(iters). I did not notice that that was not transfered. I change that.
Logic will get you from A to B. Imagination will take you everywhere.
User avatar
gizmocuz
Posts: 2350
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Energy Dashboard - Template

Post by gizmocuz »

When you make a change in the custom template, you do not need to restart Domoticz, just clear your browser cache and press F5

I will (try to fix my code... A battery makes it rather complicated.....
Quality outlives Quantity!
User avatar
gizmocuz
Posts: 2350
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Energy Dashboard - Template

Post by gizmocuz »

New version, calculation is a lot simplified....
@kedi, this version should display correct values

One thing to note: If you are polling an inverter every 30 seconds, and polling the P1 meter or Battery every 5 seconds, it can happen that value's won't match.
For Instance, your Solar inverter reports 100 Watt, your grid reports -200 Watt ....
This means that in reality your Solar panels product 200 Watt or more...

A reason why I will install a Shelly EM with a CT clamp to measure it in real-time...
Attachments
Energy_Dashboard.zip
(6.28 KiB) Downloaded 60 times
Quality outlives Quantity!
Kedi
Posts: 536
Joined: Monday 20 March 2023 14:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Somewhere in NL
Contact:

Re: Energy Dashboard - Template

Post by Kedi »

Tnx, The return now works now as I expected. :D I already use the Shelly EM with a CT clamp
I see 0 kWh at my house now. Is that correct?

I think fDayHomeUsage is never calculated, is that correct?

Edit (again):
Got it, I think. Added

Code: Select all

        // Home usage: Calculated
        fDayHomeUsage = fDayNetUsage + fDaySolar - fDayNetDeliv;
        fActualHomeUsage = fActualSolar;
        if (fActualNet > 0) {
            fActualHomeUsage += fActualNet;
        }
to the getPower function.
Logic will get you from A to B. Imagination will take you everywhere.
User avatar
gizmocuz
Posts: 2350
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Energy Dashboard - Template

Post by gizmocuz »

@Kedi, thanks, missed that one, updated above file
Quality outlives Quantity!
User avatar
McMelloW
Posts: 427
Joined: Monday 20 November 2017 17:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V2024.1
Location: Harderwijk, NL
Contact:

Re: Energy Dashboard - Template

Post by McMelloW »

Thanks for all the work you lot have put in it.
For my understanding. What are idBattSetpoint and idBattSoc values stand for?
Greetings McMelloW
User avatar
gizmocuz
Posts: 2350
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Energy Dashboard - Template

Post by gizmocuz »

@McMelloW , If you have a battery at home, you need to charge/discharge it. You do this via a Setpoint device, like a thermostat setpoint.
You set it to 300, and it will charge with 300 Watt. Setting it to -300 it will discharge with 300 Watt
SOC (State of Charge) is a device that tells you how full a battery is, 0=empty, 100=100% full
Quality outlives Quantity!
Jan Jansen
Posts: 229
Joined: Wednesday 30 April 2014 20:27
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: The Netherlands
Contact:

Re: Energy Dashboard - Template

Post by Jan Jansen »

Thanks for this very nice addition!!

In any case, it's a shame that I have to use district heating. But in this case it is extra unfortunate. In my case, the daily use is shown by a custom sensor (GJ, 3 decimal places). Hopefully this can be added.
Locked

Who is online

Users browsing this forum: No registered users and 1 guest