Skip to content

CB3S Invalid Message Checksum, Initialization failed at init_state 1 #324

@haideralipunjabi

Description

@haideralipunjabi

Hi

I have a Fan Controller based on CB3S / bk7231n chip. On every cold boot, there's a chance (~70%) that it won't initialise properly, and I can't figure out a fix.

Here are the logs


00:36:43 | [W] | [tuya:119] | Tuya Received invalid message checksum 71!=6A
-- | -- | -- | --
00:36:43 | [V] | [tuya:438] | Sending Tuya: CMD=0x01 VERSION=0 DATA=[] INIT_STATE=1
00:36:43 | [D] | [api:103] | Accepted 192.168.1.201
00:36:44 | [V] | [api.connection:1427] | Hello from client: 'Home Assistant 2025.7.2' \| 192.168.1.201 \| API Version 1.10
00:36:44 | [W] | [component:170] | Component api cleared Warning flag
00:36:44 | [W] | [component:237] | Component api took a long time for an operation (214 ms).
00:36:44 | [W] | [component:238] | Components should block for at most 30 ms.
00:36:44 | [V] | [tuya:438] | Sending Tuya: CMD=0x01 VERSION=0 DATA=[] INIT_STATE=1
00:36:44 | [D] | [api.connection:1446] | Home Assistant 2025.7.2 (192.168.1.201): Connected successfully
00:36:44 | [W] | [tuya:119] | Tuya Received invalid message checksum 00!=FF
00:36:44 | [E] | [tuya:464] | Initialization failed at init_state 1

Here is my config

esphome:
  name: bedroom-fan
  friendly_name: Bedroom Fan

ota:
  - platform: esphome
    password: <redacted>

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  manual_ip:
    static_ip: 192.168.1.105
    gateway: 192.168.1.1
    subnet: 255.255.255.0

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Bedroom-Fan Fallback Hotspot"
    password: "aoQ75pvuSSH4"

bk72xx:
  board: cb3s

logger:
  level: VERY_VERBOSE
  baud_rate: 0

web_server:

captive_portal:

mdns:

api:
  encryption:
    key:  <redacted>

text_sensor:
  - platform: libretiny
    version:
      name: LibreTiny Version

uart:
  rx_pin: RX1
  tx_pin: TX1
  baud_rate: 9600

tuya:
  # DPIDs processed from schema model: 000004351e

switch:
  - platform: tuya
    switch_datapoint: 1
    name: Switch
  - platform: tuya
    switch_datapoint: 14
    name: Child Lock

number:
  - platform: tuya
    number_datapoint: 3
    name: Fan Speed
    min_value: 1
    max_value: 5
    step: 1

I also tried with other versions of libretiny (1.8.0, 1.9.1) and also tried LT_SERIAL_BUFFER_SIZE: 512, but nothing resolved this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions