Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature-Request - add sensors to measure produced heating #10

Open
guevara777 opened this issue Nov 7, 2024 · 10 comments
Open

Feature-Request - add sensors to measure produced heating #10

guevara777 opened this issue Nov 7, 2024 · 10 comments

Comments

@guevara777
Copy link

I´m waiting for my parts to control my own Heatpump with the code of your project. Thank you so much. Great work. 💯

I´m looking for a way to measure the produced heat of my heat-pump so that i´m able to calculate the "Jahresarbeitszahl" (SCOP) of my heat-pump. you can do so by deviding the produced heat through the consumend energy.

I just found a way to caluculate the produced heat of my heatpump (thank you chatgpt).

To do so, you need this:

1.) a sensor with the "Vorlauftemperatur" (in-water-temperature)
2.) a sensor with the "Rücklauftemperatur" (out-water-temperature)
3.) for 1.) and 2.) a statistics sensor (mean) to flatten the curves
4.) a template-sensor with the following code:

{% set ruecklauf = states('sensor.rucklauf_statistiksensor') | float %}
{% set vorlauf = states('sensor.vorlauf_statistiksensor') | float %}
{% set durchfluss = states('sensor.stiebel_eltron_isg_altbau_volume_stream_wp1') | float %}
{% set delta_t = vorlauf - ruecklauf %}
{% set durchfluss_m3_h = durchfluss / 1000 * 60 %}
{% set leistung_watt = (durchfluss_m3_h * delta_t * 4.18 * 1000) %}
{{ max(0,leistung_watt) | int(default=0) }}

this variables have (for example) these values:

Vorlauf = 32.09
Rücklauf = 28.52
Delta = 3.570000000000004
Durchfluss m³/h = 1.2
Leistung in Watt 17907

5.) a riemann-integral-sensor to convert W into kWh
6.) utiliy-meter-sensors based on the riemann-integral-sensor to measure daily, weekly, monthly and yearly produced heat

Maybe this helps someone else, too ... :)

@gRiMMi83
Copy link

gRiMMi83 commented Nov 7, 2024

Klingt interessant Versuch ich auch mal am Wochenende 👍

@basti242
Copy link
Owner

basti242 commented Nov 8, 2024

Oh ja cool, wieder was fürs WE um die Langeweile zu bekämpfen ;-) Das schau ich mir auch mal an.
Danke

@guevara777
Copy link
Author

Ah, ich sehe. Du hast das gleiche "Problem" wie ich 😄

@basti242
Copy link
Owner

Ich habe mir das gerade mal angesehen. Werde mal schauen ob die Werte plausibel sind und das dann einbauen. Kann ein paar Tage dauern.

@gRiMMi83
Copy link

I´m waiting for my parts to control my own Heatpump with the code of your project. Thank you so much. Great work. 💯

I´m looking for a way to measure the produced heat of my heat-pump so that i´m able to calculate the "Jahresarbeitszahl" (SCOP) of my heat-pump. you can do so by deviding the produced heat through the consumend energy.

I just found a way to caluculate the produced heat of my heatpump (thank you chatgpt).

To do so, you need this:

1.) a sensor with the "Vorlauftemperatur" (in-water-temperature) 2.) a sensor with the "Rücklauftemperatur" (out-water-temperature) 3.) for 1.) and 2.) a statistics sensor (mean) to flatten the curves 4.) a template-sensor with the following code:

{% set ruecklauf = states('sensor.rucklauf_statistiksensor') | float %}
{% set vorlauf = states('sensor.vorlauf_statistiksensor') | float %}
{% set durchfluss = states('sensor.stiebel_eltron_isg_altbau_volume_stream_wp1') | float %}
{% set delta_t = vorlauf - ruecklauf %}
{% set durchfluss_m3_h = durchfluss / 1000 * 60 %}
{% set leistung_watt = (durchfluss_m3_h * delta_t * 4.18 * 1000) %}
{{ max(0,leistung_watt) | int(default=0) }}

this variables have (for example) these values:

Vorlauf = 32.09
Rücklauf = 28.52
Delta = 3.570000000000004
Durchfluss m³/h = 1.2
Leistung in Watt 17907

5.) a riemann-integral-sensor to convert W into kWh 6.) utiliy-meter-sensors based on the riemann-integral-sensor to measure daily, weekly, monthly and yearly produced heat

Maybe this helps someone else, too ... :)

ich hab bisschen rumgespielt bekomm es leider nicht hin.
kannst du bitte noch die beiden Sensoren Vorlauf und Rücklauf aus deiner yaml hier rein kopieren, evtl. hab ich da schon den Fehler drin, da ich kein "statistics sensor" Typ gefunden habe? sorry für die noob fragen :-)

Danke

@basti242
Copy link
Owner

