From dfb0cfb717dbbba1d3cb4af9d08f2e7f49149806 Mon Sep 17 00:00:00 2001 From: Michael Murton <6764025+CrazyIvan359@users.noreply.github.com> Date: Sat, 20 Jul 2019 09:26:59 -0400 Subject: [PATCH 1/2] add s31-lite hardware profile Signed-off-by: Michael Murton <6764025+CrazyIvan359@users.noreply.github.com> --- code/espurna/config/hardware.h | 19 +++++++++++++++++++ code/platformio.ini | 10 ++++++++++ 2 files changed, 29 insertions(+) diff --git a/code/espurna/config/hardware.h b/code/espurna/config/hardware.h index f296dc39..cd9667e4 100644 --- a/code/espurna/config/hardware.h +++ b/code/espurna/config/hardware.h @@ -900,6 +900,25 @@ #define CSE7766_SUPPORT 1 #define CSE7766_PIN 1 +#elif defined(ITEAD_SONOFF_S31_LITE) + + // Info + #define MANUFACTURER "ITEAD" + #define DEVICE "SONOFF_S31_LITE" + + // Buttons + #define BUTTON1_PIN 0 + #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH + #define BUTTON1_RELAY 1 + + // Relays + #define RELAY1_PIN 12 + #define RELAY1_TYPE RELAY_TYPE_NORMAL + + // LEDs + #define LED1_PIN 13 + #define LED1_PIN_INVERSE 1 + #elif defined(ITEAD_SONOFF_IFAN02) // Info diff --git a/code/platformio.ini b/code/platformio.ini index a1f60f5a..a591a7ce 100644 --- a/code/platformio.ini +++ b/code/platformio.ini @@ -554,6 +554,16 @@ build_flags = ${common.build_flags_1m0m} -DITEAD_SONOFF_S31 -DDISABLE_POSTMORTEM upload_port = ${common.ota_upload_port} upload_flags = ${common.ota_upload_flags} +[env:itead-sonoff-s31-lite] +board = ${common.board_1m} +build_flags = ${common.build_flags_1m0m} -DITEAD_SONOFF_S31_LITE + +[env:itead-sonoff-s31-lite-ota] +board = ${common.board_1m} +build_flags = ${common.build_flags_1m0m} -DITEAD_SONOFF_S31_LITE +upload_port = ${common.ota_upload_port} +upload_flags = ${common.ota_upload_flags} + [env:itead-sonoff-ifan02] board = ${common.board_1m} build_flags = ${common.build_flags_1m0m} -DITEAD_SONOFF_IFAN02 From e49e538ce3f678ba15cad63d56f8956bde27c0f4 Mon Sep 17 00:00:00 2001 From: Max Prokhorov Date: Mon, 5 Aug 2019 18:46:35 +0300 Subject: [PATCH 2/2] Update arduino.h --- code/espurna/config/arduino.h | 1 + 1 file changed, 1 insertion(+) diff --git a/code/espurna/config/arduino.h b/code/espurna/config/arduino.h index dcdec570..c6c725b6 100644 --- a/code/espurna/config/arduino.h +++ b/code/espurna/config/arduino.h @@ -73,6 +73,7 @@ //#define ITEAD_SONOFF_RF //#define ITEAD_SONOFF_RFBRIDGE //#define ITEAD_SONOFF_S31 +//#define ITEAD_SONOFF_S31_LITE //#define ITEAD_SONOFF_SV //#define ITEAD_SONOFF_T1_1CH //#define ITEAD_SONOFF_T1_2CH