Browse Source

Add itead-sonoff-s31-lite (#1830)

This adds a hardware profile for the S31 "Lite" version, which does not have the power monitoring chip installed on the board. The device is otherwise identical. It uses the exact same board and components as the regular S31.

Signed-off-by: Michael Murton <6764025+CrazyIvan359@users.noreply.github.com>
master
Max Prokhorov 5 years ago
committed by GitHub
parent
commit
c8547fa728
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 30 additions and 0 deletions
  1. +1
    -0
      code/espurna/config/arduino.h
  2. +19
    -0
      code/espurna/config/hardware.h
  3. +10
    -0
      code/platformio.ini

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

@ -73,6 +73,7 @@
//#define ITEAD_SONOFF_RF //#define ITEAD_SONOFF_RF
//#define ITEAD_SONOFF_RFBRIDGE //#define ITEAD_SONOFF_RFBRIDGE
//#define ITEAD_SONOFF_S31 //#define ITEAD_SONOFF_S31
//#define ITEAD_SONOFF_S31_LITE
//#define ITEAD_SONOFF_SV //#define ITEAD_SONOFF_SV
//#define ITEAD_SONOFF_T1_1CH //#define ITEAD_SONOFF_T1_1CH
//#define ITEAD_SONOFF_T1_2CH //#define ITEAD_SONOFF_T1_2CH


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

@ -900,6 +900,25 @@
#define CSE7766_SUPPORT 1 #define CSE7766_SUPPORT 1
#define CSE7766_PIN 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) #elif defined(ITEAD_SONOFF_IFAN02)
// Info // Info


+ 10
- 0
code/platformio.ini View File

@ -554,6 +554,16 @@ build_flags = ${common.build_flags_1m0m} -DITEAD_SONOFF_S31 -DDISABLE_POSTMORTEM
upload_port = ${common.ota_upload_port} upload_port = ${common.ota_upload_port}
upload_flags = ${common.ota_upload_flags} 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] [env:itead-sonoff-ifan02]
board = ${common.board_1m} board = ${common.board_1m}
build_flags = ${common.build_flags_1m0m} -DITEAD_SONOFF_IFAN02 build_flags = ${common.build_flags_1m0m} -DITEAD_SONOFF_IFAN02


Loading…
Cancel
Save