As a coffee afficionado I of course own a water kettle that can hold temperatures. I had a really cheap one and it was decent, but I had wanted a Fellow Stagg EKG+[1] for years, however I never could really justify the cost of having such a fancy kettle. My friend was asked by his girlfriend to replace the black kettle with a pink one, so he gave me his old — but perfectly functioning — Stagg EKG+.
I've owned this kettle for years and have really enjoyed using it, and will continue loving it. The pretty black Fellow Stagg EKG+ Kettle on its base
Hidden Feature: Bluetooth
One of the neat little features that was barely advertised when this Kettle was releases is that it supports Bluetooth. It advertises itself over BLE, and then an application you can download for your mobile device you can control the kettle remotely. Set the temperature, turn it on/off, and watch the current temperature.
Using the application on my phone really isn't something that I have used, also its of course insecure in that anyone within Bluetooth range can see the BLE advertisement and then connect to the kettle, but we are going to ignore that, since it has enough built-in protections to stop it from burning my house down (at least, it seems like it does).
I have a large Home Assistant install, and was already running some ESPHome Bluetooth Proxies so the next thing to do was see if someone had already written a HACS plugin so that I could control the Kettle. After some searching I found the ha-stagg-ekg-plus repository made by samwiseg0, and loaded it into my Home Assistant setup. It found my Kettle and setup was dead simple. Now that I had the kettle in Home Assistant, the next thing to do is write some automations... because the real fun in home automation is doing things like flashing your lights when the temperature reaches its setpoint.
Boiling at Altitude
I live at ~1,770 meters (5800 ft[2]) which means that the boiling point of water is not actually 100C (212F), but far lower. Depending on the weather and thus pressure it is either 93C (199.4F) or 94C (201.2F).
If you set the kettle to 100C, it will continue to run forever and will never shut off and go into hold mode. It will also boil the water so hard that when the lid is on it will if you slightly overfill the kettle start overflowing out the pour spout.
So the next automation of course was to take the pressure from one of the many pressure sensors around my house and use that information to automatically set the kettle to either 93C or 94C, automaticall reacting to changes in the weather and updating the kettle before I even go to use it (Bluetooth commands are accepted and remembered even when the kettle is turned off)!
Antoine equation for water vapor at a certain pressure
Using the Antoine equation we can the write a formula that uses the pressure sensors to automatically set the boiling point.
The formula is presented here with p being the pressure in hPa which is then converted to mmHg.
(1730.63 / (8.07131 - log(p * 0.750062, 10)) - 233.426)The Antoine equation relates the vapour pressure of a liquid to its temperature
Here P is in mmHg and T is in °C. Water boils when its vapour pressure equals the air pressure around it. So if you put in the air pressure and solve for T, you get the boiling point:
The magic numbers
The Antoine equation is not a perfect fit and can not actually be used across the whole satured vapour pressure curve, so there are different constants that are used to plug into the equation to do a close curve fit, that is good enough for our use case since we will just floor() the number we get to the closest round number.
The numbers here are directly from the Wikipedia page, and thus the well known values:
| Number | What it is |
|---|---|
| 8.07131 | Antoine constant A for water |
| 1730.63 | Antoine constant B for water (in C) |
| 233.426 | Antoine constant C for water (in C) |
So solving for T = 94 gives a P of ~610.6 mmHg (~814.1 hPa), so below that pressure we can maximally heat to just 93C.
Home Assistant Automation (YAML)
id: kettle_boiling_point_limit
alias: "Kettle: Keep Target Below Boiling Point"
description: >-
The Stagg EKG+ resets to 100 °C after losing power, and at altitude it
never reaches that and boils forever. Lowers the target to the local
boiling point (from the median house pressure sensor) whenever it is
above it: 94 °C normally, 93 °C below about 814 hPa. Never raises a lower
target.
triggers:
- trigger: state
entity_id: sensor.kitchen_stagg_ekg_target_temperature
- trigger: state
entity_id: climate.kitchen_stagg_ekg
from:
- unavailable
- unknown
- trigger: state
entity_id: sensor.office_aranet4_pressure
- trigger: homeassistant
event: start
conditions:
- condition: template
value_template: >-
{{ target | is_number and target | float > max_target | int }}
- condition: template
value_template: >-
{{ states('climate.kitchen_stagg_ekg')
not in ['unavailable', 'unknown'] }}
actions:
- action: climate.set_temperature
target:
entity_id: climate.kitchen_stagg_ekg
data:
temperature: "{{ max_target | int }}"
- action: logbook.log
data:
name: Stagg EKG+
message: >-
target lowered from {{ target }} °C to the local boiling point,
{{ max_target }} °C
entity_id: climate.kitchen_stagg_ekg
mode: queued
max: 3
variables:
max_target: >-
{%- set ps = [
'sensor.office_aranet4_pressure',
'sensor.main_bedroom_aranet4_pressure',
'sensor.basement_atmospheric_pressure',
'sensor.purpleair_outside_pressure',
] | map('states') | select('is_number') | map('float')
| sort | list -%}
{%- if ps | count == 0 -%}
93
{%- else -%}
{%- set p = ps[(ps | count) // 2] -%}
{{ (1730.63 / (8.07131 - log(p * 0.750062, 10)) - 233.426)
| round(0, 'floor') | int }}
{%- endif -%}
target: "{{ states('sensor.kitchen_stagg_ekg_target_temperature') }}"This automation explicitly sets the temperature to 93C if no pressure sensors are available and thus it can't calculate anything so that it is set to at least the safe temperature. Setting the temperature above the allowed maximum forces the temperature to be clamped
Trying to set the temperature above the maximum setpoint will automatically clamp it, which means accidentally touching the dial when turning the kettle on or when going from a lower temperature (such as required for specialty teas) to max boiling will always leave it set to the safe boiling temperature. Kettle restarts also clamp the boiling point automatically
Lastly, when the kettle's power is cycled, it will set itself back at a 100C as the default setpoint. As soon as the kettle is connected to Home Assistant it will once again be clamped down to the maximum setpoint. This is a newer version than the one I have, I have the Stagg EKG+ which has been replaced since then with a new version that uses wifi, and there has been some work done to try and reverse engineer that protocol so that it too can be added to Home Assistant. ↩ Freedom Units ™ for the eagle loving Americans that visit my blog. ↩