Converting Smarter iKettle to ESPHome

I have a Smarter iKettle v3 and I really like the features and aesthetics, but since they stopped paying the bills Electric Imp has soft-bricked the kettles by blocking them from accessing their cloud infrastructure. Below is a description of how I replaced the Electric Imp controller with an ESP32 board. I wired everything by jamming the pins of jumper wires into the existing connectors, so it is completely non-destructive and reversible sans four small solder points.

Since I’m a new user, I’m not allowed to add more than two links and one image, so I put the whole thing on github with pictures.

Below are instructions missing pictures and links.

Disclaimer: This project involves mains electricity (120V/240V). Modifying heating appliances carries risks of fire or electrocution. This software includes safety watchdogs, but use this code and hardware modification entirely at your own risk.

Parts Used:

  • Adafruit ESP32-S2 Feather. You can use any ESP32 you like, but this one is high quality and fits neatly in the base.
  • Optional: Adafruit HX711 24-bit ADC if you want to try to get the strain gauge working for the water level (I’m still waiting for mine to arrive so I haven’t tested it yet)
  • 47 kOhm resistor
  • 10 kOhm resistor
  • 100 Ohm resistor
  • Jumper wires

iKettle Innards

  • Main board: this is the longer of the two PCBs. It houses the Electric Imp chip, strain sensor amplifier, WiFi, physical button and LEDs.

  • Daughter board: this is the smaller of the two PCBs. It houses the AC/DC transformer for 5V power and the relay to connect mains power to the kettle base. The two boards are connected by three white wires. The outer wires are 5V DC power and the Heater Relay, the middle is GND. If you unscrew the daughter board and flip it over you can see the three pins from the wires, which I’ve labeled in the picture below. Make sure you correctly map them to the connector pins on the top of the board.

  • Kettle base connector. This the piece of plastic in the middle with concentric rings and some thick wires coming out of it.

  • NTC thermsistor connector. The kettle houses a 50 kOhm thermsistor that makes contact in the second and third rings from the innermost ring. Look for a thin black and thin red wire that terminate at a connector on the main board.

  • Physical button. This is just a momentary switch soldered on to the main board. There are four posts. The pair closest to the front edge (nearest the button when assembled) closes when the button is depressed, this is where I soldered wires for the button switch.

  • LED ring: the LED ring light sits just above the button on two posts. If you look at the clear plastic part, you will see the post (smaller electrode) and anvil (larger). The post is the anode (+) and it needs a 100 Ohm resistor between it and the GPIO pin.

  • The strain gauge is attached to the rubber foot of the base. I de-soldered the three wires from the amplifier on the main board for future connection to an external amplifier, so you just see the empty pads on the main board. I hope to get that working once my HX711 arrives.

Connections

  • Disconnect the plug from the main board, leaving the other end plugged into the daughter. The free end of the connector has three female pins: insert a jumper wire into the center pin and connect it the common ground and the GND terminal on the Feather. I just soldered a bunch of pins together and tied all the ground wires together.
  • Figure out which pin is the Heater Relay and which is the 5V. It is super important not to mix them up because you can fry the Feather by putting 5V on the GPIO pin.
  • Connect the 5V pin to the USB pin on the Feather (this is called different things on different boards, but it is the input voltage that powers the whole board).
  • Connect the Heater Relay to GPIO12. Note: the relay Heater Relay pin takes 3.3V even though the relay is a 5V switch; the daughter board uses a MOSFET to pull the relay to 5V.
  • To be clear: the GND, 5V and GPIO12 pins terminate on the daughter board, via the white wire; we are effectively replacing the entire main board with the Feather.
  • Disconnect the NTC connector from the main board. (In the picture above, you see the male pins on the main board after the connector is removed.) The free end of the connector has two female pins: Connect the red wire to GPIO A5 and the black wire to GND. (It actually doesn’t matter which is which.) It is essential that you use a pin on ADC1 because ADC2 is used by WiFi.
  • Connect the other end of the 100 Ohm resistor from the LED anode to GPIO 10.
  • Connect the LED cathode (the one connected to the anvil, the larger electrode) to GND
  • Connect one of the physical button wires to GPIO5 (doesn’t matter which one) and the other to GND
  • On the back of the Feather, solder a 10 kOhm resistor from 3V → GPIO5
  • On the back of the Feather, solder a 47 kOhm resistor from 3V → GPIOA5

ESPHome Yaml

  • If you use an ESP32-S2 Feather wired the way I have it pictured, you only have to update the encryption key and wifi credentials
  • If you use a different board, you can define the pins in the “Configuration Variables” section
  • I ran out of room, so I have to link to the esphome yaml here (Don’t forget to grab the kettle_logic.h file too)

Example HA usage

  • I wrote this to support the things that I use, which is mainly heating to 85 °C or 100 °C depending on if I’m making tea or the kids are making ramen. You can use the exposed HA controls to script it however you like.
  • The button presses are captured as actions like:
alias: Kettle button
description: Handle physical button presses
triggers:
  - event_type: esphome.kettle_button_event
    id: single_press
    event_data:
      click_type: single
    trigger: event
  - event_type: esphome.kettle_button_event
    id: double_press
    event_data:
      click_type: double
    trigger: event
conditions:
  - condition: time
    after: "05:00:00"
    before: "20:00:00"
actions:
  - variables:
      target_setpoint: |
        {% if trigger.id == 'single_press' %}
          100
        {% else %}
          85
        {% endif %}
  - choose:
      - conditions:
          - condition: state
            entity_id: binary_sensor.eyekettle_boiling
            state:
              - "off"
        sequence:
          - action: number.set_value
            target:
              entity_id: number.target_temperature
            data:
              value: "{{ target_setpoint }}"
          - action: switch.turn_on
            target:
              entity_id:
                - switch.eyekettle_start_heating
            data: {}
          - action: tts.speak
            metadata: {}
            target:
              entity_id: tts.piper
            data:
              cache: true
              media_player_entity_id: media_player.dinguses
              message: Kettle heating to {{ target_setpoint }} degrees Celsius
    default:
      - action: switch.turn_off
        target:
          entity_id:
            - switch.eyekettle_start_heating
        data: {}
      - action: tts.speak
        metadata: {}
        target:
          entity_id: tts.piper
        data:
          cache: true
          media_player_entity_id: media_player.dinguses
          message: Turned off the kettle
mode: single

  • The rest of the switches and sensors are exposed in HA

Future

I just got this up and running today and wanted to share the baseline functional result. I have done minimal testing, especially of the safety features (like dry boil detection) so use at your own risk. If I manage to get the strain gauge working, I’ll update the config here.

2 Likes

Updated with strain gauge for water level

I updated the readme on the github repo with instructions for how to read the strain gauge for the water level. If you don’t want to use it, you can just comment it out of the YAML. Otherwise the HA integration will look like this:

The YAML exposes the following:

  • Controls:
    • switch for the heating element
    • keep warm timer (0 to disable)
    • target temperature
  • Sensors:
    • boiling, binary switch that is on when target temp is reached
    • keeping warm, binary switch that is on when keeping warm is active
    • kettle present, binary switch that is on when kettle is on the base
    • water level, percentage sensor of approximate water level (if using hx711)
    • water temperature, shows current water temperature if kettle is on base
    • kettle fault state, shows text string of whatever kettle_logic.h thinks is happening
  • Actions:
  • esphome.kettle_button_event is fired when the button is pressed
1 Like

Migrated repo to Codeberg