Integrate Kogan SmarterHome products into HA

Anyone tried the new rgb ± cct bulbs?

I added my Kogan AC to the Tuya app and it is appearing in HA. The only issue is that it shows the temp as 240c, which is obviously wrong :slight_smile:

Anyone had this issue?

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
2 Likes

Has anyone managed to get working ESPHome config for the smart kettle?

You should be able to ‘convert’ the Tasmota template posted above to work out the GPIO and create the ESPhome config. I did this once for a different device

See here:

Hey all,

I’m having a bit of trouble getting the temperture information included in the mqtt output. I’ve compiled Tasmota firmware with Option66 enabled, but that doesn’t seem to have done the trick.

I’ve had a ready through the comments above and can’t work out what I’m missing.

Is there an extra step that I’ve missed?

Thanks in advance.

Hey Zacnut,
Did you make any changes to the firmware config before compiling it? I have the same kettle but am struggling to get the current temperature out of it. I enabled setoption66 but the temp isn’t being output to mqtt. It’s also not displayed in the web ui.

Hey trankillity, you mention the LEDs not working, but do your physical buttons work on the new 2x USB plugs? No matter what I try, I can’t seem to get these to function.

Haven’t checked in a while, but I believe so.

Judging by my code above, GPIO14 is the relay.

  - platform: gpio
    name: $devname
    pin: GPIO14
    id: relay
    icon: $devicon

Yeah I have the same. Unfortunately not working…

binary_sensor:
  - platform: gpio
    id: toggle
    pin:
      number: GPIO0
      mode: INPUT_PULLUP
      inverted: true
    internal: true
    on_press:
      then:
        - switch.toggle: relay

- - -

  - platform: gpio
    name: "$device"
    pin: GPIO14
    id: relay
    icon: "$icon"
    restore_mode: "$restore_mode"

Hi all, I got these light bulbs that I flashed using ESPHome and tuya-covert, here is the .yaml:

output:
  - platform: esp8266_pwm
    id: red
    pin: GPIO4
  - platform: esp8266_pwm
    id: green
    pin: GPIO12
  - platform: esp8266_pwm
    id: blue
    pin: GPIO14
  - platform: esp8266_pwm
    id: cold_white
    pin: GPIO5
  - platform: esp8266_pwm
    id: warm_white
    pin: GPIO13

Brightness and Color picker work outside of the box in HA but not the Color Temperature feature:

1 Like

Welcome to the forum :slight_smile:

did you set the light as rgbw in the ESPhome yaml file?

eg:

light:
  - platform: rgbw
    name: Ensuite Downlight
    red: output_red
    green: output_green
    blue: output_blue
    white: output_white
1 Like

Thanks for the quick reply and sorry for my ignorance, just discovered the difference between rgbw and rgbww!

I flashed it as a “custom rgbww” I think, like this:

Inspired by the /cw-ww-and-colour-temperature-slider-support-in-custom-light-output/148098/10 thread :slight_smile: I can only put 2 links in a post

try the code I provided, modified to suit your name and ID’s

I got one of these

https://www.kogan.com/au/buy/kogan-smarterhome-17l-smart-glass-kettle/

tasmota it

wrote this

Thanks Dave, I used the following instructions in my YAML file but I can’t get the sliders in HA to be correctly mapped, the pin assignment for the output_white is probably not right or something is missing. The “white value” slider seems inactive. What do you recommend reading to understand how to figure out the pins mapping?

light:
  - platform: rgbw
    name: ${name}
    red: output_red
    green: output_green
    blue: output_blue
    white: output_white
  
output:
  - platform: esp8266_pwm
    id: output_red
    pin: GPIO4
  - platform: esp8266_pwm
    id: output_green
    pin: GPIO12
  - platform: esp8266_pwm
    id: output_blue
    pin: GPIO14
  - platform: esp8266_pwm
    id: output_white
    pin: GPIO13

Can I get a version of this with proper formatting? I can’t seem to get it to validate, as I’m having issues with the indentation.

Hey Lance

Try this -


substitutions:
  plug_name: plug01
  # Higher value gives lower watt readout
  #current_res: "0.00221"
  current_res: "0.00087"
  # Lower value gives lower voltage readout
  #voltage_div: "955"
  voltage_div: "2072"
esphome:
  name: ${plug_name}
  platform: ESP8266
  board: esp8285
wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_pwd
# Enable logging
logger:
# Enable Web server
web_server:
  port: 80
# Enable Home Assistant API
api:
  password: !secret esphome_api
ota:
  password: !secret esphome_ota
time:
  - platform: homeassistant
    id: homeassistant_time
    

switch:
- platform: gpio
  name: "${plug_name}_Relay"
  pin: GPIO14
  id: relay
#  restore_mode: ALWAYS_ON
- platform: gpio
  name: "${plug_name}_LED_Green"
  pin: GPIO13
  inverted: True
  restore_mode: ALWAYS_OFF
#- platform: gpio
#  name: "${plug_name}_LED_Red"
#  pin: GPIO13
#  inverted: True
#  restore_mode: ALWAYS_OFF
sensor:
  - platform: hlw8012
    sel_pin:
      number: GPIO12
      inverted: True
    cf_pin: GPIO04
    cf1_pin: GPIO05
    current_resistor: ${current_res}
    voltage_divider: ${voltage_div}
    current:
      name: "${plug_name}_Amperage"
      unit_of_measurement: A
    voltage:
      name: "${plug_name}_Voltage"
      unit_of_measurement: V
    power:
      name: "${plug_name}_Wattage"
      unit_of_measurement: W
      id: "${plug_name}_Wattage"
    change_mode_every: 8
    update_interval: 60s
  - platform: total_daily_energy
    name: "${plug_name}_Total Daily Energy"
    power_id: "${plug_name}_Wattage"
    filters:
        # Multiplication factor from W to kW is 0.001
        - multiply: 0.001
    unit_of_measurement: kWh
      
# Extra sensor to keep track of plug uptime
  - platform: uptime
    name: ${plug_name}_Uptime Sensor
    
  - platform: wifi_signal
    name: "${plug_name}_WiFi Signal Sensor"
    update_interval: 300s
    
    
binary_sensor:
  - platform: gpio
    pin:
      number: GPIO0
      mode: INPUT_PULLUP
      inverted: True
    name: "${plug_name}_Button"
    on_press:
      - switch.toggle: relay
1 Like