Comments (34)
Maybe a bit offtopic, but anyway: I thought about rewriting this entire thing anyway someday and make it configurable via the UI. This just did not yet happen because I lack the neccessry amount of spare time to do this
from luxtronik.
You can create an utility_meter in HA. As an example:
heat_energy:
source: sensor.id_web_wmz_heizung
cycle: daily
water_energy:
source: sensor.id_web_wmz_brauchwasser
cycle: daily
You can then use them in the Energy dashboard. As already said, this is the thermal energy not the electrical energy.
from luxtronik.
Not the complete implementation for long term statistics, but it's a start :-) #23
from luxtronik.
A requirement to opt-in for statistics is that the sensor has state_class
set to one of the valid state classes: measurement
or total_increasing
. In our case, if I'm not wrong, the two sensors should have the measurement
class.
from luxtronik.
I've not yet read much about the HA energy management. Can only certain measurement units (kWh etc.) be used in the energy dashboard?
If so, can we automate that by checking the sensor type and apply the needed state_class?
from luxtronik.
I've not yet read much about the HA energy management. Can only certain measurement units (kWh etc.) be used in the energy dashboard?
Indeed, only the energy one can be integrated.
If so, can we automate that by checking the sensor type and apply the needed state_class?
I think so. I've tried to add a new property def state_class(self)
and test the type of sensor and if it's CONF_ENERGY
, return the measurement
class, without success.
from luxtronik.
I'm not sure, but from others custom components I've seen, they are using async_add_devices
instead of add_entities
(sensor.py#L67). Could it be a problem here ?
from luxtronik.
add_devices
vs. add_entities
.
I think I've read a long time ago that HA changed their terminology about whats a device / entity / integration / component and so on.
To be honest, I never really understood whats the right thing to use
from luxtronik.
It is a good time to rewrite. Recently, lots of sensor implementations are refactored using EntityDescription
, which alleviates you from lots of boilerplate and makes it kinda convenient:
https://github.com/home-assistant/core/pulls?q=is%3Apr+is%3Aclosed+EntityDescription
Whatβs needed for statistics is mostly covered in https://developers.home-assistant.io/docs/core/entity/sensor/
Please note the rules for the two state classes to be allowed for statistics, e.g. for the measurement
class:
The state represents a measurement in present time, not a historical aggregation such as statistics or a prediction of the future.
from luxtronik.
Okay so I added the luxtronik sensors the same you also used... But I have no Idea how to make them total_increasing instead of measurement.... Can someone tell me how you did it? I'm lost....
from luxtronik.
It's not yet ready in the actual code so the only way at the moment is to create new utility_meter
with those sensors:
utility_meter:
heat_energy:
source: luxtronik.id_web_wmz_heizung
cycle: daily
water_energy:
source: luxtronik.id_web_wmz_brauchwasser
cycle: daily
from luxtronik.
Okay thank you ^^ So its going to be supported natively by this integration later?
from luxtronik.
Why are we resetting the value every day? I mean isn't it a total value which is increasing indefinitely? Why setting it to 0 every day?
Doesn't that give the wrong values in the Energy Dashboard? Or do I not fully understand how the dashboard works?
from luxtronik.
Yes it is a total value which is increasing but I want to have the calculation done every day, that's why I have the daily cycle
setup. The "reset" is done on the new sensors created based on the two others from the luxtronik integration. The one from the integration are not reset, and keep increasing. If you setup a monthly cycle, then you will get the calculation done every month.
from luxtronik.
Mhh okay so for the energy dashboard hourly would be the best because its updating every hour as well right? The best would be to just put in the value which is increasing all the time. How can I do that?
from luxtronik.
Well that's the point, you can't with the actual integration, it has to be updated to add the long term statistics.
from luxtronik.
Oh okay but wasn't that added with the newest version 1.21?
Cause it says "Allow long term statistics for use with energy dashboard" or is that something different?
from luxtronik.
No I did a quick PR as a start but it far from the complete implementation for those. #22 (comment)
from luxtronik.
Maybe a bit offtopic, but anyway: I thought about rewriting this entire thing anyway someday and make it configurable via the UI. This just did not yet happen because I lack the neccessry amount of spare time to do this
π
@Bouni I have start writing a new gui config based version of your component:
https://github.com/BenPru/luxtronik
from luxtronik.
Hello,
I just discovered that those values:
luxtronik.id_web_wmz_heizung
luxtronik.id_web_wmz_brauchwasser
are not really the power what the heatpump draws.
It is what the heat pump has produced in heat in kW. Because a heat pump does not convert 1 kW of electricity into 1 kW of heat, most of the time it produces more heat for less electricity (1 kW of electricity = 3 kW of electricity). That is rather variable.
My house has consumed 35.4kWh today. However, the heat pump says that it has already consumed 59.3kWh for heating alone and hot water 5.1kWh.
My utility meter:
luxtronik_heat_energy:
source: luxtronik.waermemenge_kwh_heizung_raw
cycle: daily
luxtronik_water_energy:
source: luxtronik.waermemenge_kwh_warmwasser_raw
cycle: daily
I think we really have to ask Novelan how to calculate the real power draw or can someone enlighten me on this?
from luxtronik.
Indeed it is not related to power draw by the heat pump but the energy produced for water and heat.
from luxtronik.
Yeah thats actually not very useful for any energy measuring in home Assistant :/
Do you know the correct value I have to use?
from luxtronik.
Yeah thats actually not very useful for any energy measuring in home Assistant :/
Well, it depends what you would like to monitor
Do you know the correct value I have to use?
I'm not sure if there are any other parameters that could fill that requirement unfortunately.
from luxtronik.
Ok so I just asked the support...
There really is no value :(
from luxtronik.
I just wanted to ask if there is any update on this. Did the support tell you something useful?
I've searched on the internet and in the openHAB Forum someone stated that:
electrical power = heating power / COP
https://community.openhab.org/t/luxtronikheatpump-finding-the-currently-drawn-power/121605/12
The COP is stated on the outdoor part of my heatpump (4.5 in my case). Using that value I do come close to the value my energy counter of the house states. But it's not quite accurate (assuming both started at 0. I do not know that.).
Did someone find a way to extract the "real" power consumption of the heatpump?
from luxtronik.
Well sadly I did not :/
The support told me that there is no value given by them to extract.
So we have to figure it out with some other method.
With the electricalpower= heating/COP
What exactly is COP and is heating the current heating generating value or the total?
from luxtronik.
Too bad :(
COP is the Coefficient of performance
For my test I was using both values given by the heatpumpt and divided each by the COP stated on my heat pump. The sum of both gives me veeeery roughly the value that my energy counter states for total consumption.
But actually I'm very new to this topic, so I have no idea if that is the way one should/would do this. I'm just playing around with the values for now. Maybe someone could enlighten us.
from luxtronik.
Well I guess the only way to do so is to install something between the heat pump and the main power. Maybe a Shelly?
from luxtronik.
Probably, yes. My guess would be that the COP (and therefore the calculation) depends on external factors such as temperature, so I guess it would be pretty hard to calculate a good value.
Small update: Justed read up on this. The COP on my device is stated as A7/W35 which means for an air temp of 7 degress and a water temp of 35 degrees. So yep, depends on the temperatures. However mine states 4.5 on the device, but when I actually calcuate the COP myself (of course it's not A7W35 all the time ;-) ) using the overall power used vs. the data from the heat pump I get more like ~2.81
Using something like a shelly is probably pretty accurate. However in my case that would require re-wiring (because the heatpump is directly connected and not plugged in to a standard power socket), which I cannot and will not do myself. Too bad :-/
I'll test this calculation for a few days, let's see how "accurate" it is
from luxtronik.
Well I guess the only way to do so is to install something between the heat pump and the main power. Maybe a Shelly?
I have a seperate power meter for my heatpump (one of these "smart meters" also known as EHZ in Germany and probably other parts of Europe). With the upcoming EHZ support I will build a ESP / ESPhome based senor for it.
In my opinion thats the only way to tell what a heatpump actuall yuses in terms of electic power ...
from luxtronik.
We sadly don't have a seperate power meter for our heat pump :/ So I guess this solution is not usable for me.
from luxtronik.
Any news on this one? I've got a couple of modbus (energy) sensors that I can add just fine to HA's energy dashboard - one of them being a sensor that measures the energy my pump has consumed.
Then I've got two (Luxtronik) sensors for the energy vs domestic hot water energy produced that I cannot seem to add. Looking at these sensors in the Developer States overview, the only difference I can spot is their domain - luxtronik vs sensor, see below:
id: luxtronik.geothermal_pump_domestic_hot_water_energy_produced
state_class: total_increasing
unit_of_measurement: kWh
device_class: energy
icon: mdi:flash-circle
friendly_name: Geothermal Pump - Domestic Hot Water Energy Produced
id: sensor.geothermal_pump_energy
state_class: total
unit_of_measurement: Wh
device_class: energy
friendly_name: Geothermal pump Power
The first one (luxtronik) cannot be added to the energy dashboard, while as the second one (sensor) can. The energy dashboard should be able to handle both sensor types (increasing, total) and both units of measurement (W, kW).
Clues, anyone?
from luxtronik.
You should not add the luxtronic sensors to the energy dashboard since it is not electrical energy but thermal energy.
Thermal energy / electrical energy = SCOP.
The domain is used to determine if lon term statistics are enabled or not and I think it's good not to enable it.
If you really want to have long term statistics, you can create a utility meter sensor with a template.
from luxtronik.
You should not add the luxtronic sensors to the energy dashboard since it is not electrical energy but thermal energy. Thermal energy / electrical energy = SCOP.
The domain is used to determine if lon term statistics are enabled or not and I think it's good not to enable it. If you really want to have long term statistics, you can create a utility meter sensor with a template.
I know they're different in nature (no pun intended), but likely a good reminder for other folks - thanks for pointing it out
What I wanted to achieve is something akin to what you describe - will play around with a template instead.
from luxtronik.
Related Issues (20)
- Call manual update on sensor HOT 8
- Not in list HOT 6
- Old Entity remains after renaming 'friendly_name' HOT 3
- Question: Thermal Disinfection control HOT 8
- Set desired room temperature via luxtronik.write HOT 2
- [Errno 111] Connection refused HOT 3
- sensor template issue HOT 3
- Convert "Heat Amount" to "power consumption" HOT 9
- Merge project with BenPru/Luxtronik HOT 10
- Incorrect sensor readout by home assistant HOT 13
- Changed Domain Name for Entities HOT 10
- "ID_Einst_Hysterese_HR_verkuerzt_akt" HOT 3
- I need to integrate 2 Heatpumps in HA HOT 5
- integration is not setting up
- Error: [invert] is an invalid option for [sensor.luxtronik] HOT 2
- Integration is using deprecated `DEVICE_CLASS_*` constants HOT 3
- Renaming this integration HOT 4
- Integration wont work after updating HOT 4
- Set of the target hot water temperature not working. HOT 12
- Defrost HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from luxtronik.