logo elektroda
logo elektroda
X
logo elektroda

SMART06B firmware change - how to connect an electric kettle with Wi-Fi to Home Assistant?

p.kaczmarek2 567 1
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
📢 Listen (AI):
  • Svensson SMART06B kettle shows 51°C, next to a smartphone running TuyaTeapot app. .
    The Svensson SMART06B is a remote-controlled electric kettle compatible with the Tuya app. It offers control over temperature and heating time. Here I will show how its firmware can be changed to make it compatible with Home Assistant. This will also result in it being cut off from the cloud, i.e. we will gain privacy and security.

    In a previous topic I showed this kettle with the manufacturer's app. I invite you to take a look: Why Wi-Fi connectivity in an electric kettle? Svensson Tuya SMART06B test .

    The WBR3 Wi-Fi module is hidden in the handle:
    WBR3 Wi-Fi module inside the handle of the SMART06B electric kettle .
    It needs to be unsoldered from the base, as the programming pads are on its underside:
    Wi-Fi WBR3 module next to adapter board with labeled programming pins .
    Programming by topic: WBR2, WBR3, WBRU, W701-VA2-CG pinout, datasheet, flashing for Home Assistant .


    .
    Upload the OBK - even if there is a different Wi-Fi module inside, everything should already be supported: https://github.com/openshwprojects/OpenBK7231T_App
    Wi-Fi module WBR3 connected to USB programmer with wires on a wooden work surface .
    The whole thing of course needs to be properly powered - I use an external 3.3V LDO:
    CB3S module connected on breadboard with USB-TTL adapter and jumper wires .

    NOTE - for convenience the further part is realised on my board with CB3S, but programmatically it comes out the same - both modules are supported by OBK.

    Now you can get into the configuration. The device inside is based on an additional MCU, you should familiarise yourself with the subject:
    TuyaMCU protocol - communication between microcontroller and WiFi module .
    We now follow the TuyaMCU guide:
    TuyaMCU flashing, installation and configuration guide - configure dpID for Home Assistant .

    I personally took the method of "guessing" the dpID after flashing, so I'll describe it here. .
    I started by enabling the variable save flags and a simple autoexec.bat starting the driver:
    autoexec.bat script editor with TuyaMCU commands in a web interface Checked Flag 46 and 47 options for TuyaMCU data logging in a web interface .
    After the reboot, the packets have already started to appear in the log:
    Displayed TuyaMCU logs showing communication packets and state data .
    DP command correctly returned their values in JSON format:
    JSON data from TuyaMCU shown in a web browser on black background JSON data snippet with entry id: 2, indicating temperature value 35, circled in red .
    I managed to find the current temperature there (read-only) - this is the same value as on the screen.
    I therefore entered its mapping into the configuration:
    WemosD1CB3S interface showing current temperature and diagnostic data Screenshot of editor with autoexec.bat script configuring TuyaMCU .
    In a similar way I found the relay state - this also gives us control, it is not a read-only variable. The type of the variable is boolean - zero or one.
    WemosD1CB3S control panel showing temperature and Wi-Fi status Screenshot of editor showing autoexec.bat script for TuyaMCU configuration .
    I found the target temperature in the same way - for it I chose the form of the entry field.
    OBK interface showing current and target temperature with relay control button TuyaMCU logs showing DP data, with highlighted field indicating target temperature value .
    The whole thing appears to be working:


    .
    Final autoexec.bat:
    
    startDriver TuyaMCU
    
    tuyaMcu_defWiFiState 4
    
    setChannelType 1 Toggle
    
    linkTuyaMCUOutputToChannel 1 bool 1
    
    
    setChannelType 2 Temperature
    setChannelLabel 2 "Current Temperature"
    
    linkTuyaMCUOutputToChannel 2 val 2
    
    
    setChannelType 4 TextField
    setChannelLabel 4 "Target Temperature"
    
    linkTuyaMCUOutputToChannel 4 val 4
    
    
    
    
    .
    You can now pair with the Home Assistant:


    .
    HA panel:
    Home Assistant panel showing kettle with OpenBK7231N firmware integration .
    Relay control available:
    Device control panel in Home Assistant with power switch set to Off .
    We also have a temperature history (current and target):
    History of kettle target temperature changes in Home Assistant panel Kettle temperature graph showing rise to around 95°C, followed by a drop .
    Basically all the basic functions work - and now the more advanced ones can be realised on automations with Home Assistant.

    Summing up , it was a pairing of the electric kettle with Home Assistant. I was able to run all its basic functions here. The more advanced stuff sewn into the TuyaMCU dpID I didn't decode, because I think that, for example, such temperature maintenance in our absence can already be realised in the HA itself.
    The biggest difficulty was the WBR3 soldering - unfortunately this module has programming pads on the bottom, so hot air is needed. It would be better to get a version with CB3S or TYWE3S etc, then programming is easier.
    Do you see a use for this type of gadget, or was it just educational fun without being reflected in practice though? .
    Whatever the intended use, the devices now operate 100% locally, no cloud, no manufacturer servers.

    Cool? Ranking DIY
    Helpful post? Buy me a coffee.
    About Author
    p.kaczmarek2
    Moderator Smart Home
    Offline 
    p.kaczmarek2 wrote 13353 posts with rating 11179, helped 612 times. Been with us since 2014 year.
  • ADVERTISEMENT
  • #2 21739960
    cranky
    Level 29  
    But I am old. In my life I never thought someone would break into a kettle. ;)
    On the one hand, I support - if you have a smart device, it's already in a digestible version, compatible with one system and without the need for connectivity to China.
    On the other hand - what a time, I will buy a new kettle - hacking, TV - hacking, lavatory - hacking, tap - hacking. In the long run, that's not going to work.
📢 Listen (AI):
ADVERTISEMENT