Compare commits

..

No commits in common. "de21cff76c5724eb10c17eb1cd1255c9d93b8b98" and "9bebffc743850b029c0db68bbbe6c75ea22fcb76" have entirely different histories.

5 changed files with 63 additions and 96 deletions

View File

@ -6,99 +6,68 @@ build.filesystem = littlefs
lib_deps = bblanchon/ArduinoJson @ 7.4.2
knolleary/PubSubClient
[ESP8285]
[Sonoff4ChPro]
platform = espressif8266
board = esp8285
framework = ${common.framework}
upload_speed = ${common.upload_speed}
monitor_speed = ${common.monitor_speed}
build.filesystem = ${common.build.filesystem}
lib_deps = ${common.lib_deps}
board_build.ldscript = eagle.flash.1m64.ld
build_flags = -D Sonoff4ChPro -D WIFI_HOSTNAME_FALLBACK=\"PatrixSonoff4ChPro\"
[Ch4Pro]
platform = ${ESP8285.platform}
board = ${ESP8285.board}
framework = ${ESP8285.framework}
upload_speed = ${ESP8285.upload_speed}
monitor_speed = ${ESP8285.monitor_speed}
build.filesystem = ${ESP8285.build.filesystem}
lib_deps = ${ESP8285.lib_deps}
board_build.ldscript = ${ESP8285.board_build.ldscript}
build_flags = -D Ch4Pro
[SP111]
platform = ${ESP8285.platform}
board = ${ESP8285.board}
framework = ${ESP8285.framework}
upload_speed = ${ESP8285.upload_speed}
monitor_speed = ${ESP8285.monitor_speed}
build.filesystem = ${ESP8285.build.filesystem}
lib_deps = ${ESP8285.lib_deps}
board_build.ldscript = ${ESP8285.board_build.ldscript}
build_flags = -D SP111
[GosundSP111]
platform = espressif8266
board = esp8285
build_flags = -D GosundSP111 -D WIFI_HOSTNAME_FALLBACK=\"PatrixGosundSP111\"
[ESP32_TEST]
platform = espressif32
board = esp32dev
framework = ${common.framework}
upload_speed = ${common.upload_speed}
monitor_speed = ${common.monitor_speed}
build_type = debug
debug_tool = esp-prog
monitor_filters = esp32_exception_decoder
build.filesystem = ${common.build.filesystem}
lib_deps = ${common.lib_deps}
build_flags = -D ESP32_TESTBOARD -D CORE_DEBUG_LEVEL=0
[env:ESP32_Ch4Pro]
platform = ${ESP32_TEST.platform}
board = ${ESP32_TEST.board}
framework = ${ESP32_TEST.framework}
upload_speed = ${ESP32_TEST.upload_speed}
monitor_speed = ${ESP32_TEST.monitor_speed}
build_type = ${ESP32_TEST.build_type}
debug_tool = ${ESP32_TEST.debug_tool}
monitor_filters = ${ESP32_TEST.monitor_filters}
build.filesystem = ${ESP32_TEST.build.filesystem}
lib_deps = ${ESP32_TEST.lib_deps}
build_flags = ${Ch4Pro.build_flags} -D WIFI_HOSTNAME_FALLBACK=\"ESP32_Test_Ch4Pro\" ${ESP32_TEST.build_flags}
[env:ESP32_SP111]
platform = ${ESP32_TEST.platform}
board = ${ESP32_TEST.board}
framework = ${ESP32_TEST.framework}
upload_speed = ${ESP32_TEST.upload_speed}
monitor_speed = ${ESP32_TEST.monitor_speed}
build_type = ${ESP32_TEST.build_type}
debug_tool = ${ESP32_TEST.debug_tool}
monitor_filters = ${ESP32_TEST.monitor_filters}
build.filesystem = ${ESP32_TEST.build.filesystem}
lib_deps = ${ESP32_TEST.lib_deps}
build_flags = ${SP111.build_flags} -D WIFI_HOSTNAME_FALLBACK=\"ESP32_Test_SP111\" ${ESP32_TEST.build_flags}
[env:Gewaechshaus]
platform = ${Ch4Pro.platform}
board = ${Ch4Pro.board}
framework = ${Ch4Pro.framework}
upload_speed = ${Ch4Pro.upload_speed}
monitor_speed = ${Ch4Pro.monitor_speed}
build.filesystem = ${Ch4Pro.build.filesystem}
lib_deps = ${Ch4Pro.lib_deps}
board_build.ldscript = ${Ch4Pro.board_build.ldscript}
build_flags = ${Ch4Pro.build_flags} -D WIFI_HOSTNAME_FALLBACK=\"Gewaechshaus\"
[env:Sonoff4ChPro]
platform = ${Sonoff4ChPro.platform}
board = ${Sonoff4ChPro.board}
framework = ${common.framework}
upload_speed = ${common.upload_speed}
monitor_speed = ${common.monitor_speed}
build.filesystem = ${common.build.filesystem}
lib_deps = ${common.lib_deps}
upload_protocol = espota
upload_port = 10.0.0.178
build_flags = ${Sonoff4ChPro.build_flags}
[env:Infrarotheizung]
platform = ${SP111.platform}
board = ${SP111.board}
framework = ${SP111.framework}
upload_speed = ${SP111.upload_speed}
monitor_speed = ${SP111.monitor_speed}
build.filesystem = ${SP111.build.filesystem}
lib_deps = ${SP111.lib_deps}
board_build.ldscript = ${SP111.board_build.ldscript}
build_flags = ${SP111.build_flags} -D WIFI_HOSTNAME_FALLBACK=\"Infrarotheizung\"
upload_protocol = espota
upload_port = 10.0.0.179
[env:Sonoff4ChPro_ESP32]
platform = ${ESP32_TEST.platform}
board = ${ESP32_TEST.board}
framework = ${common.framework}
upload_speed = ${common.upload_speed}
monitor_speed = ${common.monitor_speed}
build_type = ${ESP32_TEST.build_type}
debug_tool = ${ESP32_TEST.debug_tool}
monitor_filters = ${ESP32_TEST.monitor_filters}
build.filesystem = ${common.build.filesystem}
lib_deps = ${common.lib_deps}
build_flags = ${Sonoff4ChPro.build_flags} ${ESP32_TEST.build_flags}
[env:GosundSP111]
platform = ${GosundSP111.platform}
board = ${GosundSP111.board}
framework = ${common.framework}
upload_speed = ${common.upload_speed}
monitor_speed = ${common.monitor_speed}
build.filesystem = ${common.build.filesystem}
lib_deps = ${common.lib_deps}
build_flags = ${GosundSP111.build_flags}
[env:GosundSP111_ESP32]
platform = ${ESP32_TEST.platform}
board = ${ESP32_TEST.board}
framework = ${common.framework}
upload_speed = ${common.upload_speed}
monitor_speed = ${common.monitor_speed}
build_type = ${ESP32_TEST.build_type}
debug_tool = ${ESP32_TEST.debug_tool}
monitor_filters = ${ESP32_TEST.monitor_filters}
build.filesystem = ${common.build.filesystem}
lib_deps = ${common.lib_deps}
build_flags = ${GosundSP111.build_flags} ${ESP32_TEST.build_flags}

