Joseph McCarey

IFTTT Connected Kettle

Connect a kettle to IFTTT to enable remote activation, notifications, and data tracking!

IntermediateFull instructions provided2 hours1,454
IFTTT Connected Kettle

Things used in this project

Hardware components

Relay (generic)
Jumper wires (generic)
Jumper wires (generic)
Solderless Breadboard Half Size
Solderless Breadboard Half Size
Particle Photon
Hamilton Beach Programmable 1.7 Liter Kettle 40996Z

Software apps and online services

Maker service
IFTTT Maker service

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)


Read more


Photon Firmware

The kettle has three power states: On, Off, and Keep Warm. The code tracks the difference between power states 1 and 2 via timing but assumes the kettle will be shut off before keep warm ends (simply because I do not use the function). Tracking between the keep warm and off power state could be added by another timer similar to the one included for tracking between on and keep warm. The pin mode is switched between OUTPUT and INPUT instead of changing output voltage because the relay is being run on 3v instead of 5v so even low voltage would enable it. The publish statement is only required for notifications or data tracking.
int power = 0;

int startTime = 0;
int powerState = 0;

1= boiling
2= keep warm

bool success = Particle.function("powerToggle", powerToggle);

void setup() {}

void loop() {
    if(powerState == 1 && >= startTime + 300){
        powerState = 2;
        Particle.publish("done_boiling", NULL, 60, PRIVATE);

int powerToggle(String req){
    pinMode(power, OUTPUT);
    if(powerState == 0){
        powerState = 1;
        startTime =;
        powerState = 0;
    pinMode(power, INPUT);
    return powerState;


Joseph McCarey

Joseph McCarey

1 project • 4 followers
High school Senior at Lane Technical - Student advisor at CS4ALL - Making for fun and for grades
Thanks to Waldemar Sakalus.