Browse Source

Add support for Kogan Smarter Home Plug With Energy Meter (#2086)

* Add support for Kogan Smarter Home Plug With Energy Meter

Type: Power Plug
Board: Kogan Smarter Home Plug with Energy Meter
Build flag: KOGAN_SMARTER_HOME_PLUG_W_POW
Description: Power Plug with integrated Energy Meter
Baseboard: Tuya TYWE3S
Baseboard Data sheet: https://docs.tuya.com/docDetail?code=K8uhkbb1ihp8u

* Include Kogan Smarter Home plug with energy meter (KOGAN_SMARTER_HOME_PLUG_W_POW) into arduino.h

* Update platformio.ini to support Kogan Smarter Home plug with energy meter (KOGAN_SMARTER_HOME_PLUG_W_POW)

* Add Kogan Smarter Home plug with energy meter product image

* fix platformio.ini that was missing a '-ota' for the environment

* comment out device definition

* Make device name consistent with #define and platformio.ini
mcspr-patch-1
Aurélien Requiem 4 years ago
committed by Max Prokhorov
parent
commit
a170716e90
4 changed files with 59 additions and 0 deletions
  1. +1
    -0
      code/espurna/config/arduino.h
  2. +48
    -0
      code/espurna/config/hardware.h
  3. +10
    -0
      code/platformio.ini
  4. BIN
      images/devices/kogan-smarter-home-plug-with-energy-meter.png

+ 1
- 0
code/espurna/config/arduino.h View File

@ -96,6 +96,7 @@
//#define JINVOO_VALVE_SM_AW713
//#define JORGEGARCIA_WIFI_RELAYS
//#define KMC_70011
//#define KOGAN_SMARTER_HOME_PLUG_W_POW
//#define LINGAN_SWA1
//#define LINKSPRITE_LINKNODE_R4
//#define LITESUN_LA_WF3


+ 48
- 0
code/espurna/config/hardware.h View File

@ -4211,6 +4211,54 @@
#define SENSOR_ENERGY_UNITS ENERGY_KWH
#define SENSOR_POWER_UNITS POWER_WATTS
// -----------------------------------------------------------------------------
// Kogan Smarter Home Plug with Energy Meter (Australia)
// Product code: KASPEMHA
// https://www.kogan.com/au/buy/kogan-smarterhome-smart-plug-energy-meter/
// Reflashing from original Tuya firmware
// to thirdparty firmware like espurna by:
// https://github.com/ct-Open-Source/tuya-convert
// -----------------------------------------------------------------------------
#elif defined(KOGAN_SMARTER_HOME_PLUG_W_POW)
// Info
#define MANUFACTURER "KOGAN"
#define DEVICE "SMARTER_HOME_PLUG_W_POW"
// Buttons
#define BUTTON1_PIN 0
#define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH | BUTTON_SET_PULLUP
#define BUTTON1_RELAY 1
// Relays
#define RELAY1_PIN 14
#define RELAY1_TYPE RELAY_TYPE_NORMAL
// LED
// Red
#define LED1_PIN 13
#define LED1_MODE LED_MODE_WIFI
#define LED1_PIN_INVERSE 1
// Blue connected to relay
// HLW8012
#ifndef HLW8012_SUPPORT
#define HLW8012_SUPPORT 1
#endif
#define HLW8012_SEL_PIN 12
#define HLW8012_CF1_PIN 5
#define HLW8012_CF_PIN 4
#define HLW8012_SEL_CURRENT LOW
#define HLW8012_CURRENT_RATIO 25740
#define HLW8012_VOLTAGE_RATIO 282060
#define HLW8012_POWER_RATIO 3414290
#define HLW8012_INTERRUPT_ON FALLING
#define SENSOR_ENERGY_UNITS ENERGY_KWH
#define SENSOR_POWER_UNITS POWER_WATTS
// -----------------------------------------------------------------------------
// LSC Smart LED Light Strip (Smart CXonnect Series) available ACTION (Germany)
// https://www.action.com/de-de/p/lsc-smart-connect-intelligenter-multicolor-led-strip-/


+ 10
- 0
code/platformio.ini View File

@ -1716,6 +1716,16 @@ build_flags = ${common.build_flags_1m0m} -DHYKKER_SMART_HOME_POWER_PLUG
upload_port = ${common.ota_upload_port}
upload_flags = ${common.ota_upload_flags}
[env:kogan-smarter-home-plug-w-pow]
board = ${common.board_1m}
build_flags = ${common.build_flags_1m0m} -DKOGAN_SMARTER_HOME_PLUG_W_POW
[env:kogan-smarter-home-plug-w-pow-ota]
board = ${common.board_1m}
build_flags = ${common.build_flags_1m0m} -DKOGAN_SMARTER_HOME_PLUG_W_POW
upload_port = ${common.ota_upload_port}
upload_flags = ${common.ota_upload_flags}
[env:lsc-smart-led-light-strip]
board = ${common.board_1m}
build_flags = ${common.build_flags_1m0m} -DLSC_SMART_LED_LIGHT_STRIP


BIN
images/devices/kogan-smarter-home-plug-with-energy-meter.png View File

Before After
Width: 542  |  Height: 799  |  Size: 55 KiB

Loading…
Cancel
Save