Die Werte die ich bekomme sind irgendwie komisch. Lass mich mal noch ein bisschen testen.

@gRiMMi83
Copy link

gRiMMi83 commented Nov 19, 2024

@guevara777 wo kommen die beiden Werte her bzw. was sagen die aus?

{% set durchfluss_m3_h = durchfluss / 1000 * 60 %}
{% set leistung_watt = (durchfluss_m3_h * delta_t * 4.18 * 1000) %}

Durchfluss / 1000 is klar aber warum mal 60?
selbes bei der 4,18 ?

@basti242
Copy link
Owner

4,186 kJ/kg ist die spezifische Wärmekapazität von Wasser.
die 60 wäre in dem Fall die Umrechnung von h in min. Also in Verbindung mit der /1000 wären das L/min.

@gRiMMi83
Copy link

gRiMMi83 commented Nov 19, 2024

ich hab es mal mit copilot versucht, der würde das wie folgt lösen, aber bei mir kommt immer der Fehler: "Missing property Platform line 16.

image

`sensor:

  • platform: template
    sensors:
    durchflussrate_m3s:
    value_template: "{{ (states('sensor.hp_flow_rate') | float) / 60000 }}"
    unit_of_measurement: "m³/s"
    temperaturdifferenz:
    value_template: "{{ (states('sensor.hp_outlet_temp') | float) - (states('sensor.hp_inlet_temp') | float) }}"
    unit_of_measurement: "°C"
    abgegebene_heizwaerme:
    value_template: >
    {% set v = states('sensor.durchflussrate_m3s') | float %}
    {% set delta_t = states('sensor.temperaturdifferenz') | float %}
    {% set cp = 4.18 %}
    {% set rho = 1000 %}
    {{ v * delta_t * cp * rho }}
    unit_of_measurement: "W"

  • platform: history_stats
    name: "Heizwärme Tag"
    entity_id: sensor.abgegebene_heizwaerme
    state: "on"
    type: time
    start: "{{ now().replace(hour=0, minute=0, second=0) }}"
    end: "{{ now() }}"

  • platform: history_stats
    name: "Heizwärme Woche"
    entity_id: sensor.abgegebene_heizwaerme
    state: "on"
    type: time
    start: "{{ now().replace(hour=0, minute=0, second=0) - timedelta(days=now().weekday()) }}"
    end: "{{ now() }}"

  • platform: history_stats
    name: "Heizwärme Monat"
    entity_id: sensor.abgegebene_heizwaerme
    state: "on"
    type: time
    start: "{{ now().replace(day=1, hour=0, minute=0, second=0) }}"
    end: "{{ now() }}"

  • platform: history_stats
    name: "Stromverbrauch Tag"
    entity_id: sensor.stromverbrauch
    state: "on"
    type: time
    start: "{{ now().replace(hour=0, minute=0, second=0) }}"
    end: "{{ now() }}"

  • platform: history_stats
    name: "Stromverbrauch Woche"
    entity_id: sensor.stromverbrauch
    state: "on"
    type: time
    start: "{{ now().replace(hour=0, minute=0, second=0) - timedelta(days=now().weekday()) }}"
    end: "{{ now() }}"

  • platform: history_stats
    name: "Stromverbrauch Monat"
    entity_id: sensor.stromverbrauch
    state: "on"
    type: time
    start: "{{ now().replace(day=1, hour=0, minute=0, second=0) }}"
    end: "{{ now() }}"

  • platform: template
    sensors:
    jaz_tag:
    value_template: "{{ (states('sensor.heizwaerme_tag') | float) / (states('sensor.stromverbrauch_tag') | float) }}"
    unit_of_measurement: "JAZ"
    jaz_woche:
    value_template: "{{ (states('sensor.heizwaerme_woche') | float) / (states('sensor.stromverbrauch_woche') | float) }}"
    unit_of_measurement: "JAZ"
    jaz_monat:
    value_template: "{{ (states('sensor.heizwaerme_monat') | float) / (states('sensor.stromverbrauch_monat') | float) }}"
    unit_of_measurement: "JAZ"`

@ricsch
Copy link

ricsch commented Nov 19, 2024

Moin,
als erstes vielen Dank für den tollen Impuls! Ich habe das bei mir leicht anders berechnet, die Werte sehen so wesentlich plausibler aus:

{% set ruecklauf = states('sensor.hp_inlet_temp') | float %}
{% set vorlauf = states('sensor.hp_outlet_temp') | float %}
{% set durchfluss = states('sensor.hp_flow_rate') | float %}
{% set delta_t = vorlauf - ruecklauf %}
{% set volumenstrom = durchfluss / 60 %}
{% set leistung_watt = (volumenstrom * delta_t * 4.18 * 1000) %}

{{ max(0,leistung_watt) | int(default=0) }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants