Apologies, just read that this should have been in the Configuration category.
Hi all,
Hardware: Mercator Ikuu SPLUG02 series 2. Single relay switched plug with current,power, voltage measurement.
Internal hardware: Beken CB2S, Measurement chip: BL0937 (HLW8012 equivalent).
I am confused on the issue of seeing a Current measurement even when there is no load connected. and the relay is OFF.
Relevant portion of the code:
# Board: Generic - BK7231N (Tuya QFN32)
# Definition: definitions/boards/generic-bk7231n-qfn32-tuya/manifest.yaml
esphome:
name: mainsswitch2
friendly_name: MainsSwitch#2
bk72xx:
board: cb2s
logger:
api:
encryption:
key: "mzAZmQ6OHX2CDwKzLu9zoNgf02G7KJJIRotabxieFf8="
ota:
- platform: esphome
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ap:
ssid: MainsSwitch#2 Fallback Hotspot
password: "lhMzHy6jefiD"
captive_portal:
text_sensor:
- platform: libretiny
version:
name: LibreTiny Version
output:
- platform: libretiny_pwm
id: output_led_1
pin: P26
What am I missing, or should I do differently?
Cheers,
DutchTuatara
light:
- platform: monochromatic
id: light_switch_1
output: output_led_1
binary_sensor:
- platform: gpio
id: binary_switch_1
pin:
number: P11
inverted: true
mode: INPUT_PULLUP
on_press:
then:
- switch.toggle: switch_1
switch:
- platform: gpio
id: switch_1
name: Relay 1
pin: P8
on_turn_on:
- light.turn_on: light_switch_1
on_turn_off:
- light.turn_off: light_switch_1
status_led:
pin: P10
substitutions:
voltage_divider: "767.4905739421869"
current_resistor: "0.0010422723965338564"
current_multiply: "1802.2626856731272"
sensor:
- platform: hlw8012
model: BL0937
cf_pin:
number: P7
inverted: true
cf1_pin:
number: P6
inverted: true
sel_pin:
number: P24
inverted: true
current:
name: BL0937 Current
filters:
- multiply: ${current_multiply}
voltage:
name: BL0937 Voltage
power:
name: BL0937 Power
energy:
name: BL0937 Energy
voltage_divider: ${voltage_divider}
current_resistor: ${current_resistor}
update_interval: 60s
What do I need to change to stop this?
Any ideas gratefully accepted.
Cheers,
DutchTuatara
