I successfully flashed a Knightsbridge CU9KW (the curved-front version) with an esphome binary, without tasmota (I’m not really familiar with tasmota and only use esphome with HA). The socket is installed in a BG Storm IP66 exterior socket enclosure (the new version/shape).
I first used esptool read_flash
to take a dump of the stock firmware.
Then I compiled my esphome YAML with docker run esphome/esphome
. The YAML is based on @maxwroc garden-sockets.yaml
github linked above, with my own minor/local mods.
I then used esptool write_flash
to write the compiled firmware binary (.bin
).
In terms of UART hardware, I used my trusty old Bus Pirate in UART pass-through mode (with USB-side and ESP-side baud rate set to 74880 (Bus Pirate BRG set to 52).
With a small 10W pond pump/fountain connected, I can control it OK, but somtimes when the pump is switched off, I notice that the ESP8266 in the CU9KW disconnects from HA (WiFi?) and then reconnects 10-15 seconds later. If I repeatedly switch on/off an unloaded socket (nothing plugged in), then I don’t see any HA disconnects.
I’m wondering if the ESP8266 WiFi in this thing is being upset by mains transients from the (inductive?) pond pump motor being switched off.
Once it’s been running for a few weeks, I’ll report back on any issues/learnings. Also, I’ll have a crack at calibrating the voltage/current/power measurements.
edit: When I tried using tuya-convert
(running on an RPi) to update the CU9KW it errored out with Timed out while waiting for the device to (re)connect...Attempting to diagnose the issue...Your device's firmware is too new. Tuya patched the PSK vulnerability that we use to establish a connection...
, and then printed a link to their github wiki Collaboration document for PSK Identity 02 . This is why I also went for the serial-flash method.
edit 2: I also forgot to mention that I pulled the eps8266 board from the mainboard for flashing. Once the flash had completed and device reset/power-cycled, I couldn’t see the device come up and attach to WiFi until it was reconnected to the mainboard.