Skip to content
Open
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 @@ -30,6 +30,7 @@
//#define EHOMEDIY_WT02
//#define EHOMEDIY_WT03
//#define ELECTRODRAGON_WIFI_IOT
//#define ESP8266_SERIAL
//#define ESPURNA_BASE
//#define ESPURNA_CORE
//#define ETEKCITY_ESW01_USA
Expand Down
20 changes: 20 additions & 0 deletions code/espurna/config/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -4299,6 +4299,26 @@
#define RELAY3_TYPE RELAY_TYPE_NORMAL
#define RELAY4_TYPE RELAY_TYPE_NORMAL

// -----------------------------------------------------------------------------
// ESP8266 Serial, example for use connected to a arduino
//
// -----------------------------------------------------------------------------

#elif defined(ESP8266_SERIAL)

// Info
#define MANUFACTURER "ESP8266"
#define DEVICE "SERIAL"

// Serial to MQTT
#define UART_MQTT_SUPPORT 1
#define UART_MQTT_USE_SOFT 0
#define UART_MQTT_HW_PORT Serial
#define UART_MQTT_BAUDRATE 115200
#define TERMINAL_SUPPORT 0

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at terminal.ino, it never calls Serial.read() unless debug_serial_support flag is on (which is off here).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(this comment was meant to point to the disabled TERMINAL_SUPPORT)

#define DEBUG_SERIAL_SUPPORT 0
#define UART_MQTT_BUFFER_SIZE 256

// -----------------------------------------------------------------------------

#else
Expand Down
6 changes: 5 additions & 1 deletion code/espurna/migrate.ino
Original file line number Diff line number Diff line change
Expand Up @@ -1401,7 +1401,7 @@ void migrate() {

#elif defined(GENERIC_E14)

setSetting("board", 104);
setSetting("board", 105);
setSetting("relayProvider", RELAY_PROVIDER_LIGHT);
setSetting("lightProvider", LIGHT_PROVIDER_DIMMER);
setSetting("chGPIO", 0, 4);
Expand All @@ -1414,6 +1414,10 @@ void migrate() {
setSetting("chLogic", 3, 0);
setSetting("relays", 1);

#elif defined(ESP8266_SERIAL)

setSetting("board", 106);

#else

// Allow users to define new settings without migration config
Expand Down
10 changes: 10 additions & 0 deletions code/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -1736,6 +1736,16 @@ build_flags = ${common.build_flags_4m1m} -DLINKSPRITE_LINKNODE_R4
upload_port = ${common.ota_upload_port}
upload_flags = ${common.ota_upload_flags}

[env:esp8266-serial]
board = ${common.board_4m}
build_flags = ${common.build_flags_4m1m} -DESP8266_SERIAL

[env:esp8266-serial-ota]
board = ${common.board_4m}
build_flags = ${common.build_flags_4m1m} -DESP8266_SERIAL
upload_port = ${common.ota_upload_port}
upload_flags = ${common.ota_upload_flags}

[env:ehomediy-wt02]
board = ${common.board_1m}
build_flags = ${common.build_flags_1m0m} -DEHOMEDIY_WT02
Expand Down