I am looking for some help to figure out why my smart plug isn’t properly showing up in Home Assistant.
I have Hass running under docker, and the ESPHome dashboard running as a separate container. I have successfully added other ESPHome devices in the past. I just flashed a ‘Neo’ brand smart plug using Tuya-Cloudcutter. Everything seemed to work fine, it installed the ESPHome-Kickstart firmware.
I then used the UPK2ESPHome website at https://upk.libretiny.eu to generate the yaml for the full ESPHome install. I selected a pre-defined profile based on the model of the plug, the same one I used for the initial cloudcutter flashing: tuya-generic-nas-wr01w-smart-plug. I added the yaml output as a new, “Empty configuration” in ESPHome dashboard and selected “Manual firmware download”. Then on the device’s web server (via the IP address of the smart plug shown by my wifi router) I selected the OTA Update option and gave it the new firmware file. Everything seemed to work correctly. Flashing completed, the device restarted, and if I navigate back to the device IP address in my browser it shows me its status, and I can control the relay of the plug using its own web interface.
However, when I came to add this to HASS, I went to the ESPHome addon, clicked “Add device”, entered the IP address and it says successfully added, but while it does shows up in the HASS ESPHome addon under “Devices” as “upk2esphome-bk7231t”, within the device card itself it says “No devices or Entities”
ESPHome dashboard shows it as “Online” and if you select “Logs” it successfully connects to the plug and reads information, but I have no buttons, uptime report or anything else in HASS.
Here is the YAML file from ESPHome dashboard:
esphome:
name: upk2esphome-bk7231t
bk72xx:
board: generic-bk7231t-qfn32-tuya
logger:
web_server:
captive_portal:
mdns:
api:
password: ""
ota:
platform: esphome
password: ""
wifi:
ssid: [redacted]
password: [redacted]
ap:
sensor:
- platform: uptime
name: Uptime
- platform: hlw8012
model: BL0937
cf_pin:
number: P9
inverted: true
cf1_pin:
number: P8
inverted: true
sel_pin:
number: P24
inverted: true
current:
name: BL0937 Current
voltage:
name: BL0937 Voltage
power:
name: BL0937 Power
energy:
name: BL0937 Energy
voltage_divider: 1600
current_resistor: 0.001 ohm
text_sensor:
- platform: libretiny
version:
name: LibreTiny Version
binary_sensor:
- platform: gpio
id: binary_switch_1
pin:
number: P1
inverted: true
mode: INPUT_PULLUP
on_press:
then:
- switch.toggle: switch_1
switch:
- platform: gpio
id: switch_1
name: Relay 1
pin: P26
status_led:
pin:
number: P6
inverted: true
I tried regenerating the yaml file from UPK2ESPHome, editing the devices config in ESPHome dashboad, pasting the newly generated yaml and installing firmware again, this time selecting the “Wirelessly” option. Here is the log output from that second flashing run:
INFO ESPHome 2025.12.0
INFO Reading configuration /config/neo-smart-bk7231t.yaml...
INFO Generating C++ source...
INFO Compiling app... Build path: /config/.esphome/build/upk2esphome-bk7231t
Processing upk2esphome-bk7231t (board: generic-bk7231t-qfn32-tuya; framework: arduino; platform: libretiny @ 1.9.1)
--------------------------------------------------------------------------------
Warning! Non-Git installations are NOT SUPPORTED.
HARDWARE: BK7231T 120MHz, 256KB RAM, 1.03MB Flash
- framework-arduino-api @ 2022.8.24+sha.237b10a
- framework-beken-bdk @ 0.0.0+v2021.06.07.sha.6491b8c
- library-flashdb @ 1.2.0+sha.d5c892f
- library-freertos @ 9.0.0+sha.ff31b7d
- library-freertos-port @ 2025.1.18+sha.dbfc408
- library-lwip @ 2.2.0-bdk+sha.48da4a2
- library-printf @ 6.1.0+sha.28a79bd
- library-uf2ota @ 5.0.0+sha.f955412
PLATFORM VERSIONS:
- libretiny @ 1.9.1
- ltchiptool @ 4.12.2
CUSTOM OPTIONS:
- fw_name = esphome
- fw_version = 2025.12.0
Dependency Graph
|-- AsyncTCP @ 3.4.5
|-- ESPAsyncWebServer @ 3.7.10
|-- DNSServer @ 1.1.0
|-- ArduinoJson @ 7.4.2
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/api/api_connection.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/api/api_frame_helper.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/api/api_frame_helper_plaintext.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/api/api_pb2.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/api/api_pb2_service.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/api/api_server.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/api/list_entities.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/api/proto.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/api/subscribe_state.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/binary_sensor/automation.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/binary_sensor/binary_sensor.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/binary_sensor/filter.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/captive_portal/captive_portal.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/esphome/ota/ota_esphome.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/gpio/binary_sensor/gpio_binary_sensor.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/gpio/switch/gpio_switch.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/hlw8012/hlw8012.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/json/json_util.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/libretiny/core.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/libretiny/gpio_arduino.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/libretiny/lt_component.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/libretiny/preferences.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/logger/logger.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/logger/logger_libretiny.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/md5/md5.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/mdns/mdns_component.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/mdns/mdns_libretiny.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/network/util.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/ota/ota_backend.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/ota/ota_backend_arduino_libretiny.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/pulse_counter/pulse_counter_sensor.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/safe_mode/safe_mode.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/sensor/automation.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/sensor/filter.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/sensor/sensor.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/sha256/sha256.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/socket/lwip_sockets_impl.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/socket/socket.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/status_led/status_led.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/switch/automation.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/switch/switch.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/text_sensor/filter.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/text_sensor/text_sensor.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/uptime/sensor/uptime_seconds_sensor.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/uptime/sensor/uptime_timestamp_sensor.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/web_server/list_entities.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/web_server/ota/ota_web_server.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/web_server/web_server.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/web_server_base/web_server_base.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/wifi/wifi_component.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/components/wifi/wifi_component_libretiny.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/core/application.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/core/color.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/core/component.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/core/component_iterator.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/core/controller_registry.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/core/entity_base.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/core/helpers.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/core/log.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/core/scheduler.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/esphome/core/util.cpp.o
Compiling .pioenvs/upk2esphome-bk7231t/src/main.cpp.o
In file included from /config/.esphome/platformio/packages/framework-beken-bdk/beken378/common/include.h:6,
from /config/.esphome/platformio/platforms/libretiny/cores/beken-72xx/base/fixups/include.h:3,
from /config/.esphome/platformio/packages/framework-beken-bdk/beken378/os/include/rtos_pub.h:4,
from /config/.esphome/platformio/packages/framework-beken-bdk/beken378/func/mbedtls/mbedtls-port/inc/tls_rtos.h:6,
from /config/.esphome/platformio/packages/framework-beken-bdk/beken378/func/mbedtls/mbedtls-port/inc/tls_config.h:32,
from /config/.esphome/platformio/platforms/libretiny/cores/beken-72xx/base/config/tls_config.h:5,
from /config/.esphome/platformio/packages/framework-beken-bdk/beken378/func/mbedtls/mbedtls/include/mbedtls/sha256.h:29,
from src/esphome/components/sha256/sha256.h:14,
from src/esphome.h:53,
from src/main.cpp:3:
/config/.esphome/platformio/packages/framework-beken-bdk/beken378/common/generic.h:154: warning: "htons" redefined
154 | #define htons(x) __htons(x)
|
In file included from /config/.esphome/platformio/packages/library-lwip/src/include/lwip/ip_addr.h:41,
from /config/.esphome/platformio/packages/library-lwip/src/include/lwip/sockets.h:50,
from src/esphome/components/socket/headers.h:131,
from src/esphome/components/socket/socket.h:6,
from src/esphome/components/api/api_frame_helper.h:12,
from src/esphome/components/api/api_connection.h:5,
from src/esphome.h:3,
from src/main.cpp:3:
/config/.esphome/platformio/packages/library-lwip/src/include/lwip/def.h:119: note: this is the location of the previous definition
119 | #define htons(x) lwip_htons(x)
|
In file included from /config/.esphome/platformio/packages/framework-beken-bdk/beken378/common/include.h:6,
from /config/.esphome/platformio/platforms/libretiny/cores/beken-72xx/base/fixups/include.h:3,
from /config/.esphome/platformio/packages/framework-beken-bdk/beken378/os/include/rtos_pub.h:4,
from /config/.esphome/platformio/packages/framework-beken-bdk/beken378/func/mbedtls/mbedtls-port/inc/tls_rtos.h:6,
from /config/.esphome/platformio/packages/framework-beken-bdk/beken378/func/mbedtls/mbedtls-port/inc/tls_config.h:32,
from /config/.esphome/platformio/platforms/libretiny/cores/beken-72xx/base/config/tls_config.h:5,
from /config/.esphome/platformio/packages/framework-beken-bdk/beken378/func/mbedtls/mbedtls/include/mbedtls/sha256.h:29,
from src/esphome/components/sha256/sha256.h:14,
from src/esphome.h:53,
from src/main.cpp:3:
/config/.esphome/platformio/packages/framework-beken-bdk/beken378/common/generic.h:155: warning: "ntohs" redefined
155 | #define ntohs(x) __ntohs(x)
|
In file included from /config/.esphome/platformio/packages/library-lwip/src/include/lwip/ip_addr.h:41,
from /config/.esphome/platformio/packages/library-lwip/src/include/lwip/sockets.h:50,
from src/esphome/components/socket/headers.h:131,
from src/esphome/components/socket/socket.h:6,
from src/esphome/components/api/api_frame_helper.h:12,
from src/esphome/components/api/api_connection.h:5,
from src/esphome.h:3,
from src/main.cpp:3:
/config/.esphome/platformio/packages/library-lwip/src/include/lwip/def.h:120: note: this is the location of the previous definition
120 | #define ntohs(x) lwip_ntohs(x)
|
In file included from /config/.esphome/platformio/packages/framework-beken-bdk/beken378/common/include.h:6,
from /config/.esphome/platformio/platforms/libretiny/cores/beken-72xx/base/fixups/include.h:3,
from /config/.esphome/platformio/packages/framework-beken-bdk/beken378/os/include/rtos_pub.h:4,
from /config/.esphome/platformio/packages/framework-beken-bdk/beken378/func/mbedtls/mbedtls-port/inc/tls_rtos.h:6,
from /config/.esphome/platformio/packages/framework-beken-bdk/beken378/func/mbedtls/mbedtls-port/inc/tls_config.h:32,
from /config/.esphome/platformio/platforms/libretiny/cores/beken-72xx/base/config/tls_config.h:5,
from /config/.esphome/platformio/packages/framework-beken-bdk/beken378/func/mbedtls/mbedtls/include/mbedtls/sha256.h:29,
from src/esphome/components/sha256/sha256.h:14,
from src/esphome.h:53,
from src/main.cpp:3:
/config/.esphome/platformio/packages/framework-beken-bdk/beken378/common/generic.h:156: warning: "htonl" redefined
156 | #define htonl(x) __htonl(x)
|
In file included from /config/.esphome/platformio/packages/library-lwip/src/include/lwip/ip_addr.h:41,
from /config/.esphome/platformio/packages/library-lwip/src/include/lwip/sockets.h:50,
from src/esphome/components/socket/headers.h:131,
from src/esphome/components/socket/socket.h:6,
from src/esphome/components/api/api_frame_helper.h:12,
from src/esphome/components/api/api_connection.h:5,
from src/esphome.h:3,
from src/main.cpp:3:
/config/.esphome/platformio/packages/library-lwip/src/include/lwip/def.h:121: note: this is the location of the previous definition
121 | #define htonl(x) lwip_htonl(x)
|
In file included from /config/.esphome/platformio/packages/framework-beken-bdk/beken378/common/include.h:6,
from /config/.esphome/platformio/platforms/libretiny/cores/beken-72xx/base/fixups/include.h:3,
from /config/.esphome/platformio/packages/framework-beken-bdk/beken378/os/include/rtos_pub.h:4,
from /config/.esphome/platformio/packages/framework-beken-bdk/beken378/func/mbedtls/mbedtls-port/inc/tls_rtos.h:6,
from /config/.esphome/platformio/packages/framework-beken-bdk/beken378/func/mbedtls/mbedtls-port/inc/tls_config.h:32,
from /config/.esphome/platformio/platforms/libretiny/cores/beken-72xx/base/config/tls_config.h:5,
from /config/.esphome/platformio/packages/framework-beken-bdk/beken378/func/mbedtls/mbedtls/include/mbedtls/sha256.h:29,
from src/esphome/components/sha256/sha256.h:14,
from src/esphome.h:53,
from src/main.cpp:3:
/config/.esphome/platformio/packages/framework-beken-bdk/beken378/common/generic.h:157: warning: "ntohl" redefined
157 | #define ntohl(x) __ntohl(x)
|
In file included from /config/.esphome/platformio/packages/library-lwip/src/include/lwip/ip_addr.h:41,
from /config/.esphome/platformio/packages/library-lwip/src/include/lwip/sockets.h:50,
from src/esphome/components/socket/headers.h:131,
from src/esphome/components/socket/socket.h:6,
from src/esphome/components/api/api_frame_helper.h:12,
from src/esphome/components/api/api_connection.h:5,
from src/esphome.h:3,
from src/main.cpp:3:
/config/.esphome/platformio/packages/library-lwip/src/include/lwip/def.h:122: note: this is the location of the previous definition
122 | #define ntohl(x) lwip_ntohl(x)
|
Linking .pioenvs/upk2esphome-bk7231t/raw_firmware.elf
|-- Image 1: raw_firmware.elf
| |-- image_bk7231t_app.0x011000.rbl
| | |-- raw_firmware.bin
| |-- image_bk7231t_app.0x011000.crc
| |-- image_bk7231t_app.0x129F0A.rblh
| |-- image_bk7231t_app.ota.rbl
| |-- image_bk7231t_app.ota.ug.bin
RAM: [==== ] 44.5% (used 116728 bytes from 262144 bytes)
Flash: [====== ] 58.4% (used 632232 bytes from 1083136 bytes)
Building UF2 OTA image
|-- esphome_2025.12.0_generic-bk7231t-qfn32-tuya_bk7231t_lt1.9.1.uf2
|-- firmware.uf2
|-- firmware.bin
========================= [SUCCESS] Took 35.71 seconds =========================
INFO Successfully compiled program.
INFO Connecting to 10.20.30.189 port 8892...
INFO Connected to 10.20.30.189
INFO Uploading /config/.esphome/build/upk2esphome-bk7231t/.pioenvs/upk2esphome-bk7231t/firmware.uf2 (2169344 bytes)
Uploading: [============================================================] 100% Done...
INFO Upload took 7.78 seconds, waiting for result...
INFO OTA successful
INFO Successfully uploaded program.
INFO Starting log output from 10.20.30.189 using esphome API
INFO Successfully resolved upk2esphome-bk7231t @ 10.20.30.189 in 0.000s
INFO Trying to connect to upk2esphome-bk7231t @ 10.20.30.189 in the background
INFO Successfully connected to upk2esphome-bk7231t @ 10.20.30.189 in 0.321s
INFO Successful handshake with upk2esphome-bk7231t @ 10.20.30.189 in 0.016s
[09:11:13.802][I][app:194]: ESPHome version 2025.12.0 compiled on Dec 18 2025, 09:10:26
[09:11:13.802][C][logger:261]: Logger:
[09:11:13.802][C][logger:261]: Max Level: DEBUG
[09:11:13.802][C][logger:261]: Initial Level: DEBUG
[09:11:13.806][C][logger:267]: Log Baud Rate: 115200
[09:11:13.806][C][logger:267]: Hardware UART: UART2
[09:11:13.834][C][status_led:018]: Status LED:
[09:11:13.834][C][status_led:019]: Pin: 6
[09:11:13.834][C][uptime.sensor:017]: Uptime Sensor 'Uptime'
[09:11:13.834][C][uptime.sensor:017]: State Class: 'total_increasing'
[09:11:13.834][C][uptime.sensor:017]: Unit of Measurement: 's'
[09:11:13.834][C][uptime.sensor:017]: Accuracy Decimals: 0
[09:11:13.845][C][uptime.sensor:027]: Device Class: 'duration'
[09:11:13.853][C][uptime.sensor:031]: Icon: 'mdi:timer-outline'
[09:11:13.853][C][uptime.sensor:033]: Type: Seconds
[09:11:13.858][C][switch.gpio:092]: GPIO Switch 'Relay 1'
[09:11:13.858][C][switch.gpio:092]: Restore Mode: always OFF
[09:11:13.861][C][switch.gpio:029]: Pin: 26
[09:11:13.872][C][gpio.binary_sensor:016]: GPIO Binary Sensor 'binary_switch_1'
[09:11:13.873][C][gpio.binary_sensor:072]: Pin: 1
[09:11:13.876][C][gpio.binary_sensor:073]: Mode: polling
[09:11:13.884][C][hlw8012:036]: HLW8012:
[09:11:13.885][C][hlw8012:037]: SEL Pin: 24
[09:11:13.889][C][hlw8012:038]: CF Pin: 9
[09:11:13.891][C][hlw8012:039]: CF1 Pin: 8
[09:11:13.898][C][hlw8012:040]: Change measurement mode every 8
[09:11:13.898][C][hlw8012:040]: Current resistor: 1.0 mΩ
[09:11:13.898][C][hlw8012:040]: Voltage Divider: 1600.0
[09:11:13.905][C][hlw8012:399]: Update Interval: 60.0s
[09:11:13.909][C][hlw8012:017]: Voltage 'BL0937 Voltage'
[09:11:13.909][C][hlw8012:017]: State Class: 'measurement'
[09:11:13.909][C][hlw8012:017]: Unit of Measurement: 'V'
[09:11:13.909][C][hlw8012:017]: Accuracy Decimals: 1
[09:11:13.921][C][hlw8012:027]: Device Class: 'voltage'
[09:11:13.936][C][hlw8012:017]: Current 'BL0937 Current'
[09:11:13.936][C][hlw8012:017]: State Class: 'measurement'
[09:11:13.936][C][hlw8012:017]: Unit of Measurement: 'A'
[09:11:13.936][C][hlw8012:017]: Accuracy Decimals: 2
[09:11:13.955][C][hlw8012:027]: Device Class: 'current'
[09:11:13.955][C][hlw8012:017]: Power 'BL0937 Power'
[09:11:13.955][C][hlw8012:017]: State Class: 'measurement'
[09:11:13.955][C][hlw8012:017]: Unit of Measurement: 'W'
[09:11:13.955][C][hlw8012:017]: Accuracy Decimals: 1
[09:11:13.955][C][hlw8012:027]: Device Class: 'power'
[09:11:13.962][C][hlw8012:017]: Energy 'BL0937 Energy'
[09:11:13.962][C][hlw8012:017]: State Class: 'total_increasing'
[09:11:13.962][C][hlw8012:017]: Unit of Measurement: 'Wh'
[09:11:13.962][C][hlw8012:017]: Accuracy Decimals: 1
[09:11:13.973][C][hlw8012:027]: Device Class: 'energy'
[09:11:13.996][C][captive_portal:118]: Captive Portal:
[09:11:14.000][C][wifi:1132]: WiFi:
[09:11:14.000][C][wifi:1132]: Connected: YES
[09:11:14.001][C][wifi:897]: Local MAC: 50:8A:06:32:A3:DC
[09:11:14.002][C][wifi:904]: IP Address: 10.20.30.189
[09:11:14.007][C][wifi:908]: SSID: [redacted][redacted]
[09:11:14.007][C][wifi:908]: BSSID: 9C:05:D6:32:FB:8A[redacted]
[09:11:14.007][C][wifi:908]: Hostname: 'upk2esphome-bk7231t'
[09:11:14.007][C][wifi:908]: Signal strength: -65 dB ▂▄▆█
[09:11:14.007][C][wifi:908]: Channel: 11
[09:11:14.007][C][wifi:908]: Subnet: 255.255.255.0
[09:11:14.007][C][wifi:908]: Gateway: 10.20.30.1
[09:11:14.007][C][wifi:908]: DNS1: 1.1.1.1
[09:11:14.007][C][wifi:908]: DNS2: 1.1.1.1
[09:11:14.043][C][web_server:335]: Web Server:
[09:11:14.043][C][web_server:335]: Address: upk2esphome-bk7231t.local:80
[09:11:14.057][C][esphome.ota:092]: Over-The-Air updates:
[09:11:14.057][C][esphome.ota:092]: Address: upk2esphome-bk7231t.local:8892
[09:11:14.057][C][esphome.ota:092]: Version: 2
[09:11:14.058][C][safe_mode:018]: Safe Mode:
[09:11:14.058][C][safe_mode:018]: Successful after: 60s
[09:11:14.058][C][safe_mode:018]: Invoke after: 10 attempts
[09:11:14.058][C][safe_mode:018]: Duration: 300s
[09:11:14.063][C][web_server.ota:241]: Web Server OTA
[09:11:14.070][C][api:211]: Server:
[09:11:14.070][C][api:211]: Address: upk2esphome-bk7231t.local:6053
[09:11:14.070][C][api:211]: Listen backlog: 4
[09:11:14.070][C][api:211]: Max connections: 8
[09:11:14.070][C][api:223]: Noise encryption: NO
[09:11:14.080][C][mdns:177]: mDNS:
[09:11:14.080][C][mdns:177]: Hostname: upk2esphome-bk7231t
[09:11:14.090][C][lt.component:013]: LibreTiny:
[09:11:14.090][C][lt.component:013]: Version: v1.9.1 on generic-bk7231t-qfn32-tuya, compiled at Dec 18 2025 09:10:08, GCC 10.3.1 (-O1)
[09:11:14.090][C][lt.component:013]: Loglevel: 3
[09:11:14.094][D][text_sensor:097]: 'LibreTiny Version': Sending state 'v1.9.1 on generic-bk7231t-qfn32-tuya, compiled at Dec 18 2025 09:10:08, GCC 10.3.1 (-O1)'
[09:11:58.645][I][safe_mode:042]: Boot seems successful; resetting boot loop counter
[09:11:58.649][D][lt.preferences:139]: Writing 1 items: 0 cached, 1 written, 0 failed
[09:11:59.933][D][sensor:135]: 'Uptime': Sending state 61.29400 s with 0 decimals of accuracy
[09:12:59.940][D][sensor:135]: 'Uptime': Sending state 121.29600 s with 0 decimals of accuracy
[09:13:00.178][D][sensor:135]: 'BL0937 Power': Sending state 0.00000 W with 1 decimals of accuracy
[09:13:00.180][D][sensor:135]: 'BL0937 Energy': Sending state 0.00000 Wh with 1 decimals of accuracy
[09:13:59.939][D][sensor:135]: 'Uptime': Sending state 181.29800 s with 0 decimals of accuracy
[09:14:00.182][D][hlw8012:083]: Got power=0.0W, voltage=0.0V
[09:14:00.183][D][sensor:135]: 'BL0937 Voltage': Sending state 0.00000 V with 1 decimals of accuracy
[09:14:00.184][D][sensor:135]: 'BL0937 Power': Sending state 0.00000 W with 1 decimals of accuracy
[09:14:00.192][D][sensor:135]: 'BL0937 Energy': Sending state 0.00000 Wh with 1 decimals of accuracy
Other than a few compiler warnings, it all appears to have updated succesfully.
But then after the device reboots, the logs from the plug itself (on its basic web interface) show Home assistant connection error:
[10:06:45.598][D][api:136]: Accept 10.20.30.254
[10:06:45.599][D][api.connection:1398]: Home Assistant 2024.10.4 (10.20.30.254) connected
[10:07:00.069][D][sensor:135]: 'Uptime': Sending state 3361.38208 s with 0 decimals of accuracy
[10:07:00.324][D][sensor:135]: 'BL0937 Power': Sending state 0.00000 W with 1 decimals of accuracy
[10:07:00.327][D][sensor:135]: 'BL0937 Energy': Sending state 0.00000 Wh with 1 decimals of accuracy
[10:07:15.600][W][api.connection:1978]: Home Assistant 2024.10.4 (10.20.30.254): Reading failed CONNECTION_CLOSED errno=9
Also the power and energy readings are wrong, as I know the plug is on and delivering aroung 1kW power to a connected heater, but that could be the manufacturer not bothering to add a current shunt and other components needed for the energy measurement, so I am not too bothered about that.
Any guidance you can give me on what to try next is much appreciated.