Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Sonoff Itead S31 Lite Hardware Profile #1830

Merged
merged 2 commits into from
Aug 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions code/espurna/config/arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 19 additions & 0 deletions code/espurna/config/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions code/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down