No, the buttons and everything all still work after you flash a new firmware. In fact the ESP module doesn’t drive the kettle direct: there is a separate MCU, which does all the internal logic, and controls the relay, light, temperature display, etc. This MCU then just talks to the ESP over the UART bus (a text-based serial link).
Success! I was able to desolder the 4 pins to separate the MCU chip, and then soldered some leads to flash the TYWE3S chip over serial (just using Raspberry Pi GPIO.)
I also thought it would be fun to fork Tasmota and add a little /bc API endpoint (short for “brew coffee”). This responds with “418 I’m a teapot”. From 418 I'm a teapot - HTTP | MDN
The HTTP 418 I'm a teapot client error response code indicates that the server refuses to brew coffee because it is, permanently, a teapot.
I’ve been doing some debugging with the kettle buttons / display and the MQTT messages, and I can see that “00” actually corresponds with 40 degrees, and “05” means that Keep Warm is off. So here are the updated TuyaSend4 commands for my kettle (shifted up one, with “off” at the top now):
The issue is with the “Kettle turns off” event. This goes to the “Off” node, which sets the kettle mode input select to “Off”. This then triggers the action above (“Kettle mode input_select”), and this then sends the “off” command to MQTT and also turns off the keep warm function. So every time the kettle stops boiling, the keep warm function is turned off (because of the way the input_select is also being updated and triggering further events.)
I’m not too sure how to fix that. I think I could add a new sensor or variable to keep track of the “KeepWarm” state separately, and then add some extra logic after the “Kettle turns off” event so it reverts back to the correct option (instead of just Off)
Interesting. Perhaps they’ve changed the config for the firmware on the MCU since last year.
Yes, sorry! We don’t really use the keep-warm function, so it was an acceptable compromise for me. Good luck coming up with a solution. I have an idea to produce an ESPHome config for this device based on the one which @simondotau produced for the Anko kettle, but I’ll need to time that carefully as the Kogan model is our main kettle, and significant downtime would be catastrophic in this house!
Would you mind showing the full code for this? I’m just trying to setup my kettle (the stainless steel version, not the glass one) putting together bits from this thread. (I have successfully chip-swapped the kettle with an ESP12F)
I’ve already completed the chip swap. I pulled the WR1 out and put an ESP12F in there, flashed with Tasmota. The pin out wasn’t the same so I just used some short wires.
I just need to get teh temp setting options and the temp sensor working as the code posted above and on the Blackadder page don’t work with this model kettle (the stainless steel one rather than glass). Any tips on trying to find the correct settings would be great.
Thanks for linking to that helper. That sorted out which dpid I needed for the temperature sensor, however the sensor entity in HA is still showing ‘unknown’ so I don’t know what the issue is there.
Using the helper and turning on the kettle I was able to what the value for DpId 2 go up from room temp to 100 as the water boiled.
I’ve also figured out that DpId 8 corresponds to the temperature setting that can be selected (70, 80, 90 or 100C) but not sure how to sort that out with the input_select and automation to send that temp setting request to the kettle (again, the settings for the glass kettle don’t work for this stainless one).
- id: '4444'
alias: Kettle - Set Temp
description: ''
trigger:
- entity_id: input_select.set_kettle
platform: state
condition: []
action:
- service: mqtt.publish
data_template:
topic: cmnd/Kettle/TuyaSend4
payload: '{% set dta = trigger.to_state.state %} {{dta.split('':'')[1]}}
'
mode: single
If you cannot tell maybe play around with 102 (try 12 or 15) and TuyaSend4 to see if you can work out which one works.
Good luck.
BTW - I have these set up for over a year and so cannot credit the original poster, or remember what I did to configure them to my own settings. Sorry for not crediting someone if I should be.
If I set the temp to keep warm on the kettle there is a corresponding RESULT in the console.
On the attached image you can see the RESULT when I set the kettle to Keep warm 60 (setting 3) and then 80 (setting 4).
You can also see that this is results in the sequence DpType4Id102":3,"102"
Which I think corresponds to the variables:
DpType4 = TuyaSend4
Id102":3 = 102,3
(and then also Id102":4 for 80c)
If you set the keep warm temp on your kettle, and then look in the Tasmota console this should give the commands you need.
I didn’t have much luck trying to capture the console messages for each button. I’m not really worried about it to be honest but I will probably try to figure it out at some point just so the config is complete.
I just opened mine up last night - found the WR1 chip - and then found this post.
I had some luck controlling the kettle via LocalTuya, and this is what i was able to determine in terms of DP mappings:
1 - Power [true/false]
2 - Temperature Sensor [0 to 100]
8 - Target Temperature [0 to 100]
13 - Keep Warm function [true/false]
14 - Keep Warm Time (Mins) - [0-360]
15 - Status
16 - Boil mode [temp_setting/boiling_quick] (i.e. temp_setting = normal mode, boiling_quick = boil, then cool to target temperature)
I’m sure i had some more detail on the other DPs… but for the life of me I can’t find my notes.
Do you have any details about how you approached the WR1 → ESP chip replacement (I.e. what wires had to be shorted)?
Thanks for the DP mappings. Any idea what payloads need to be sent for the function controls?
For the chip swap I simply wired the ESP12F to my USB-UART:
RX-TX
TX-RX
Vcc-3.3V
GND-GND
then on the chip:
GPIO15-GND
GPIO0-GND
EN-Vcc
Once I loaded Tasmota onto the ESP I removed the GPIO-GND connection and left the EN and GPIO15 connections. I wired the TX and RX of the ESP to the same points that the WR1 had it’s TX and RX on the PCB. Since the pinout is not the same (nor the same size chip) as the WR1 I simply used short wires between the chip and PCB. It wasn’t pretty so I dind’t take any photos. I wrapped a bit of plastic around the ESP so it couldn’t short out on anything as the whole thing was reassembled.
Not 100% sure on the DP16 modes - On the original tuya chip, you sent a strin, but i’m guessing it got mapped to an enumeration. Still trying to reverse engineer it. So far have temp control + keep warm. That boil mode is the last main part of the puzzle. Also trying to figure out what DP15 and the other ones mean.
Thanks for the tips re the wiring - i had mine all ready to go, but missed the EN-VCC and the GPIO15-GND connections. After i re-read your post and fixed it it all went smoothly.
Those WR1 addon boards are just VCC, GND, TX and RX connections to the main PCB.
You can easily replace them with a NodeMCU, Wemos D1 mini or ESP-15F board without any soldering. Perhaps just some wire cutting and twisting to attach dupont cables.