Browse Source

Add support for Allnet ESP8266_UP_Relay

rfm69
Markus Bajones 6 years ago
parent
commit
78a807e247
4 changed files with 65 additions and 0 deletions
  1. +1
    -0
      code/espurna/config/arduino.h
  2. +33
    -0
      code/espurna/config/hardware.h
  3. +7
    -0
      code/espurna/migrate.ino
  4. +24
    -0
      code/platformio.ini

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

@ -78,6 +78,7 @@
//#define GENERIC_ESP01S_DS18B20_V10 //#define GENERIC_ESP01S_DS18B20_V10
//#define HELTEC_TOUCHRELAY //#define HELTEC_TOUCHRELAY
//#define ZHILDE_EU44_W //#define ZHILDE_EU44_W
//#define ALLNET_ESP8266_UP
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
// Features (values below are non-default values) // Features (values below are non-default values)


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

@ -1971,6 +1971,39 @@
#define LED1_PIN 1 #define LED1_PIN 1
#define LED1_PIN_INVERSE 1 #define LED1_PIN_INVERSE 1
// -----------------------------------------------------------------------------
// Allnet 4duino ESP8266-UP-Relais
// http://www.allnet.de/de/allnet-brand/produkte/neuheiten/p/allnet-4duino-iot-wlan-relais-unterputz-esp8266-up-relais/
// -----------------------------------------------------------------------------
#elif defined(ALLNET_ESP8266_UP)
// Info
#define MANUFACTURER "ALLNET"
#define DEVICE "ESP8266_UP_Relais"
// Relays
#define RELAY1_PIN 14
#define RELAY1_RESET_PIN 12
#define RELAY1_TYPE RELAY_TYPE_LATCHED
// LEDs
#define LED1_PIN 0
#define LED1_PIN_INVERSE 1
// Buttons
#define BUTTON1_PIN 4
#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
#define BUTTON2_PIN 5
#define BUTTON2_MODE BUTTON_PUSHBUTTON
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// TEST boards (do not use!!) // TEST boards (do not use!!)
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------


+ 7
- 0
code/espurna/migrate.ino View File

@ -905,6 +905,13 @@ void migrate() {
setSetting("relayType", 3, RELAY_TYPE_NORMAL); setSetting("relayType", 3, RELAY_TYPE_NORMAL);
setSetting("relayType", 4, RELAY_TYPE_NORMAL); setSetting("relayType", 4, RELAY_TYPE_NORMAL);
#elif defined(ALLNET_ESP8266_UP)
setSetting("board", 71);
setSetting("relayGPIO", 0, 14);
setSetting("relayResetGPIO", 1, 12);
setSetting("relayType", 0, RELAY_TYPE_LATCHED);
#else #else
// Allow users to define new settings without migration config // Allow users to define new settings without migration config


+ 24
- 0
code/platformio.ini View File

@ -2054,3 +2054,27 @@ upload_speed = 115200
upload_port = "${env.ESPURNA_IP}" upload_port = "${env.ESPURNA_IP}"
upload_flags = --auth=${env.ESPURNA_AUTH} --port 8266 upload_flags = --auth=${env.ESPURNA_AUTH} --port 8266
extra_scripts = ${common.extra_scripts} extra_scripts = ${common.extra_scripts}
[env:allnet-esp8266-up-relay]
platform = ${common.platform}
framework = arduino
board = esp12e
board_flash_mode = dout
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags_1m} -DALLNET_ESP8266_UP
monitor_baud = 115200
extra_scripts = ${common.extra_scripts}
[env:allnet-esp8266-up-relay-ota]
platform = ${common.platform}
framework = arduino
board = esp12e
board_flash_mode = dout
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags_1m} -DALLNET_ESP8266_UP
upload_speed = 115200
upload_port = "${env.ESPURNA_IP}"
upload_flags = --auth=${env.ESPURNA_AUTH} --port 8266
extra_scripts = ${common.extra_scripts}

Loading…
Cancel
Save