This commit is contained in:
Patrick Haßel 2025-09-02 14:35:20 +02:00
parent 1b1f295b23
commit 7aa39483de
7 changed files with 32 additions and 3 deletions

6
partitions.csv Normal file
View File

@ -0,0 +1,6 @@
#Name,Type,SubType,Offset,Size,Flags
nvs,data,nvs,0x9000,0x4000,
otadata,data,ota,0xd000,0x2000,
app0,app,ota_0,0x10000,0x3C000,
app1,app,ota_1,,0x3C000,
spiffs,data,spiffs,,0x0E000,
1 #Name Type SubType Offset Size Flags
2 nvs data nvs 0x9000 0x4000
3 otadata data ota 0xd000 0x2000
4 app0 app ota_0 0x10000 0x3C000
5 app1 app ota_1 0x3C000
6 spiffs data spiffs 0x0E000

View File

@ -32,16 +32,32 @@ build.filesystem = ${common.build.filesystem}
lib_deps = ${common.lib_deps} lib_deps = ${common.lib_deps}
build_flags = -D Sonoff4ChPro -D ESP32_TESTBOARD -D CORE_DEBUG_LEVEL=0 build_flags = -D Sonoff4ChPro -D ESP32_TESTBOARD -D CORE_DEBUG_LEVEL=0
[env:GosundSP111] [env:GosundSP111_USB]
platform = ${common.platform} platform = ${common.platform}
board = ${common.board} board = ${common.board}
framework = ${common.framework} framework = ${common.framework}
upload_speed = ${common.upload_speed} upload_speed = ${common.upload_speed}
monitor_speed = ${common.monitor_speed} monitor_speed = ${common.monitor_speed}
board_build.partitions = partitions.csv
build.filesystem = ${common.build.filesystem}
lib_deps = ${common.lib_deps}
build_flags = -D GosundSP111
[env:GosundSP111_02]
platform = ${common.platform}
board = ${common.board}
framework = ${common.framework}
upload_speed = ${common.upload_speed}
monitor_speed = ${common.monitor_speed}
board_build.partitions = partitions.csv
build.filesystem = ${common.build.filesystem} build.filesystem = ${common.build.filesystem}
lib_deps = ${common.lib_deps} lib_deps = ${common.lib_deps}
upload_port = 10.0.0.179 upload_port = 10.0.0.179
build_flags = -D GosundSP111 build_flags = -D GosundSP111
; -Os
; -flto
; -fno-exceptions
; -fno-rtti
[env:GosundSP111_ESP32] [env:GosundSP111_ESP32]
platform = espressif32 platform = espressif32

View File

@ -11,6 +11,8 @@ Button button0(13, true, true, [](const ButtonEvent event) { buttonCallback(rela
Relay relay0(0, "fallback/relay0", "RELAY #0", 15, false, true); Relay relay0(0, "fallback/relay0", "RELAY #0", 15, false, true);
Output relay0Led("relay0Led", 2, STATUS_INVERT, false);
#endif #endif
#ifdef Sonoff4ChPro #ifdef Sonoff4ChPro

View File

@ -12,6 +12,8 @@ extern Button button0;
extern Relay relay0; extern Relay relay0;
extern Output relay0Led;
#ifdef Sonoff4ChPro #ifdef Sonoff4ChPro
extern Button button1; extern Button button1;

View File

@ -19,4 +19,5 @@ void loop() {
wifiLoop(); wifiLoop();
ioLoop(); ioLoop();
ArduinoOTA.handle(); ArduinoOTA.handle();
relay0Led.set(relay0.get());
} }

View File

@ -7,7 +7,9 @@
#define CONFIG_WIFI_SSID "/wifi/ssid" #define CONFIG_WIFI_SSID "/wifi/ssid"
#define CONFIG_WIFI_PASSWORD "/wifi/password" #define CONFIG_WIFI_PASSWORD "/wifi/password"
#ifndef DEFAULT_HOSTNAME
#define DEFAULT_HOSTNAME "PatrixSonoff4ChPro" #define DEFAULT_HOSTNAME "PatrixSonoff4ChPro"
#endif
#define DEFAULT_WIFI_SSID "HappyNet" #define DEFAULT_WIFI_SSID "HappyNet"
#define DEFAULT_WIFI_PASSWORD "1Grausame!Sackratte7" #define DEFAULT_WIFI_PASSWORD "1Grausame!Sackratte7"

View File

@ -10,5 +10,5 @@ minify index.html | sed 's|http://10.42.0.204||g' > index.html.min || exit 2
#curl -s 'http://10.0.0.178/upload/index' -F "file=@index.html.min" #curl -s 'http://10.0.0.178/upload/index' -F "file=@index.html.min"
#curl -s 'http://10.0.0.178/upload/icon' -F "file=@icon.svg" #curl -s 'http://10.0.0.178/upload/icon' -F "file=@icon.svg"
curl -s 'http://10.0.0.174/upload/index' -F "file=@index.html.min" curl -s 'http://10.0.0.179/upload/index' -F "file=@index.html.min"
curl -s 'http://10.0.0.174/upload/icon' -F "file=@icon.svg" curl -s 'http://10.0.0.179/upload/icon' -F "file=@icon.svg"