View File

@ -95,7 +95,7 @@ void httpStatus() {
const auto relays = json["relays"].to<JsonArray>();
relay0.json(relays.add<JsonObject>());
#ifdef Ch4Pro
#ifdef Sonoff4ChPro
relay1.json(relays.add<JsonObject>());
relay2.json(relays.add<JsonObject>());
relay3.json(relays.add<JsonObject>());
@ -117,7 +117,7 @@ void httpSet() {
httpString("mqttPassword", mqttSetPassword);
httpRelay(0, relay0);
#ifdef Ch4Pro
#ifdef Sonoff4ChPro
httpRelay(1, relay1);
httpRelay(2, relay2);
httpRelay(3, relay3);

View File

@ -1,6 +1,6 @@
#include "io.h"
#ifdef SP111
#ifdef GosundSP111
#ifndef ESP32_TESTBOARD
#define STATUS_PIN 0
@ -11,13 +11,13 @@ Button button0(13, true, true, [](const ButtonEvent event) { buttonCallback(rela
Relay relay0(0, "fallback/relay0", "RELAY #0", 15, false, true);
#ifdef SP111
#ifdef GosundSP111
Output relay0Led("relay0Led", 2, true, false);
#endif
#endif
#ifdef Ch4Pro
#ifdef Sonoff4ChPro
#ifndef ESP32_TESTBOARD
#define STATUS_PIN 13

View File

@ -12,11 +12,11 @@ extern Button button0;
extern Relay relay0;
#ifdef SP111
#ifdef GosundSP111
extern Output relay0Led;
#endif
#ifdef Ch4Pro
#ifdef Sonoff4ChPro
extern Button button1;
@ -36,10 +36,10 @@ inline void ioSetup() {
status.setup();
button0.setup();
relay0.setup();
#ifdef SP111
#ifdef GosundSP111
relay0Led.setup();
#endif
#ifdef Ch4Pro
#ifdef Sonoff4ChPro
button1.setup();
button2.setup();
button3.setup();
@ -53,11 +53,11 @@ inline void ioLoop() {
status.loop();
button0.loop();
relay0.loop();
#ifdef SP111
#ifdef GosundSP111
relay0Led.set(relay0.get());
relay0Led.loop();
#endif
#ifdef Ch4Pro
#ifdef Sonoff4ChPro
button1.loop();
button2.loop();
button3.loop();

View File

@ -7,10 +7,8 @@ minify index.html | sed 's|http://10.42.0.204||g' > index.html.min || exit 2
#curl -s 'http://10.42.0.204/upload/index' -F "file=@index.html.min"
#curl -s 'http://10.42.0.204/upload/icon' -F "file=@icon.svg"
# Greenhouse
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"
# InfraredHeater
#curl -s 'http://10.0.0.179/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.179/upload/icon' -F "file=@icon.svg"