Yep - gave this a go. It’s all in a single UDP stream which I couldn’t decode any further
That was the easy part. Now you have to work out the different messages by decoding the hex in the Ethernet frame.
How did you goes open the arlec grid connect plugs to flash them? They have a weird tri groove screw I’ve not seen before. I have a kit with various security bits but not this one. I can’t even find one to purchase online. Thinking of just drilling them out and replacing with different screws.
I bought a set of screwdrivers at jaycar just for this. Cost me almost the same as the twin plug I wanted to open.
But turns out it can be flashed with the new tuya convert without opening it…
Oh nice I might try that when I get home instead of buying the screwdriver kit. As I already have one minus this one specific bit haha.
I did try using the localtuya custom component but for some reason it’s not liking my config. I think esphome will be the best solution.
Just noticed smart globes for $12.99 in todays Aldi Special Buys catalogue (sale date 16th May) including one model with an in-built motion sensor. Likely able to be flashed with ESPhome / Tasmota I’m guessing.
Sorry dude, these arn’t “smart”, they don’t contain any IOT funtionality.
Yeah, after re-reading it I realise. I should have read it properly the first time
How good if they were. But if the Aldi cycle is on track (all be it shifted a bit because of no Snow Gear sale) the Brilliant stuff should return soon.
So my delivery of Kogan Smart Switches arrived today.
Took 30s to flash using tuya-convert, so no drama there.
However, on first inspection it seems like some of the pin mappings might have changed from the older version. Looks like the button is now GPIO3? I didn’t really have enough time to investigate any more than that before I had to return to the “Working” part of working from home! Has anyone else got therm yet, and had any luck finding the correct settings?
In case anyone wants them still, Bunnings has the triple and quad smart switches back in stock. They should be able to be tuya-converted if they are like the 2 gang switches. I’ll try over the weekend hopefully.
I’ve got 6 of them. 4x regular, 2x outdoor ones. They are all flashed with TuyaConvert and ESPHome.
Thanks @Mukund
Do you have the new design with 2x USB port?
The config / pin mappings I’m using are these…
Which is definitely not right!
You are right. Mine don’t have the USB ports.
OK - got the pin mapping sorted. Also needed to adjust / calibrate some of the values, so that it reads true.
For anyone interested, here is my config…
esphome:
name: kogan_smart
platform: ESP8266
board: esp8285
<<: !include .common_config.yaml
logger:
binary_sensor:
- platform: gpio
pin:
number: 3
mode: INPUT_PULLUP
inverted: true
name: "Kogan Plug 1 Power Button"
on_press:
- switch.toggle: relay
output:
- platform: gpio
pin: 13
inverted: true
id: blue_led_output
switch:
- platform: gpio
name: "Kogan Plug 1"
pin: 14
id: relay
on_turn_on:
- light.turn_on: blue_led
on_turn_off:
- light.turn_off: blue_led
light:
- platform: binary
id: blue_led
internal: true
output: blue_led_output
sensor:
- platform: hlw8012
sel_pin:
number: 12
inverted: true
cf_pin: 4
cf1_pin: 5
current:
name: "Kogan Plug 1 Current"
unit_of_measurement: A
voltage:
name: "Kogan Plug 1 Voltage"
unit_of_measurement: V
power:
id: kogan_plug_1_wattage
name: "Kogan Plug 1 Power"
unit_of_measurement: W
current_resistor: "0.0024713" ### HIGHER VALUE GIVES LOWER WATTAGE
voltage_divider: "806.36" ### LOWER VALUE GIVES LOWER VOLTAGE
change_mode_every: 1
update_interval: 5s
- platform: total_daily_energy
name: "Kogan Plug 1 Daily Energy"
power_id: kogan_plug_1_wattage
filters:
- multiply: 0.001
unit_of_measurement: kWh
time:
- platform: homeassistant
id: homeassistant_time
I’ll also upload to https://esphome-configs.io/ once I actually work out how to do so!
Does this actually work?
There’s a note about discarding the first value after switching on the ESPhome HLW8012 page:
Note that the first value after switching is discarded because it is often inaccurate.
So I take that to mean you would have to set this to at least 2.
I clearly didn’t read that. Seems to work though
Well if it’s working it probably takes a measurement, discards it, then takes the 1 measurement before switching modes and doing the same procedure again.
Yep I guess so. Testing it to the limits, seems to work pretty consistently. Here it is with change mode every 1, and an update interval of 1s…
[21:27:59][D][hlw8012:071]: Got power=10.0W, voltage=245.3V
[21:27:59][D][sensor:092]: 'Kogan Plug 1 Voltage': Sending state 245.27402 V with 1 decimals of accuracy
[21:27:59][D][sensor:092]: 'Kogan Plug 1 Power': Sending state 10.04896 W with 1 decimals of accuracy
[21:27:59][D][sensor:092]: 'Kogan Plug 1 Daily Energy': Sending state 0.00006 kWh with 3 decimals of accuracy
[21:28:00][D][sensor:092]: 'Kogan Plug 1 Power': Sending state 10.04896 W with 1 decimals of accuracy
[21:28:00][D][sensor:092]: 'Kogan Plug 1 Daily Energy': Sending state 0.00006 kWh with 3 decimals of accuracy
[21:28:01][D][hlw8012:063]: Got power=10.0W, current=0.0A
[21:28:01][D][sensor:092]: 'Kogan Plug 1 Current': Sending state 0.03517 A with 2 decimals of accuracy
[21:28:01][D][sensor:092]: 'Kogan Plug 1 Power': Sending state 10.04896 W with 1 decimals of accuracy
[21:28:01][D][sensor:092]: 'Kogan Plug 1 Daily Energy': Sending state 0.00007 kWh with 3 decimals of accuracy
[21:28:02][D][sensor:092]: 'Kogan Plug 1 Power': Sending state 8.61339 W with 1 decimals of accuracy
[21:28:02][D][sensor:092]: 'Kogan Plug 1 Daily Energy': Sending state 0.00007 kWh with 3 decimals of accuracy
[21:28:03][D][hlw8012:071]: Got power=10.0W, voltage=245.1V
[21:28:03][D][sensor:092]: 'Kogan Plug 1 Voltage': Sending state 245.13385 V with 1 decimals of accuracy
[21:28:03][D][sensor:092]: 'Kogan Plug 1 Power': Sending state 10.04896 W with 1 decimals of accuracy
[21:28:03][D][sensor:092]: 'Kogan Plug 1 Daily Energy': Sending state 0.00007 kWh with 3 decimals of accuracy
[21:28:04][D][sensor:092]: 'Kogan Plug 1 Power': Sending state 10.04896 W with 1 decimals of accuracy
[21:28:04][D][sensor:092]: 'Kogan Plug 1 Daily Energy': Sending state 0.00007 kWh with 3 decimals of accuracy
[21:28:05][D][hlw8012:063]: Got power=10.0W, current=0.0A
[21:28:05][D][sensor:092]: 'Kogan Plug 1 Current': Sending state 0.03517 A with 2 decimals of accuracy
[21:28:05][D][sensor:092]: 'Kogan Plug 1 Power': Sending state 10.04896 W with 1 decimals of accuracy
[21:28:05][D][sensor:092]: 'Kogan Plug 1 Daily Energy': Sending state 0.00008 kWh with 3 decimals of accuracy
[21:28:06][D][sensor:092]: 'Kogan Plug 1 Power': Sending state 8.61339 W with 1 decimals of accuracy
[21:28:06][D][sensor:092]: 'Kogan Plug 1 Daily Energy': Sending state 0.00008 kWh with 3 decimals of accuracy