mirror of
https://github.com/xoseperez/espurna.git
synced 2026-03-25 01:27:08 +01:00
Preliminary support for Sonoff B1
This commit is contained in:
@@ -277,6 +277,18 @@
|
||||
#define DUMMY_RELAY_COUNT 6
|
||||
#define TRACK_RELAY_STATUS 0
|
||||
|
||||
#elif defined(SONOFF_B1)
|
||||
|
||||
#define MANUFACTURER "ITEAD"
|
||||
#define DEVICE "SONOFF_B1"
|
||||
#define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
|
||||
#define LIGHT_PROVIDER LIGHT_PROVIDER_MY9192
|
||||
#define DUMMY_RELAY_COUNT 1
|
||||
|
||||
#define MY9291_DI_PIN 13
|
||||
#define MY9291_DCKI_PIN 15
|
||||
#define MY9291_COMMAND MY9291_COMMAND_DEFAULT
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Electrodragon boards
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
@@ -314,6 +314,14 @@ void hwUpwardsCompatibility() {
|
||||
setSetting("relayLogic", 4, 0);
|
||||
#endif
|
||||
|
||||
#ifdef SONOFF_B1
|
||||
setSetting("board", 28);
|
||||
setSetting("relayProvider", RELAY_PROVIDER_LIGHT);
|
||||
setSetting("lightProvider", LIGHT_PROVIDER_MY9192);
|
||||
setSetting("myDIGPIO", 12);
|
||||
setSetting("myDCKIGPIO", 14);
|
||||
#endif
|
||||
|
||||
saveSettings();
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
4ch[platformio]
|
||||
[platformio]
|
||||
env_default = d1-debug
|
||||
src_dir = espurna
|
||||
data_dir = espurna/data
|
||||
@@ -283,6 +283,27 @@ upload_speed = 115200
|
||||
upload_port = "192.168.4.1"
|
||||
upload_flags = --auth=fibonacci --port 8266
|
||||
|
||||
[env:sonoff-b1-debug]
|
||||
platform = espressif8266
|
||||
framework = arduino
|
||||
board = esp01_1m
|
||||
board_flash_mode = dout
|
||||
lib_deps = ${common.lib_deps}
|
||||
lib_ignore = ${common.lib_ignore}
|
||||
build_flags = ${common.build_flags_1m} -DSONOFF_B1
|
||||
|
||||
[env:sonoff-b1-debug-ota]
|
||||
platform = espressif8266
|
||||
framework = arduino
|
||||
board = esp01_1m
|
||||
board_flash_mode = dout
|
||||
lib_deps = ${common.lib_deps}
|
||||
lib_ignore = ${common.lib_ignore}
|
||||
build_flags = ${common.build_flags_1m} -DSONOFF_B1
|
||||
upload_speed = 115200
|
||||
upload_port = "192.168.4.1"
|
||||
upload_flags = --auth=fibonacci --port 8266
|
||||
|
||||
[env:rfbridge-debug]
|
||||
platform = espressif8266
|
||||
framework = arduino
|
||||
|
||||
Reference in New Issue
Block a user