mirror of
https://github.com/xoseperez/espurna.git
synced 2026-03-14 12:17:11 +01:00
Merged in farva/espurna/dev (pull request #36)
Add support for Xenon SM-PW702U Wifi Smart Outlet Approved-by: Xose Pérez <xose.perez@gmail.com>
This commit is contained in:
9
code/.gitignore
vendored
9
code/.gitignore
vendored
@@ -1,4 +1,5 @@
|
||||
.clang_complete
|
||||
.gcc-flags.json
|
||||
.pioenvs
|
||||
.piolibdeps
|
||||
.clang_complete
|
||||
.gcc-flags.json
|
||||
.pioenvs
|
||||
.piolibdeps
|
||||
.vscode/c_cpp_properties.json
|
||||
|
||||
14
code/.vscode/launch.json
vendored
Normal file
14
code/.vscode/launch.json
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "gdb",
|
||||
"request": "launch",
|
||||
"cwd": "${workspaceRoot}",
|
||||
"name": "PlatformIO Debugger",
|
||||
"target": "c:/Users/Josh/espdev/espurna/code/.pioenvs/nodemcu-lolin/firmware.elf",
|
||||
"gdbpath": "C:/Users/Josh/.platformio/penv/Scripts/piodebuggdb",
|
||||
"autorun": [ "source .pioinit" ]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -49,6 +49,7 @@
|
||||
//#define MANCAVEMADE_ESPLIVE
|
||||
//#define INTERMITTECH_QUINLED
|
||||
//#define ARILUX_AL_LC06
|
||||
//#define SM_PW702U
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Features (values below are non-default values)
|
||||
|
||||
@@ -1113,6 +1113,29 @@
|
||||
#define LIGHT_CH4_INVERSE 0
|
||||
#define LIGHT_CH5_INVERSE 0
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// XENON SM-PW701U
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
#elif defined(SM_PW702U)
|
||||
|
||||
// Info
|
||||
#define MANUFACTURER "XENON"
|
||||
#define DEVICE "SM-PW702U"
|
||||
|
||||
// Buttons
|
||||
#define BUTTON1_PIN 13
|
||||
#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 4
|
||||
#define LED1_PIN_INVERSE 1
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Unknown hardware
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
@@ -531,6 +531,16 @@ void hwUpwardsCompatibility() {
|
||||
setSetting("chLogic", 5, 0);
|
||||
setSetting("relays", 1);
|
||||
|
||||
#elif defined(SM_PW702U)
|
||||
|
||||
setSetting("board", 39);
|
||||
setSetting("ledGPIO", 1, 4);
|
||||
setSetting("ledLogic", 1, 0);
|
||||
setSetting("btnGPIO", 1, 13);
|
||||
setSetting("btnRelay", 1, 1);
|
||||
setSetting("relayGPIO", 1, 12);
|
||||
setSetting("relayType", 1, RELAY_TYPE_NORMAL);
|
||||
|
||||
#else
|
||||
|
||||
#error "UNSUPPORTED HARDWARE!"
|
||||
|
||||
@@ -1003,6 +1003,29 @@ upload_port = "192.168.4.1"
|
||||
upload_flags = --auth=fibonacci --port 8266
|
||||
monitor_baud = 115200
|
||||
|
||||
[env:sm_pw702u]
|
||||
platform = espressif8266
|
||||
framework = arduino
|
||||
board = esp12e
|
||||
board_flash_mode = dout
|
||||
lib_deps = ${common.lib_deps}
|
||||
lib_ignore = ${common.lib_ignore}
|
||||
build_flags = ${common.build_flags_1m} -DSM_PW702U
|
||||
monitor_baud = 115200
|
||||
|
||||
[env:sm_pw702u-ota]
|
||||
platform = espressif8266
|
||||
framework = arduino
|
||||
board = esp12e
|
||||
board_flash_mode = dout
|
||||
lib_deps = ${common.lib_deps}
|
||||
lib_ignore = ${common.lib_ignore}
|
||||
build_flags = ${common.build_flags_1m} -DSM_PW702U
|
||||
upload_speed = 115200
|
||||
upload_port = "192.168.4.1"
|
||||
upload_flags = --auth=fibonacci --port 8266
|
||||
monitor_baud = 115200
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# GENERIC OTA ENVIRONMENTS
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user