Tompd 63sw Energy monitor values frozen

Hey, after installing the energy monitor I noticed that values don’t update, only Total Energy is updating, leakage current voltage current and power have the same value since day 1
flashed the mcu with the latest esphome
I noticed also that my pcb is a little bit different from the device used here TOMZN TOMPD-63-WiFi | ESPHome Devices

esphome:
  name: tompd-cbu
  friendly_name: tompd-cbu


bk72xx:
  board: generic-bk7231n-qfn32-tuya
  #board: wb3s

ota:
  - platform: esphome
    password: "0b8b2bf7c9fe6f9a9bd8a6913b693b72"

api:
  encryption:
    key: "K6VTuysbvkk8clKXDC91dNoUaRobo0IJmk5N3b6fDY4="
# Enable Home Assistant API

# Disable logging
logger:
  baud_rate: 0
  
uart:
  baud_rate: 9600
  id: uart_tuya
  rx_pin: RX1
  tx_pin: TX1

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  manual_ip:
    static_ip: 192.168.3.68
    gateway: 192.168.3.1
    subnet: 255.255.0.0

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "tom Fallback Hotspot"
    password: "idEqhSV1Hafg" 
    
tuya:
  uart_id: uart_tuya
  on_datapoint_update:
  - sensor_datapoint: 6
    datapoint_type: raw
    then:
      - lambda: |-
          ESP_LOGD("main", "on_datapoint_update %s", format_hex_pretty(x).c_str());
          id(voltage).publish_state((x[0] << 8 | x[1]) * 0.1);
          id(current).publish_state((x[3] << 8 | x[4]) * 0.001);
          id(power).publish_state((x[6] << 8 | x[7]) * 1);

switch:
  - platform: tuya
    switch_datapoint: 16
    name: "On"

sensor:
  - platform: template
    id: voltage
    name: "Volt"
    unit_of_measurement: "V"
    icon: "mdi:sine-wave"
    accuracy_decimals: 1
  - platform: template
    id: current
    name: "Curent"
    icon: "mdi:current-ac"
    unit_of_measurement: "A"
    accuracy_decimals: 2
  - platform: template
    id: power
    name: "Power"
    icon: "mdi:flash"
    unit_of_measurement: "W"
    accuracy_decimals: 0
  - platform: tuya
    name: "Total Energy"
    sensor_datapoint: 1
    unit_of_measurement: "kWh"
    accuracy_decimals: 2
    icon: "mdi:lightning-bolt"
    filters:
      - multiply: 0.01  
  - platform: tuya
    name: "Leakage Current"
    sensor_datapoint: 15
    unit_of_measurement: "mA"
    accuracy_decimals: 0
    icon: "mdi:flash-alert"

from the log I can get this maybe it can help

[10:36:49.237][C][tuya:056]:   Datapoint 16: switch (value: ON)
[10:36:49.241][C][tuya:060]:   Datapoint 19: string value (value: 1234)
[10:36:49.244][C][tuya:054]:   Datapoint 17: raw (value: 04.01.00.1E)
[10:36:49.246][C][tuya:054]:   Datapoint 18: raw (value: 01.01.00.28.03.01.00.F5.04.01.00.D2 (12))
[10:36:49.251][C][tuya:058]:   Datapoint 1: int value (value: 1030)
[10:36:49.255][C][tuya:058]:   Datapoint 15: int value (value: 0)
[10:36:49.258][C][tuya:054]:   Datapoint 6: raw (value: 09.06.00.06.E0.00.01.29 (8))
[10:36:49.262][C][tuya:058]:   Datapoint 104: int value (value: 800)
[10:36:49.266][C][tuya:058]:   Datapoint 105: int value (value: 500)
[10:36:49.270][C][tuya:058]:   Datapoint 116: int value (value: 2317)
[10:36:49.273][C][tuya:058]:   Datapoint 117: int value (value: 1960)
[10:36:49.277][C][tuya:058]:   Datapoint 118: int value (value: 362)
[10:36:49.280][C][tuya:056]:   Datapoint 11: switch (value: OFF)
[10:36:49.284][C][tuya:058]:   Datapoint 13: int value (value: 0)
[10:36:49.287][C][tuya:064]:   Datapoint 9: bitmask (value: 0)
[10:36:49.292][C][tuya:074]:   Product: '{"P":"u0cxoxtfelys3ufx","v":"1.0.0","m":1,"mt":10,"n":0,"low":0}'

Do you see actual updates, i.e. on_datapoint_update debug messages?

I get update only on Total energy and Leakage mA

[11:14:46.498][D][tuya:368]: Datapoint 1 update to 1083
[11:14:46.501][D][sensor:135]: 'Total Energy': Sending state 10.83000 kWh with 2 decimals of accuracy
[11:14:46.524][D][tuya:360]: Datapoint 11 update to OFF
[11:14:46.529][D][tuya:368]: Datapoint 13 update to 0
[11:14:47.475][D][tuya:368]: Datapoint 15 update to 0
[11:14:47.482][D][sensor:135]: 'Leakage Current': Sending state 0.00000 mA with 0 decimals of accuracy
[11:14:48.474][D][tuya:368]: Datapoint 104 update to 824
[11:14:48.495][D][tuya:368]: Datapoint 105 update to 500
[11:14:48.516][D][tuya:368]: Datapoint 116 update to 2321
[11:14:48.522][D][tuya:368]: Datapoint 117 update to 2390
[11:14:48.549][D][tuya:368]: Datapoint 118 update to 457

switched on an older model 63-wifi (wb3s chip) the same config (board, api and ota different of course) I get all data

[11:25:31.223][D][tuya:397]: Datapoint 9 update to 00000000
[11:25:31.242][D][tuya:368]: Datapoint 1 update to 61205
[11:25:31.245][D][sensor:135]: 'Total Energy': Sending state 612.04999 kWh with 2 decimals of accuracy
[11:25:31.264][D][tuya:352]: Datapoint 6 update to 09.04.00.00.00.00.00.00 (8)
[11:25:31.266][D][main:049]: on_datapoint_update 09.04.00.00.00.00.00.00 (8)
[11:25:31.269][D][sensor:135]: 'Volt': Sending state 230.80000 V with 1 decimals of accuracy
[11:25:31.270][D][sensor:135]: 'Curent': Sending state 0.00000 A with 2 decimals of accuracy
[11:25:31.272][D][sensor:135]: 'Power': Sending state 0.00000 W with 0 decimals of accuracy
[11:25:31.292][D][tuya:368]: Datapoint 15 update to 0
[11:25:31.293][D][sensor:135]: 'Leakage Current': Sending state 0.00000 mA with 0 decimals of accuracy
[11:25:31.296][D][tuya:368]: Datapoint 13 update to 0
[11:25:31.319][D][tuya:360]: Datapoint 12 update to OFF
[11:25:31.319][D][tuya:397]: Datapoint 9 update to 00000000

And what are the values on the display at the time of the datapoint updates?
Maybe that model uses other values…

you mean on the device display ? displaying normally refreshing 2-5 times /sec
I noticed that the frozen values are refreshing to Hass each time I make an ota update, probably each time the mcu reboots, to sum it updates all the values after wake up but only keep updating Total energy and Leakage

Yes, and I meant the actual values, to correlate with other datapoints, maybe?

Did you try with the tuya app before flashing, to check whether those values were provided to Tuya itself? Maybe that revision of the board only provides meaningful data once, at start?

nope, I flashed the device right from the box no tuya app,
yep update at start then only 2 values updates each time, but it’s updating on the display normally