I recently converted all my Kogan Smart Plugs (both new and old type) into ESPHome and calibrated them using a fixed draw incandescent bulb and an in-line power meter for accurate readings (~+/- 2v, +/- 0.1W). The only things that don’t work properly are the LEDs, but I don’t care about those. For anyone interested, the ESPHome configurations are below:
Old Kogan Plugs (thicker size, no USB):
substitutions:
devid: <DEVICEID>
devname: <DEVICENAME>
devicon: <DEVICEMDIREF>
esphome:
name: $devid
platform: ESP8266
board: esp8285
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_pass
# Enable logging
logger:
# Enable Web Server (optional)
web_server:
port: 80
# Enable Home Assistant API
api:
ota:
switch:
- platform: gpio
id: led
pin:
number: GPIO13
inverted: true
- platform: gpio
name: $devname
pin: GPIO14
id: relay
icon: $devicon
time:
- platform: homeassistant
id: homeassistant_time
sensor:
- platform: hlw8012
sel_pin:
number: GPIO12
inverted: true
cf_pin: GPIO4
cf1_pin: GPIO5
current:
name: $devname Current
unit_of_measurement: A
voltage:
name: $devname Voltage
unit_of_measurement: V
power:
name: $devname Power
unit_of_measurement: W
### HIGHER VALUE GIVES LOWER WATTAGE
current_resistor: 0.000812
### LOWER VALUE GIVES LOWER VOLTAGE
voltage_divider: 2100
New Kogan Plugs (2x 2.4a USB):
substitutions:
devid: <DEVICEID>
devname: <DEVICENAME>
devicon: <DEVICEMDIREF>
esphome:
name: $devid
platform: ESP8266
board: esp8285
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_pass
# Enable logging
logger:
# Enable Web Server (optional)
web_server:
port: 80
# Enable Home Assistant API
api:
ota:
switch:
- platform: gpio
id: led
pin:
number: GPIO13
inverted: true
- platform: gpio
name: $devname
pin: GPIO14
id: relay
icon: $devicon
time:
- platform: homeassistant
id: homeassistant_time
sensor:
- platform: hlw8012
sel_pin:
number: GPIO12
inverted: true
cf_pin: GPIO4
cf1_pin: GPIO5
current:
name: $devname Current
unit_of_measurement: A
voltage:
name: $devname Voltage
unit_of_measurement: V
power:
name: $devname Power
unit_of_measurement: W
### HIGHER VALUE GIVES LOWER WATTAGE
current_resistor: 0.00215
### LOWER VALUE GIVES LOWER VOLTAGE
voltage_divider: 799