Domoticz thermal energy kWh, thermal energy meter Topic is solved

On various Hardware and OS systems: pi / windows / routers / nas, etc

Moderator: leecollings

geoterm
Posts: 29
Joined: Saturday 20 December 2025 17:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz thermal energy kWh, thermal energy meter

Post by geoterm »

BartSr wrote: Sunday 21 December 2025 16:40 For yr calculation you need:
Measure device for E-input
Temp measure device inlet water
Temp measure device outlet water
Waterflow measure device.

All available?
Yes. You're right.I have all of this. I need the device or script to calculate the device's power in watts x time, i.e., the amount of thermal energy in kWh.
geoterm
Posts: 29
Joined: Saturday 20 December 2025 17:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz thermal energy kWh, thermal energy meter

Post by geoterm »

Computed or from device ?
Attachments
Przechwytywanie.JPG
Przechwytywanie.JPG (41.69 KiB) Viewed 157 times
geoterm
Posts: 29
Joined: Saturday 20 December 2025 17:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz thermal energy kWh, thermal energy meter

Post by geoterm »

In my opinion, this device is not working. It shows the current power in watts, but does not calculate energy in kWh. There is no data in the logs.
Attachments
1.JPG
1.JPG (10.3 KiB) Viewed 154 times
2.JPG
2.JPG (60.35 KiB) Viewed 154 times
User avatar
waltervl
Posts: 6677
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: Domoticz thermal energy kWh, thermal energy meter

Post by waltervl »

It should be set to calculated (as you do not supply the kwh counter) and you have to supply the watt data in Watts, not kW.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
geoterm
Posts: 29
Joined: Saturday 20 December 2025 17:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz thermal energy kWh, thermal energy meter

Post by geoterm »

It works :). Thank you.
And actually providing the device with a value in Watts.
The key was writing the dz vents script:

Code: Select all

return {
	on = {
		devices = {
			200
		}
	},
	execute = function(domoticz, device)
		domoticz.devices(277).updateElectricity(domoticz.utils.round((domoticz.devices(252).temperature * domoticz.devices(200).flow *63.65), 0))
	end
}
Attachments
a3.JPG
a3.JPG (58.38 KiB) Viewed 142 times
a1.JPG
a1.JPG (25.9 KiB) Viewed 142 times
a2.JPG
a2.JPG (47.55 KiB) Viewed 142 times
geoterm
Posts: 29
Joined: Saturday 20 December 2025 17:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz thermal energy kWh, thermal energy meter

Post by geoterm »

How to create a device that calculates only today Wh or total Wh ?
Attachments
b2.JPG
b2.JPG (43.59 KiB) Viewed 129 times
b1.JPG
b1.JPG (27.34 KiB) Viewed 129 times
BartSr
Posts: 489
Joined: Sunday 03 July 2016 16:16
Target OS: Raspberry Pi / ODroid
Domoticz version: V2024.7
Location: Netherlands
Contact:

Re: Domoticz thermal energy kWh, thermal energy meter

Post by BartSr »

This device automaticly resets the daily usage to 0 at 00.00h
Raspberry pi 3b
Arduino
KAKU
RfxCom
Zwave2MQTT
OTGW
Chinese sensors temp (Dallas),movement
Tasmota
Esp8266 / 32 espeasy
Zigbee2MQTT
geoterm
Posts: 29
Joined: Saturday 20 December 2025 17:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz thermal energy kWh, thermal energy meter

Post by geoterm »

Ok, but I want to display today wh and total wh on the display. How to do it?
User avatar
waltervl
Posts: 6677
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: Domoticz thermal energy kWh, thermal energy meter

Post by waltervl »

You cannot do that, there is no option for that. The whtotal value is only available on the log-report page of the device.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
geoterm
Posts: 29
Joined: Saturday 20 December 2025 17:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz thermal energy kWh, thermal energy meter

Post by geoterm »

Okay, that's what I felt.
geoterm
Posts: 29
Joined: Saturday 20 December 2025 17:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz thermal energy kWh, thermal energy meter

Post by geoterm »

I have a new challenge. In a new post. It concerns electricity, or rather, energy balance.
geoterm
Posts: 29
Joined: Saturday 20 December 2025 17:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz thermal energy kWh, thermal energy meter

Post by geoterm »

I've noticed an error in the temperature delta between the supply and return. On the left is the value calculated by the ESP32, and on the right by the Domoticz script. Domoticz is calculating the delta incorrectly. Why?
When I restart the raspberry it counts fine for some time.
https://www.youtube.com/watch?v=zELH0_coS5U
geoterm
Posts: 29
Joined: Saturday 20 December 2025 17:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz thermal energy kWh, thermal energy meter

Post by geoterm »

I had a problem removing devices—Domoticz was freezing. I temporarily disabled all LUA scripts, and now I can delete unnecessary devices.
User avatar
RonkA
Posts: 126
Joined: Tuesday 14 June 2022 12:57
Target OS: NAS (Synology & others)
Domoticz version: 2025.1
Location: Harlingen
Contact:

Re: Domoticz thermal energy kWh, thermal energy meter

Post by RonkA »

Hi, I see in the video the initial values are not the same, that seems to me that the temperatures are not calibrated right.
Also the sample times to do the calculations is not in sync so this will introduce further deviation..

What i am stating here are pure guesses from my part because, besides this video without audio or description, you don't give a lot of information..
SolarEdge ModbusTCP - Kaku - Synology NAS - Watermeter - ESPEasy - DS18b20
Work in progress = Life in general..
User avatar
waltervl
Posts: 6677
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: Domoticz thermal energy kWh, thermal energy meter

Post by waltervl »

What is your script, and how is it triggered, on device change of one of the 2 temperature devices?
And better post this question in a Lua specific topic as it is not related to energy device. viewforum.php?f=61
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
geoterm
Posts: 29
Joined: Saturday 20 December 2025 17:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz thermal energy kWh, thermal energy meter

Post by geoterm »

I think I managed to solve this problem with the help of Google. I also had trouble removing unnecessary devices—Domoticz was freezing. I disabled LUA scripts, removed the unnecessary devices, re-enabled LUA scripts, and observed that Domoticz was counting correctly. Thanks for the tips.
geoterm
Posts: 29
Joined: Saturday 20 December 2025 17:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz thermal energy kWh, thermal energy meter

Post by geoterm »

It is possible that I had temperature sensors with duplicate names, e.g. "tz" and "tZ".
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest