From 700e51b0914816d0fe4277e58338122422549efa Mon Sep 17 00:00:00 2001 From: Theo Arends Date: Sun, 13 Aug 2017 13:11:44 +0200 Subject: [PATCH] Add Sonoff B1 b using different pins --- sonoff/_releasenotes.ino | 2 +- sonoff/sonoff.ino | 4 ++-- sonoff/sonoff_template.h | 18 +++++++++++++++++- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/sonoff/_releasenotes.ino b/sonoff/_releasenotes.ino index f85a28622..3cdd9e4ec 100644 --- a/sonoff/_releasenotes.ino +++ b/sonoff/_releasenotes.ino @@ -1,4 +1,4 @@ -/* 5.5.2d +/* 5.5.2e * Fix Sonoff Pow intermittent exception 0 * Change Sonoff Pow sending Domoticz telemetry data only * Add Sonoff B1 support (experimental) diff --git a/sonoff/sonoff.ino b/sonoff/sonoff.ino index 86d85ae11..5ae0e505e 100644 --- a/sonoff/sonoff.ino +++ b/sonoff/sonoff.ino @@ -25,7 +25,7 @@ - Select IDE Tools - Flash Size: "1M (no SPIFFS)" ====================================================*/ -#define VERSION 0x05050204 // 5.5.2d +#define VERSION 0x05050205 // 5.5.2e enum log_t {LOG_LEVEL_NONE, LOG_LEVEL_ERROR, LOG_LEVEL_INFO, LOG_LEVEL_DEBUG, LOG_LEVEL_DEBUG_MORE, LOG_LEVEL_ALL}; enum week_t {Last, First, Second, Third, Fourth}; @@ -2633,7 +2633,7 @@ void GPIO_init() else if (SONOFF_LED == sysCfg.module) { sfl_flg = 2; } - else if (SONOFF_B1 == sysCfg.module) { + else if ((SONOFF_B1 == sysCfg.module) || (SONOFF_B1b == sysCfg.module)) { sfl_flg = 5; } else { diff --git a/sonoff/sonoff_template.h b/sonoff/sonoff_template.h index 7ceea9263..0c1a1a569 100644 --- a/sonoff/sonoff_template.h +++ b/sonoff/sonoff_template.h @@ -152,6 +152,7 @@ enum module_t { HUAFAN_SS, SONOFF_BRIDGE, SONOFF_B1, + SONOFF_B1b, MAXMODULE }; /********************************************************************************************/ @@ -507,7 +508,22 @@ const mytmplt modules[MAXMODULE] PROGMEM = { GPIO_DCKI, // GPIO14 my9231 DCKI 0, 0, 0 + }, + { "Sonoff B1 b", // Sonoff B1 (ESP8285 - my9231) + GPIO_KEY1, // GPIO00 Pad + GPIO_USER, // GPIO01 Serial RXD and Optional sensor pad + GPIO_USER, // GPIO02 Optional sensor SDA pad + GPIO_USER, // GPIO03 Serial TXD and Optional sensor pad + 0, 0, + 0, 0, 0, // Flash connection + 0, 0, + 0, // Flash connection + 0, + GPIO_DI, // GPIO13 my9231 DI + 0, + GPIO_DCKI, // GPIO15 my9231 DCKI + 0, 0 } - + };