From 42aa66e02fdf4d8fb5fbe81ee3e3deb47e517773 Mon Sep 17 00:00:00 2001 From: Joel Stein Date: Fri, 19 Oct 2018 17:11:30 +0200 Subject: [PATCH 1/3] obi-socket: allow user-configuration of free GPIOs --- sonoff/sonoff_template.h | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/sonoff/sonoff_template.h b/sonoff/sonoff_template.h index ad2a44e6b..0faf0c5f4 100644 --- a/sonoff/sonoff_template.h +++ b/sonoff/sonoff_template.h @@ -1102,14 +1102,17 @@ const mytmplt kModules[MAXMODULE] PROGMEM = { GPIO_REL1_INV, // GPIO16 Green Led 1 (0 = On, 1 = Off) }, { "OBI Socket", // OBI socket (ESP8266) - https://www.obi.de/hausfunksteuerung/wifi-stecker-schuko/p/2291706 - 0, 0, 0, 0, - GPIO_LED1, // GPIO04 LED on top and in switch button - GPIO_REL1, // GPIO05 Relay 1 (0 = Off, 1 = On) + GPIO_USER, // GPIO00 + 0,0,0, + GPIO_LED1, // GPIO04 Blue LED + GPIO_REL1, // GPIO05 (Relay OFF, but used as Relay Switch) 0, 0, 0, 0, 0, 0, // Flash connection - GPIO_LED2, // GPIO12 - 0, // GPIO13 - GPIO_KEY1, // GPIO14 switch button - 0, 0, 0 + GPIO_LED4, // GPIO12 (Relay ON, but set to LOW, so we can switch with GPIO05) + GPIO_USER, // GPIO13 + GPIO_KEY1, // GPIO14 Button + 0, + GPIO_USER, // GPIO16 + GPIO_ADC0 // Analog input }, { "Teckin", // https://www.amazon.de/gp/product/B07D5V139R 0, From 0078b9f650987e01849aa6df6ebb78cb3cb24519 Mon Sep 17 00:00:00 2001 From: Joel Stein Date: Fri, 19 Oct 2018 18:12:09 +0200 Subject: [PATCH 2/3] remove ADC0 --- sonoff/sonoff_template.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonoff/sonoff_template.h b/sonoff/sonoff_template.h index 0faf0c5f4..8de1a301e 100644 --- a/sonoff/sonoff_template.h +++ b/sonoff/sonoff_template.h @@ -1112,7 +1112,7 @@ const mytmplt kModules[MAXMODULE] PROGMEM = { GPIO_KEY1, // GPIO14 Button 0, GPIO_USER, // GPIO16 - GPIO_ADC0 // Analog input + GPIO_USER // Analog input }, { "Teckin", // https://www.amazon.de/gp/product/B07D5V139R 0, From df5a7ec05414344bad9e6fedc8128fa7b00e0ac4 Mon Sep 17 00:00:00 2001 From: Joel Stein Date: Fri, 19 Oct 2018 19:10:55 +0200 Subject: [PATCH 3/3] obi-socket: change LED4 back to LED2 --- sonoff/sonoff_template.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonoff/sonoff_template.h b/sonoff/sonoff_template.h index 8de1a301e..bb19d2dc5 100644 --- a/sonoff/sonoff_template.h +++ b/sonoff/sonoff_template.h @@ -1107,7 +1107,7 @@ const mytmplt kModules[MAXMODULE] PROGMEM = { GPIO_LED1, // GPIO04 Blue LED GPIO_REL1, // GPIO05 (Relay OFF, but used as Relay Switch) 0, 0, 0, 0, 0, 0, // Flash connection - GPIO_LED4, // GPIO12 (Relay ON, but set to LOW, so we can switch with GPIO05) + GPIO_LED2, // GPIO12 (Relay ON, but set to LOW, so we can switch with GPIO05) GPIO_USER, // GPIO13 GPIO_KEY1, // GPIO14 Button 0,