From c5f68235700b4447198a9508b709c3e254676114 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Tue, 8 Jan 2019 16:27:16 +0100 Subject: [PATCH] Add two modules * Add support for OBI Power Socket 2 (#4829) * Add support for YTF IR Bridge (#4855) --- sonoff/_changelog.ino | 2 ++ sonoff/sonoff_template.h | 57 +++++++++++++++++++++++++++------------- 2 files changed, 41 insertions(+), 18 deletions(-) diff --git a/sonoff/_changelog.ino b/sonoff/_changelog.ino index 1daabeaca..00e3701f4 100644 --- a/sonoff/_changelog.ino +++ b/sonoff/_changelog.ino @@ -3,6 +3,8 @@ * Add command SetOption62 1 to force no Button/Switch pullup on dedicated modules. Currently only supported on Shelly2 (#4841) * Fix Display exception 28 when JSON value is NULL received * Fix Home Assistant Sensor Discovery Software Watchdog restart (#4831) + * Add support for OBI Power Socket 2 (#4829) + * Add support for YTF IR Bridge (#4855) * * 6.4.1.7 20190106 * Fix HLW8012, HJL01 and BL0937 based energy sensors low Power (below 10W) measurement regression from 6.4.1.6 diff --git a/sonoff/sonoff_template.h b/sonoff/sonoff_template.h index 2ac21b2b3..761817e2a 100644 --- a/sonoff/sonoff_template.h +++ b/sonoff/sonoff_template.h @@ -273,6 +273,8 @@ enum SupportedModules { PS_16_DZ, TECKIN_US, MANZOKU_EU_4, + OBI2, + YTF_IR_BRIDGE, MAXMODULE }; /********************************************************************************************/ @@ -544,6 +546,7 @@ const uint8_t kModuleNiceList[MAXMODULE] PROGMEM = { SK03_TUYA, NEO_COOLCAM, // Socket Relay Devices OBI, + OBI2, MANZOKU_EU_4, ESP_SWITCH, // Switch Devices TUYA_DIMMER, // Dimmer Devices @@ -559,6 +562,7 @@ const uint8_t kModuleNiceList[MAXMODULE] PROGMEM = { KMC_70011, AILIGHT, // Light Bulbs PHILIPS, + YTF_IR_BRIDGE, WITTY, // Development Devices WEMOS }; @@ -1654,6 +1658,41 @@ const mytmplt kModules[MAXMODULE] PROGMEM = { 0, GPIO_USER, // GPIO16 0 + }, + { "OBI Socket 2", // OBI socket (ESP8266) - https://www.obi.de/hausfunksteuerung/wifi-stecker-schuko-2-stueck-weiss/p/4077673 + 0, // GPIO00 + 0, // GPIO01 Serial RXD + 0, + 0, // GPIO03 Serial TXD + GPIO_REL1, // GPIO04 Relay 1 + GPIO_KEY1, // GPIO05 Button + // GPIO06 (SD_CLK Flash) + // GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT) + // GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT) + 0, // GPIO09 (SD_DATA2 Flash QIO or ESP8285) + 0, // GPIO10 (SD_DATA3 Flash QIO or ESP8285) + // GPIO11 (SD_CMD Flash) + GPIO_LED1, // GPIO12 Green LED - Link status + GPIO_LED2, // GPIO13 Red LED - Power status + 0, 0, 0, 0 + }, + { "YTF IR Bridge", // https://www.aliexpress.com/item/Tuya-universal-Smart-IR-Hub-remote-control-Voice-Control-AC-TV-Work-With-Alexa-Google-Home/32951202513.html + GPIO_USER, // GPIO00 + GPIO_USER, // GPIO01 Serial RXD + GPIO_USER, // GPIO02 + GPIO_USER, // GPIO03 Serial TXD + GPIO_LED1_INV, // GPIO04 Blue Led - Link status + GPIO_IRRECV, // GPIO05 IR Receiver + // GPIO06 (SD_CLK Flash) + // GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT) + // GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT) + 0, // GPIO09 (SD_DATA2 Flash QIO or ESP8285) + 0, // GPIO10 (SD_DATA3 Flash QIO or ESP8285) + // GPIO11 (SD_CMD Flash) + 0, // GPIO12 + GPIO_KEY1, // GPIO13 Button + GPIO_IRSEND, // GPIO14 IR Transmitter + 0, 0, 0 } }; @@ -1679,24 +1718,6 @@ const mytmplt kModules[MAXMODULE] PROGMEM = { 0, 0, 0 } - { "OBI Socket 2", // OBI socket (ESP8266) - https://www.obi.de/hausfunksteuerung/wifi-stecker-schuko-2-stueck-weiss/p/4077673 - 0, // GPIO00 - 0, // GPIO01 Serial RXD - 0, - 0, // GPIO03 Serial TXD - GPIO_REL1, // GPIO04 Relay 1 - GPIO_KEY1, // GPIO05 Button - // GPIO06 (SD_CLK Flash) - // GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT) - // GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT) - 0, // GPIO09 (SD_DATA2 Flash QIO or ESP8285) - 0, // GPIO10 (SD_DATA3 Flash QIO or ESP8285) - // GPIO11 (SD_CMD Flash) - GPIO_LED1, // GPIO12 Green LED - Link status - GPIO_LED2, // GPIO13 Red LED - Power status - 0, 0, 0, 0 - } - { "MagicHome", // Magic Home (aka Flux-light) (ESP8266) // https://www.aliexpress.com/item/Magic-Home-Mini-RGB-RGBW-Wifi-Controller-For-Led-Strip-Panel-light-Timing-Function-16million-colors/32686853650.html 0,