diff --git a/code/espurna/config/hardware.h b/code/espurna/config/hardware.h index fe35cd67..4c50b0e6 100644 --- a/code/espurna/config/hardware.h +++ b/code/espurna/config/hardware.h @@ -63,26 +63,32 @@ // ESPurna // ----------------------------------------------------------------------------- -#elif defined(TINKERMAN_ESPURNA_H) +#elif defined(TINKERMAN_ESPURNA_H06) // Info #define MANUFACTURER "TINKERMAN" - #define DEVICE "ESPURNA_H" + #define DEVICE "ESPURNA_H06" // Buttons #define BUTTON1_PIN 4 #define BUTTON1_RELAY 1 - // Normal pushbutton - //#define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH + #ifdef USE_TOUCH_BUTTON - // Touch button - #define BUTTON1_MODE BUTTON_PUSHBUTTON - #define BUTTON1_PRESS BUTTON_MODE_TOGGLE - #define BUTTON1_CLICK BUTTON_MODE_NONE - #define BUTTON1_DBLCLICK BUTTON_MODE_NONE - #define BUTTON1_LNGCLICK BUTTON_MODE_NONE - #define BUTTON1_LNGLNGCLICK BUTTON_MODE_NONE + // Touch button + #define BUTTON1_MODE BUTTON_PUSHBUTTON + #define BUTTON1_PRESS BUTTON_MODE_TOGGLE + #define BUTTON1_CLICK BUTTON_MODE_NONE + #define BUTTON1_DBLCLICK BUTTON_MODE_NONE + #define BUTTON1_LNGCLICK BUTTON_MODE_NONE + #define BUTTON1_LNGLNGCLICK BUTTON_MODE_NONE + + #else + + // Normal pushbutton + #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH + + #endif // Relays @@ -99,6 +105,47 @@ #define HLW8012_CF1_PIN 13 #define HLW8012_CF_PIN 14 +#elif defined(TINKERMAN_ESPURNA_H07) + + // Info + #define MANUFACTURER "TINKERMAN" + #define DEVICE "ESPURNA_H07" + + // Buttons + #define BUTTON1_PIN 4 + #define BUTTON1_RELAY 1 + + #ifdef USE_TOUCH_BUTTON + + // Touch button + #define BUTTON1_MODE BUTTON_PUSHBUTTON + #define BUTTON1_PRESS BUTTON_MODE_TOGGLE + #define BUTTON1_CLICK BUTTON_MODE_NONE + #define BUTTON1_DBLCLICK BUTTON_MODE_NONE + #define BUTTON1_LNGCLICK BUTTON_MODE_NONE + #define BUTTON1_LNGLNGCLICK BUTTON_MODE_NONE + + #else + + // Normal pushbutton + #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH + + #endif + + // Relays + #define RELAY1_PIN 12 + #define RELAY1_TYPE RELAY_TYPE_NORMAL + + // LEDs + #define LED1_PIN 2 + #define LED1_PIN_INVERSE 0 + + // HLW8012 + #define POWER_PROVIDER POWER_PROVIDER_HLW8012 + #define HLW8012_SEL_PIN 5 + #define HLW8012_CF1_PIN 13 + #define HLW8012_CF_PIN 14 + // ----------------------------------------------------------------------------- // Itead Studio boards // ----------------------------------------------------------------------------- diff --git a/code/espurna/hardware.ino b/code/espurna/hardware.ino index d11f6a7d..4b0b1095 100644 --- a/code/espurna/hardware.ino +++ b/code/espurna/hardware.ino @@ -252,7 +252,7 @@ void hwUpwardsCompatibility() { setSetting("relayGPIO", 1, 12); setSetting("relayType", 1, RELAY_TYPE_NORMAL); - #elif defined(TINKERMAN_ESPURNA_H) + #elif defined(TINKERMAN_ESPURNA_H06) setSetting("board", 23); setSetting("ledGPIO", 1, 5); @@ -442,6 +442,19 @@ void hwUpwardsCompatibility() { setSetting("board", 38); + #elif defined(TINKERMAN_ESPURNA_H07) + + setSetting("board", 39); + setSetting("ledGPIO", 1, 2); + setSetting("ledLogic", 1, 0); + setSetting("btnGPIO", 1, 4); + setSetting("btnRelay", 1, 1); + setSetting("relayGPIO", 1, 12); + setSetting("relayType", 1, RELAY_TYPE_NORMAL); + setSetting("selGPIO", 5); + setSetting("cf1GPIO", 13); + setSetting("cfGPIO", 14); + #else #error "UNSUPPORTED HARDWARE!" diff --git a/code/html/index.html b/code/html/index.html index 1e7dc867..e1a34fe1 100644 --- a/code/html/index.html +++ b/code/html/index.html @@ -401,12 +401,6 @@
Fahrenheit (°F)
-
- -
-
-
- @@ -475,6 +469,12 @@
This name address of the NoFUSS server for automatic remote updates (see https://bitbucket.org/xoseperez/nofuss).
+
+ +
+
+
+
diff --git a/code/platformio.ini b/code/platformio.ini index 912b203b..2219350f 100644 --- a/code/platformio.ini +++ b/code/platformio.ini @@ -100,23 +100,45 @@ monitor_baud = 115200 # ------------------------------------------------------------------------------ -[env:tinkerman-espurna-h] +[env:tinkerman-espurna-h06] platform = espressif8266 framework = arduino board = esp12e lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -build_flags = ${common.build_flags} -DTINKERMAN_ESPURNA_H +build_flags = ${common.build_flags} -DTINKERMAN_ESPURNA_H06 upload_speed = 460800 monitor_baud = 115200 -[env:tinkerman-espurna-h-ota] +[env:tinkerman-espurna-h06-ota] platform = espressif8266 framework = arduino board = esp12e lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -build_flags = ${common.build_flags} -DTINKERMAN_ESPURNA_H +build_flags = ${common.build_flags} -DTINKERMAN_ESPURNA_H06 +upload_speed = 115200 +upload_port = "192.168.4.1" +upload_flags = --auth=fibonacci --port 8266 +monitor_baud = 115200 + +[env:tinkerman-espurna-h07] +platform = espressif8266 +framework = arduino +board = esp12e +lib_deps = ${common.lib_deps} +lib_ignore = ${common.lib_ignore} +build_flags = ${common.build_flags} -DTINKERMAN_ESPURNA_H07 +upload_speed = 460800 +monitor_baud = 115200 + +[env:tinkerman-espurna-h07-ota] +platform = espressif8266 +framework = arduino +board = esp12e +lib_deps = ${common.lib_deps} +lib_ignore = ${common.lib_ignore} +build_flags = ${common.build_flags} -DTINKERMAN_ESPURNA_H07 upload_speed = 115200 upload_port = "192.168.4.1" upload_flags = --auth=fibonacci --port 8266