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

Added support for Itead Sonoff POW R3 #2506

Merged
merged 4 commits into from
May 6, 2022
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 @@ -97,6 +97,7 @@
//#define ITEAD_SONOFF_MINI
//#define ITEAD_SONOFF_POW
//#define ITEAD_SONOFF_POW_R2
//#define ITEAD_SONOFF_POW_R3
//#define ITEAD_SONOFF_RF
//#define ITEAD_SONOFF_RFBRIDGE
//#define ITEAD_SONOFF_S31
Expand Down
28 changes: 28 additions & 0 deletions code/espurna/config/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,34 @@
#endif
#define CSE7766_RX_PIN 3

#elif defined(ITEAD_SONOFF_POW_R3)

// Info
#define MANUFACTURER "ITEAD"
#define DEVICE "SONOFF_POW_R3"

// Buttons
#define BUTTON1_PIN 0
#define BUTTON1_CONFIG BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
#define BUTTON1_RELAY 1

// Relays
#define RELAY1_PIN 12
#define RELAY1_TYPE RELAY_TYPE_INVERSE

// LEDs
#define LED1_PIN 13
#define LED1_PIN_INVERSE 1

// Disable UART noise
#define DEBUG_SERIAL_SUPPORT 0

// CSE7766
#ifndef CSE7766_SUPPORT
#define CSE7766_SUPPORT 1
#endif
#define CSE7766_RX_PIN 3

#elif defined(ITEAD_SONOFF_DUAL)

// Info
Expand Down
4 changes: 4 additions & 0 deletions code/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,10 @@ build_src_flags = -DITEAD_SONOFF_POW
extends = env:esp8266-1m-base
build_src_flags = -DITEAD_SONOFF_POW_R2 -DDISABLE_POSTMORTEM_STACKDUMP

[env:itead-sonoff-pow-r3]
extends = env:esp8266-1m-base
build_src_flags = -DITEAD_SONOFF_POW_R3 -DDISABLE_POSTMORTEM_STACKDUMP

[env:itead-sonoff-dual]
extends = env:esp8266-1m-base
build_src_flags = -DITEAD_SONOFF_DUAL -DDISABLE_POSTMORTEM_STACKDUMP
Expand Down
3 changes: 3 additions & 0 deletions code/platformio_ota.ini
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ extends = env:itead-sonoff-pow
[env:itead-sonoff-pow-r2-ota]
extends = env:itead-sonoff-pow-r2

[env:itead-sonoff-pow-r3-ota]
extends = env:itead-sonoff-pow-r3

[env:itead-sonoff-dual-ota]
extends = env:itead-sonoff-dual

Expand Down