logo elektroda
logo elektroda
X
logo elektroda

Tuya Single Phase Energy Meter 6 In 1: CBU Chip Flashing & ESPHome Integration Issues

deanfourie 11682 96
ADVERTISEMENT
  • #91 20537263
    p.kaczmarek2
    Moderator Smart Home
    No hardware modifications are required if you are going to run BL0942SPI driver. All you need to do is:
    1. flash the firmware
    2. start driver BL0942SPI, probably in short startup command
    3. you should already get readings, but it's good thing to calibrate, VoltageSet, etc commands
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #92 20538825
    deanfourie
    Level 6  
    Sorry would I need to update the firmware since I last installed it for this to work.

    I'm looking at this now,

    Thanks
  • ADVERTISEMENT
  • #93 20538842
    p.kaczmarek2
    Moderator Smart Home
    Web Application -> OTA -> drag and drop proper RBL for your platform
    Helpful post? Buy me a coffee.
  • #94 20559984
    deanfourie
    Level 6  
    Great thanks, I've done that now on all units.

    Do you think you can walk me through calibration and MQTT setup for HA?

    Much appreciated!
  • ADVERTISEMENT
  • #95 20559990
    p.kaczmarek2
    Moderator Smart Home
    Good job, no problem, I can tell you what to od next.
    First calibration: Take a reliable meter, plug 60W bulb, then open Web App, Tools tab, and in the fields for calibration, enter true Voltage/Current/Power readings from a reliable meter. Done.
    Then HA pairing:
    [youtube]
    https://www.youtube.com/watch?v=pkcspey25V4
    [/youtube]
    You can also take a glance here for general purpose tutorials:
    https://www.youtube.com/@elektrodacom
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #96 21328576
    alexlimbeck
    Level 3  
    Hi. I am trying a Tongou smartplug. (TuyaCBU + BL0942)
    Flashed and activated with the "startDriver BL0942SPI" command, all was fine, until reboot.

    Rebooted the smartplug, I don't receive any data about power consumption on my MQTT server.
    If I try again startDriver "BL0942SPI", I obtain errors, but finally I receive data on my MQTT server.

    This is the message:

    Info:EnergyMeter:Read ENERGYMETER status values. sizeof(ENERGY_METERING_DATA)=32
    Warn:EnergyMeter:Failed to read reg 1D: bad checksum FF wanted 8D
    Error:EnergyMeter:Failed to write reg 1D val 55: read 11
    Warn:EnergyMeter:Failed to read reg 19: bad checksum FF wanted 91
    Error:EnergyMeter:Failed to write reg 19 val 8F: read 11
    Info:MAIN:Started BL0942SPI.
    OK


    So I tryed "stopDriver BL0942SPI" and repeat "startDriver BL0942SPI" and the result is :

    Info:EnergyMeter:Read ENERGYMETER status values. sizeof(ENERGY_METERING_DATA)=32
    Error:CMD:command with name EnergyCntReset already exists!
    Error:CMD:command with name SetupEnergyStats already exists!
    Error:CMD:command with name ConsumptionThreshold already exists!
    Error:CMD:command with name VCPPublishThreshold already exists!
    Error:CMD:command with name VCPPrecision already exists!
    Error:CMD:command with name VCPPublishIntervals already exists!
    Error:CMD:command with name VoltageSet already exists!
    Error:CMD:command with name CurrentSet already exists!
    Error:CMD:command with name PowerSet already exists!
    Warn:EnergyMeter:Failed to read reg 1D: bad checksum FF wanted 8D
    Error:EnergyMeter:Failed to write reg 1D val 55: read 11
    Warn:EnergyMeter:Failed to read reg 19: bad checksum FF wanted 91
    Error:EnergyMeter:Failed to write reg 19 val 8F: read 11
    Info:MAIN:Started BL0942SPI.
    OK
  • #97 21328626
    p.kaczmarek2
    Moderator Smart Home
    Were measurements really correct? Reboot shouldn't break anything... is it still wrong after power off and on?
    Helpful post? Buy me a coffee.

Topic summary

The discussion revolves around issues related to flashing the Tuya Single Phase Energy Meter 6 In 1, which utilizes a CBU chip based on the BK7231N. The user experienced difficulties in flashing the device to integrate it with ESPHome, leading to inquiries about the correct flashing procedure, tools, and binary files. Various responses provided troubleshooting steps, including the use of specific Python tools (hid_download_py, uartprogram) for firmware backup and flashing. The conversation evolved to identify the internal components, particularly the BL0942 chip, and the need to switch from SPI to UART mode for proper communication. The community also discussed calibration and MQTT setup for Home Assistant integration, emphasizing the importance of accurate readings and device configuration.
Summary generated by the language model.
ADVERTISEMENT