Sonoff S31 flashed with ESPHome stopped displaying consumption data

I have multiple Sonoff S31 plugs that I’ve flashed with ESPHome. I have identical YAML config on each of them sans the naming of the devices.

A new Sonoff that I installed briefly showed consumption data, but since is no longer showing anything. It does show itself as online and I can connect to it via ESP Home and see the logs (logs below).

I have tried re-compiling and updating the device over OTA, but consumption data no longer shows. Even if there is no load, it will always show voltage, but nothing is showing up.

I’m stumped, do I have a faulty device?

Showing Logs For: studio_fridge.yaml
INFO Reading configuration /config/esphome/studio_fridge.yaml...
INFO Starting log output from studio_fridge.local using esphome API
INFO Connecting to studio_fridge.local:6053 (192.168.0.23)
INFO Successfully connected to studio_fridge.local
[17:36:26][I][app:105]: ESPHome version 1.15.3 compiled on Feb 12 2021, 18:29:02
[17:36:26][C][status_led:019]: Status LED:
[17:36:26][C][status_led:020]:   Pin: GPIO13 (Mode: OUTPUT)
[17:36:27][D][cse7766:147]: Got voltage=0.0V current=0.0A power=0.0W
[17:36:32][C][wifi:443]: WiFi:
[17:36:32][C][wifi:303]:   SSID: [redacted]
[17:36:32][C][wifi:304]:   IP Address: 192.168.0.23
[17:36:32][C][wifi:306]:   BSSID: [redacted]
[17:36:32][C][wifi:307]:   Hostname: 'studio_fridge'
[17:36:32][C][wifi:311]:   Signal strength: -67 dB ▂▄▆█
[17:36:32][C][wifi:315]:   Channel: 1
[17:36:32][C][wifi:316]:   Subnet: 255.255.255.0
[17:36:32][C][wifi:317]:   Gateway: 192.168.0.1
[17:36:32][C][wifi:318]:   DNS1: 192.168.0.1
[17:36:32][C][wifi:319]:   DNS2: (IP unset)
[17:36:32][C][uart_esp8266:075]: UART Bus:
[17:36:32][C][uart_esp8266:080]:   RX Pin: GPIO3
[17:36:32][C][uart_esp8266:081]:   RX Buffer Size: 256
[17:36:32][C][uart_esp8266:083]:   Baud Rate: 4800 baud
[17:36:32][C][uart_esp8266:084]:   Data Bits: 8
[17:36:32][C][uart_esp8266:085]:   Parity: NONE
[17:36:32][C][uart_esp8266:086]:   Stop bits: 1
[17:36:32][C][uart_esp8266:088]:   Using hardware serial interface.
[17:36:32][W][uart:041]:   You're using the same serial port for logging and the UART component. Please disable logging over the serial port by setting logger->baud_rate to 0.
[17:36:32][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'Studio Fridge Plug Button'
[17:36:32][C][gpio.binary_sensor:016]:   Pin: GPIO0 (Mode: INPUT_PULLUP, INVERTED)
[17:36:32][C][switch.gpio:042]: GPIO Switch 'Studio Fridge Plug Switch'
[17:36:32][C][switch.gpio:043]:   Pin: GPIO12 (Mode: OUTPUT)
[17:36:32][C][switch.gpio:059]:   Restore Mode: Restore (Defaults to OFF)
[17:36:37][C][logger:185]: Logger:
[17:36:37][C][logger:186]:   Level: DEBUG
[17:36:37][C][logger:187]:   Log Baud Rate: 115200
[17:36:37][C][logger:188]:   Hardware UART: UART0
[17:36:37][D][cse7766:147]: Got voltage=0.0V current=0.0A power=0.0W
[17:36:37][D][sensor:092]: 'Studio Fridge Plug Voltage': Sending state 0.00000 V with 1 decimals of accuracy
[17:36:37][D][sensor:092]: 'Studio Fridge Plug Current': Sending state 0.00000 A with 2 decimals of accuracy
[17:36:37][D][sensor:092]: 'Studio Fridge Plug Power': Sending state 0.00000 W with 1 decimals of accuracy
[17:36:37][C][cse7766:170]: CSE7766:
[17:36:37][C][cse7766:171]:   Update Interval: 2.0s
[17:36:37][C][cse7766:172]:   Voltage 'Studio Fridge Plug Voltage'
[17:36:37][C][cse7766:172]:     Unit of Measurement: 'V'
[17:36:37][C][cse7766:172]:     Accuracy Decimals: 1
[17:36:37][C][cse7766:172]:     Icon: 'mdi:flash'
[17:36:37][C][cse7766:173]:   Current 'Studio Fridge Plug Current'
[17:36:37][C][cse7766:173]:     Unit of Measurement: 'A'
[17:36:37][C][cse7766:173]:     Accuracy Decimals: 2
[17:36:37][C][cse7766:173]:     Icon: 'mdi:flash'
[17:36:37][C][cse7766:174]:   Power 'Studio Fridge Plug Power'
[17:36:37][C][cse7766:174]:     Unit of Measurement: 'W'
[17:36:37][C][cse7766:174]:     Accuracy Decimals: 1
[17:36:37][C][cse7766:174]:     Icon: 'mdi:flash'
[17:36:37][D][cse7766:147]: Got voltage=0.0V current=0.0A power=0.0W
[17:36:37][D][sensor:092]: 'Studio Fridge Plug Voltage': Sending state 0.00000 V with 1 decimals of accuracy
[17:36:37][D][sensor:092]: 'Studio Fridge Plug Current': Sending state 0.00000 A with 2 decimals of accuracy
[17:36:37][D][sensor:092]: 'Studio Fridge Plug Power': Sending state 0.00000 W with 1 decimals of accuracy
[17:36:37][C][captive_portal:169]: Captive Portal:
[17:36:37][C][ota:029]: Over-The-Air Updates:
[17:36:37][C][ota:030]:   Address: studio_fridge.local:8266
[17:36:37][C][api:095]: API Server:
[17:36:37][C][api:096]:   Address: studio_fridge.local:6053
[17:36:37][D][cse7766:147]: Got voltage=0.0V current=0.0A power=0.0W
[17:36:37][D][sensor:092]: 'Studio Fridge Plug Voltage': Sending state 0.00000 V with 1 decimals of accuracy
[17:36:37][D][sensor:092]: 'Studio Fridge Plug Current': Sending state 0.00000 A with 2 decimals of accuracy
[17:36:37][D][sensor:092]: 'Studio Fridge Plug Power': Sending state 0.00000 W with 1 decimals of accuracy
[17:36:40][D][cse7766:147]: Got voltage=0.0V current=0.0A power=0.0W
[17:36:40][D][sensor:092]: 'Studio Fridge Plug Voltage': Sending state 0.00000 V with 1 decimals of accuracy
[17:36:40][D][sensor:092]: 'Studio Fridge Plug Current': Sending state 0.00000 A with 2 decimals of accuracy
[17:36:40][D][sensor:092]: 'Studio Fridge Plug Power': Sending state 0.00000 W with 1 decimals of accuracy
[17:36:42][D][cse7766:147]: Got voltage=0.0V current=0.0A power=0.0W
[17:36:42][D][sensor:092]: 'Studio Fridge Plug Voltage': Sending state 0.00000 V with 1 decimals of accuracy
[17:36:42][D][sensor:092]: 'Studio Fridge Plug Current': Sending state 0.00000 A with 2 decimals of accuracy
[17:36:42][D][sensor:092]: 'Studio Fridge Plug Power': Sending state 0.00000 W with 1 decimals of accuracy
[17:36:43][D][cse7766:147]: Got voltage=0.0V current=0.0A power=0.0W
[17:36:43][D][sensor:092]: 'Studio Fridge Plug Voltage': Sending state 0.00000 V with 1 decimals of accuracy
[17:36:43][D][sensor:092]: 'Studio Fridge Plug Current': Sending state 0.00000 A with 2 decimals of accuracy
[17:36:43][D][sensor:092]: 'Studio Fridge Plug Power': Sending state 0.00000 W with 1 decimals of accuracy
....
....
....
....

I had the same problem with a Zigbee device and it was due to a low connection signal.
The ESPHome sensor value is the “Received Signal Strength Indication” measured in decibels, depending on the device an RSSI signal of -67 dB may be low, it still connects and works but it is not enough to transmit the data of the measurements, I suggest that try to move the device to get at least -60 dB and check if the consumption measurement is received.

Thanks for the reply! What’s interesting is there is a Google WiFi device 4ft away from this plug! Also another Sonoff s31 device that I have is further away, I checked the logs and it has an lower DB of -79 rating yet it still transmits data, so I’m not sure if that applies here

Update: I rebooted the Sonoff plug in question and it now has a DB strength of -39, still reporting no consumption data so unfortunately I think that rules out the wifi connection :frowning:

I think you maybe need to disable the logger: in the yaml, as it interferes with the UART bus for the CSE7766 for power monitoring.

2 Likes

I spent months dealing with this problem and it comes down to putting a # in front of logger: in the Sonoff S31 yaml.

Thank you very much!

1 Like