I have a couple of Sonoff POW Origin (POWR316) devices and I flashed one of them with ESPHome, but I am unable to get the current monitoring part working. It seems like the data received from CSE7759B chip is in invalid format.
I am confused if this is the device issue or if I am doing anything wrong with the configuration. The power monitoring was working fine on the eWeLink app before flashing.
This is the configuration I am using
esp32:
board: nodemcu-32s
logger:
level: VERY_VERBOSE
baud_rate: 0
web_server:
port: 80
uart:
rx_pin: GPIO16
baud_rate: 4800
debug:
sensor:
- platform: cse7766
update_interval: 30s
current:
name: ${device_name} Current
id: a_sensor
voltage:
name: ${device_name} Voltage
id: v_sensor
power:
name: ${device_name} Power
id: w_sensor
energy:
name: ${device_name} Energy
id: wh_sensor
This is the log output from ESPHome
[22:25:01][D][uart_debug:114]: <<< 02:A8:2A:A2:51:40:C8:07:1A:02:A8:2A:A2:51:40:C8:07:1A
[22:25:01][D][uart_debug:114]: <<< 02:A8:2A:A2:51:40:C8:07:1A:02:A8:2A:A2:51:40:C8:07:1A:89:DF
[22:25:01][D][uart_debug:114]: <<< 02:A8:2A:A2:51:40:C8:07:1A:89:DF
[22:25:01][D][uart_debug:114]: <<< 02:A8:2A:A2:7A:51:40:C8:07:1A:89:4F:02:A8:2A:A2:7A:51:40:C8:07:73:1A:89
[22:25:02][D][uart_debug:114]: <<< 02:A8:2A:A2:7A:51:40:C8:07:73:1A:89:02:A8:2A:A2:7A:51:40:C8:07:73:1A:8A:FD
[22:25:02][V][cse7766:048]: Invalid Header 2 Start: 0x02!
[22:25:02][V][cse7766:048]: Invalid Header 2 Start: 0x02!
[22:25:02][D][uart_debug:114]: <<< 02:A8:2A:A2:7A:51:40:C8:07:73:1A:8A:FD:02:A8:2A:A2:7A:51:40:C8:07:73:1A:8A:FD
[22:25:02][V][cse7766:048]: Invalid Header 2 Start: 0x02!
[22:25:02][V][cse7766:048]: Invalid Header 2 Start: 0x02!
[22:25:02][D][uart_debug:114]: <<< 02:A8:2A:A2:7A:51:40:C8:07:73:1A:8A:FD:02:A8:2A:A2:7A:51:40:C8:07:73:1A:FE
[22:25:02][V][cse7766:048]: Invalid Header 2 Start: 0x02!
[22:25:02][D][uart_debug:114]: <<< 02:A8:A2:7A:51:40:C8:07:73:1A:02:A8:A2:7A:51:40:C8:07:73:1A
[22:25:02][D][uart_debug:114]: <<< 02:A8:A2:7A:51:40:C8:07:7A:9E:1A:02:A8:A2:7A:51:40:C8:07:7A:9E:1A
[22:25:03][V][cse7766:048]: Invalid Header 2 Start: 0x02!
[22:25:03][D][uart_debug:114]: <<< 02:A8:A2:7A:51:40:C8:07:7A:9E:1A:8C:FD:02:A8:A2:7A:51:40:C8:07:7A:9E:1A:8C:FD
[22:25:03][V][cse7766:048]: Invalid Header 2 Start: 0x02!
[22:25:03][V][cse7766:048]: Invalid Header 2 Start: 0x02!
[22:25:03][D][uart_debug:114]: <<< 02:A8:A2:7A:51:40:C8:07:7A:9E:1A:8C:FD:02:A8:A2:7A:51:40:C8:07:7A:9E:1A:8C:FD