I always want to enjoy some coffee or tea while working on electronics and since I often work in the early morning, boiling some water is often the first thing I do in the morning.
This is not too much hustle, but I wanted to improve this process and I came up with a way to schedule my kettle to turn on automatically in the morning if it was set to do so. So, before going to bed, I can pour some water into the kettle and "arm" it so it turns on in the morning at a set time. By the time I get down to the kitchen, the water should be boiling and ready for me to start my day.
The kettle is controlled with a relay connected to a Wemos D1 Mini board that is running ESPHome. This is then controlled via Home Assistant where automation checks the state at a specific time and turns off the relay if it is on. I made it that way so the relay is off for most of the time during normal operation, and only turns on when armed, by using the normally closed contacts on it.
This video deals with mains voltage; if you are uncomfortable working with it, please do not attempt to replicate it. By replicating the project, you accept that you understand the risks involved and that you are the only one responsible for any consequences. The project is running on 240V and it is not suited to be done for 110V as the wires handling the load need to be substantially thicker. Additionally, my kettle is rated at 1800W and it is within specs on the relay. Any higher load than that needs to be handled by a better relay!
In the video below, you can see all of the details for the device as well as a full timelapse of me making it.
The code that defines the device in ESPHome is below where we have the relay definition and another push button to define the trigger for arming the device.
- platform: gpio
restore_mode : ALWAYS_OFF
- platform: gpio
name: "Arm Switch"
- delayed_on: 20ms
- delayed_off: 20ms
- switch.toggle: kettle_relay
Once armed, the trick is to have an automation setup in Home Assistant so it turns off the relay in the morning to return the kettle in normal operation.
alias: Turn on kettle if armed
- platform: time
- condition: device
- type: turn_off
Tools and materials used in the video
- Wemos D1 Mini - https://s.click.aliexpress.com/e/_m0rpDou
- 5V relay Module - https://s.click.aliexpress.com/e/_mKaAw3i
- HLK-PM01 Power Supply - https://s.click.aliexpress.com/e/_om6Dlh6
- Prototyping PCBs - https://www.pcbway.com/project/shareproject/Electrical_box_prototyping_PCB_d2046284.html
- Rework Station - https://s.click.aliexpress.com/e/_okaY5GY
- Helping Hand - https://s.click.aliexpress.com/e/_oDdrH52
- Electrical Box - https://s.click.aliexpress.com/e/_mNDAhfQ
- Push Button - https://s.click.aliexpress.com/e/_EQMAUN7
- Mini PC for Home Assistant - https://s.click.aliexpress.com/e/_okAe1so