Data acquisition Sonoff POW r2?


#1

I got the new Sonoff Pow r2.
Esphome 1.11.2
But why doesn’t it give normal values? What am I doing wrong?

# Enable logging
logger:
  baud_rate: 0
  
uart:
  rx_pin: RX
  baud_rate: 4800
  
# Enable Home Assistant API
api:
  password: '123456'

ota:
  password: '123456'

  sensor:
  - platform: wifi_signal
    name: "WiFi Signal Sensor"
    update_interval: 60s
  - platform: uptime
    name: "Sonoff Uptime"
  - platform: cse7766
    update_interval: 5s
    current:
      name: "Sonoff POW Current"
    voltage:
      name: "Sonoff POW Voltage"
    power:
      name: "Sonoff POW Power"

%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA%20%D1%8D%D0%BA%D1%80%D0%B0%D0%BD%D0%B020190315012802


#2

Probably because your indentation is wrong.


#3

This is simply incorrectly copied code.
As you can see, the sensor is working on the graph, the syntax in the config is correct.
But random voltage and power readings are displayed.


#4

Please fix it so someone can check.

The sample config in the esphome.io uses pin RX in the uart setup, you use pin 3. Perhaps this is a problem?


#5

Thanks for trying to help.
I changed the pin on the RX.
In general, the problem is that with the load off, from Sonoff
I get weird data like on a chart.
But when you turn on the load, everything is in order. Shows the correct voltage and power.
Probably need to adjust the filtering of these random bursts?