logo elektroda
logo elektroda
X
logo elektroda

Home Assistant Integration: Reflashing BK7231N in Tuya Smart DIN-rail Energy Meter TAC2121C

tomanyusers 7374 60
ADVERTISEMENT
  • #61 21420852
    strgedas
    Level 1  
    Any news? Just ordered, would love your input
  • ADVERTISEMENT

Topic summary

The discussion focuses on integrating a Tuya Smart DIN-rail energy meter model TAC2121C, featuring a BK7231N chip, into Home Assistant by reflashing it with OpenBK7231N firmware to avoid using the Tuya cloud. The meter uses a V9911 energy measurement IC connected via UART to the BK7231N. Initial challenges included identifying the energy meter chip and decoding its UART communication protocol. Hex data captures revealed TuyaMCU packets with dpIDs conveying voltage, current, power, energy consumption, relay state, and device status. A critical discovery was the need to send a specific UART command (e.g., "uartSendHex 55AA000300010407") periodically to the TuyaMCU to initiate data reporting and relay control. Firmware updates added support for automatic time synchronization (NTP), RSSI reporting, and improved parsing of compound data packets. The OpenBK7231T_App firmware was customized with an autoexec.bat script linking TuyaMCU dpIDs to channels for toggle, voltage, power, current, and energy total, enabling MQTT integration with Home Assistant. Further refinements addressed data formatting, channel labeling, and multi-phase meter support using RAW_TAC2121C_VCP command with configurable channel offsets. The community also worked on debugging WiFi state synchronization and ensuring stable communication between the BK7231N and TuyaMCU. A 3-phase meter variant was tested with firmware adjustments to handle multiple dpIDs for each phase. The project is ongoing, with documentation and tutorials planned to assist users in reflashing and configuring these meters for local control without Tuya cloud dependency.
Summary generated by the language model.
ADVERTISEMENT