From b1d34885b1cf1befdbfeabef9217a212bcf36b45 Mon Sep 17 00:00:00 2001 From: Vencislav Atanasov Date: Mon, 16 Dec 2019 13:07:01 +0200 Subject: [PATCH] Add support for eHomeDIY devices. (#2046) We have created a few dozens of devices, released as open-source hardware and published the schematics to GitHub. We're planning to organize some small (10-15 people) workshops on how to assemble, flash and configure these board. https://github.com/eHomeDIY --- code/espurna/config/arduino.h | 2 ++ code/espurna/config/hardware.h | 34 ++++++++++++++++++++++++++++++++++ code/platformio.ini | 20 ++++++++++++++++++++ 3 files changed, 56 insertions(+) diff --git a/code/espurna/config/arduino.h b/code/espurna/config/arduino.h index 16c0a58a..d5806215 100644 --- a/code/espurna/config/arduino.h +++ b/code/espurna/config/arduino.h @@ -27,6 +27,8 @@ //#define BLITZWOLF_BWSHPX_V23 //#define BLITZWOLF_BWSHP5 //#define DIGOO_NX_SP202 +//#define EHOMEDIY_WT02 +//#define EHOMEDIY_WT03 //#define ELECTRODRAGON_WIFI_IOT //#define ESPURNA_BASE //#define ESPURNA_CORE diff --git a/code/espurna/config/hardware.h b/code/espurna/config/hardware.h index bd878f4d..d1c381ec 100644 --- a/code/espurna/config/hardware.h +++ b/code/espurna/config/hardware.h @@ -4166,6 +4166,40 @@ #define SENSOR_ENERGY_UNITS ENERGY_KWH #define SENSOR_POWER_UNITS POWER_WATTS + +// ----------------------------------------------------------------------------- +// eHomeDIY WT02 +// https://github.com/eHomeDIY/WT02-hardware +// ----------------------------------------------------------------------------- +#elif defined(EHOMEDIY_WT02) + + // Info + #define MANUFACTURER "EHOMEDIY" + #define DEVICE "WT02" + + #define I2C_SDA_PIN 0 + #define I2C_SCL_PIN 2 + + #define BMX280_SUPPORT 1 + // #define SI7021_SUPPORT 1 + +// ----------------------------------------------------------------------------- +// eHomeDIY WT03 +// https://github.com/eHomeDIY/WT03-hardware +// ----------------------------------------------------------------------------- + +#elif defined(EHOMEDIY_WT03) + + // Info + #define MANUFACTURER "EHOMEDIY" + #define DEVICE "WT03" + + #define I2C_SDA_PIN 2 + #define I2C_SCL_PIN 0 + + #define BMX280_SUPPORT 1 + // #define SI7021_SUPPORT 1 + // ----------------------------------------------------------------------------- // Linksprite R4 // http://linksprite.com/wiki/index.php?title=LinkNode_R4:_Arduino-compatible_WiFi_relay_controller diff --git a/code/platformio.ini b/code/platformio.ini index 4599b33d..0b524e19 100644 --- a/code/platformio.ini +++ b/code/platformio.ini @@ -1702,3 +1702,23 @@ board = ${common.board_4m} build_flags = ${common.build_flags_4m1m} -DLINKSPRITE_LINKNODE_R4 upload_port = ${common.ota_upload_port} upload_flags = ${common.ota_upload_flags} + +[env:ehomediy-wt02] +board = ${common.board_1m} +build_flags = ${common.build_flags_1m0m} -DEHOMEDIY_WT02 + +[env:ehomediy-wt02-ota] +board = ${common.board_1m} +build_flags = ${common.build_flags_1m0m} -DEHOMEDIY_WT02 +upload_port = ${common.ota_upload_port} +upload_flags = ${common.ota_upload_flags} + +[env:ehomediy-wt03] +board = ${common.board_1m} +build_flags = ${common.build_flags_1m0m} -DEHOMEDIY_WT03 + +[env:ehomediy-wt03-ota] +board = ${common.board_1m} +build_flags = ${common.build_flags_1m0m} -DEHOMEDIY_WT03 +upload_port = ${common.ota_upload_port} +upload_flags = ${common.ota_upload_flags}