Does anyone know of a guide (blog or YouTube video) for doing simple arithmetic calculations in Home Assistant ? I assume I need to use a Helper.
I simply wanted to work out the Exact Heat Output given the exact input power
Does anyone know of a guide (blog or YouTube video) for doing simple arithmetic calculations in Home Assistant ? I assume I need to use a Helper.
I simply wanted to work out the Exact Heat Output given the exact input power
You will need to use a template sensor. Happy to give an example if it’s still required.
Yes please
Can you clarify what exactly you want to achieve and which sensors you want to use as input? I’m not totally clear from your first post.
I want to get an accurate Heat Output.
I think this uses watts input multiplied by DeltaT (which would need to be calculated by subtracting ReturnT from FlowT), and I think you then multiply this by 4.18
The equation for mass flow rate heat transfer needs to know flow rate and DeltaT, not the input power.
Alternatively, you can use the Carnot COP equation to estimate the heat output from the input power and flow temparature, but this is only an estimate.
My Heatpump app will calculate heat power from the Carnot COP for you:
There’s a small offset between flow and return temperatures, so the reported heat (and COP) may be a little higher than reality.
Here’s the mass flow rate heat transfer equation as mentioned by @Timbones as a home assistant template sensor. It needs to go into your configuration.yaml under the template section. Dividing by 3600 converts flow rate from liters/hour to liters/second. Adjust to your sensor names as needed.
template:
- sensor:
- name: "heat_power"
unique_id: "heat_power"
unit_of_measurement: W
state_class: measurement
device_class: power
state: >
{% set t_flow = states('sensor.ebusd_hmu_flowtemp') | float %}
{% set t_return = states('sensor.ebusd_hmu_returntemp_temps2') | float %}
{% set flow_rate = states('sensor.ebusd_hmu_waterthroughput') | float %}
{% set heat_power = flow_rate / 3600 * (t_flow - t_return) * 4186 %}
{{heat_power}}
Note that the specific heat of water (4184 J/kg.K) will be 10-15% lower if it contains glycol. [reference]
Thanks all,
Looks like Template Sensors is my next thing to get my head around
You should actively poll the required metrics on ebus (temperatures, flow rates,…) to get a better time resolution. Now it looks like you only get a value ever so often. I do this using Node-RED as detailed here:
I am indeed using Node-Red. I am using your flow which you posted some time ago. Very odd, as it’s just not refreshing Room Temp at all
Very weird - can you post your ebus config & the NodeRED flow? I’m happy to take a look.
Thanks @Andre_K
My Docker-compose.yaml
ebusd:
container_name: ebusd
image: john30/ebusd:latest
restart: unless-stopped
ports:
- 8888:8888
volumes:
- /opt/ebusd/config:/config
command: --mqtthost=192.168.1.22 --mqttport=1883 --mqtttopic=ebusd --mqttjson --mqttint=/config/mqtt-hassio.cfg --mqttuser=championc --mqttpass=Sh4nn0nn1234 --device=ens:192.168.1.25:9999 --scanconfig --configpath=/config/ebusd-2.1.x/en/ --pollinterval=1 --accesslevel=*
labels:
- "com.centurylinklabs.watchtower.enable=true"
My configuration.yaml code in HA
emoncms_history:
api_key: c183******************************************
url: https://emoncms.org
inputnode: 1
whitelist:
- sensor.ebusd_hmu_state01_temp1
- sensor.ebusd_hmu_state01_temp1_2
- sensor.ebusd_basv_z1roomtemp_tempv
- sensor.ebusd_basv_displayedoutsidetemp_tempv
- sensor.ebusd_hmu_rundatacurrentconsumedpower_powerv
- sensor.heat_power
Looks ok to me. I just noticed your power plot is quite short, just a couple of minutes long, so the 30s resolution looks quite rough. You could go to 10s for flow & return temp and flow rate for a smoother look.
I’ve just set the “–pollinterval” in my docker-compose.yaml file to “–pollinterval=10” and I’ve changed the Node-Red interval to 10s too. Should I be re-setting the Emoncms feeds to 10s too ?
I don’t think you can change the interval in emoncms, you can only create new feeds with a different rate. I have my feeds at 10s - disk space is really no issue anymore
That is correct.
I deleted and recreated all the 30s feeds, and deleted all previous data too.
I also noticed this morning that during the beginning of a cycle, while the Yield was reported as being 3.4kW, the calculated heat output (using the HA Template) was saying 4.1kW, which is a far greater variation than I would have expected.