Skip to content

Hack a 14$ kettle in order to control it during your day. You can adjust target temperature and program it for tomorrow morning!

Notifications You must be signed in to change notification settings

OpHaCo/Kettle_wifi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

Description

Resurrect your old kettle! Add Wifi connectivity and control it from anyway!

Project has been done in Amiqual4Home Equipex Creativity Lab - https://amiqual4home.inria.fr/

Prerequisities

  • Photon with latest firmware updates :

    sudo particle flash --usb cc3000
    sudo particle flash --usb deep_update_2014_06
    
  • 1 Relay

  • 1 transformer 220V to 5V

  • 2 led and 1 buton

  • 1 thermistor

  • A electric kettle

Setup

hardware

  • For this model, there are a buttons for the overheat (ON and OFF) that we will keep as a security.

  • Adding a button for heating on the pins D2 and 2 LED , a yellow to display the detection of the kettle on its base and a red for the Heatin.

  • The relay is connected to the photons , as in the diagrams below. Connect the pins relay on the live wire (brown 220v) for close or open the current on the kettle, The relay is connected to the output photon in D4 and Vin(5v), GND.

  • The thermistor is placed in the handle of the kettle.

  • For connect the pins of the sensor to the kettle at the base, placing copper plate on the kettle and springs on the base, as below.

  • To detect that the kettle is on the base , use the old switches the kettle placed on the base.

  • for the sparkcore and the relay is supplied with 5V, install a portable charger transformer.

  • The Photon :

  • The Base :

Commands

Control commands - as string

  • CMD_NAME =
    • "POWERON"
    • "POWEROFF"

Fan control over particle API

curl https://api.spark.io/v1/devices/'PHOTON_ID'/kettleAPI -d access_token='YOUR_TOKEN' -d "params=CMD_NAME"

Kettle control over MQTT

  • a valid MQTT broker must be defined in Photon code mqttserver variable

topics

"kettle/kettleCmds" : kettle control commands

In this topic, payload containing command name must be sent,

e.g :

mosquitto_pub -h BROKER_IP -t kettle/kettleCmds -m CMD_NAME

"kettle/particleCloud" : kettle cloud connection

To enable cloud connection

mosquitto_pub -h BROKER_IP -t kettle/particleCloud -m ENABLE

To disable cloud connection

mosquitto_pub -h BROKER_IP -t kettle/particleCloud -m DISABLE

Input commands - as strings

Different variables can be read :

  • VARIABLE_NAME =
    • "error" : error value, possible values are :
      • 0 : No error
      • 1 : The kettle was badly put on its base
      • 2 : No water in the kettle
    • "isHeating" : is kettle heating?
      • 0 : The kettle does not heat
      • 1 : The kettle heats
    • "temp" : current kettle temperature in °C
    • "isdocked"
      • 0 : Kettle not docked to base, either kettle removed from base, kettle on base but sensor not connected
      • 1 : Kettle is docjed the base

Read variable over particle API

curl https://api.spark.io/v1/devices/'PHOTON_ID'/'VARIABLE'?access_token='YOUR_TOKEN'

Example :

curl https://api.spark.io/v1/devices/'PHOTON_ID'/temp?access_token='YOUR_TOKEN'

Subscribe variables over MQTT

  • a valid MQTT broker must be defined in Photon code mqttserver variable

Variables topics

  • "error" - 1 byte unsigned integer - "kettle/error" topic
  • "isHeating" - 1 byte unsigned integer - "kettle/heating" topic
  • "temp" - 8 bytes double , temp in °C - "kettle/temp" topic
  • "isdocked" - 1 byte unsigned integer - "kettle/docked" topic

e.g :

mosquitto_sub -h BROKER_IP -t kettle/temp

References

About

Hack a 14$ kettle in order to control it during your day. You can adjust target temperature and program it for tomorrow morning!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Other 100.0%