Compare commits

...

2 Commits

Author SHA1 Message Date
5ca6425918 gridPowerDeltaAlarmSince reset FIX 2025-09-03 22:59:28 +02:00
9b7b08e9cb GosundSP111 relay0LED FIX 2025-09-03 22:59:14 +02:00
4 changed files with 10 additions and 4 deletions

View File

@ -200,6 +200,7 @@ private:
} }
} else if (gridPowerDeltaAlarmSince > 0) { } else if (gridPowerDeltaAlarmSince > 0) {
Serial.printf("[RELAY] \"%s\": Powering off CANCELED!\n", name.c_str()); Serial.printf("[RELAY] \"%s\": Powering off CANCELED!\n", name.c_str());
gridPowerDeltaAlarmSince = 0;
} }
} }
@ -219,6 +220,7 @@ private:
} }
} else if (gridPowerDeltaAlarmSince > 0) { } else if (gridPowerDeltaAlarmSince > 0) {
Serial.printf("[RELAY] \"%s\": Powering on CANCELED!\n", name.c_str()); Serial.printf("[RELAY] \"%s\": Powering on CANCELED!\n", name.c_str());
gridPowerDeltaAlarmSince = 0;
} }
} }

View File

@ -12,7 +12,7 @@ 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);
#ifdef GosundSP111 #ifdef GosundSP111
Output relay0Led("relay0Led", 3, true, false); Output relay0Led("relay0Led", 2, true, false);
#endif #endif
#endif #endif

View File

@ -36,6 +36,9 @@ inline void ioSetup() {
status.setup(); status.setup();
button0.setup(); button0.setup();
relay0.setup(); relay0.setup();
#ifdef GosundSP111
relay0Led.setup();
#endif
#ifdef Sonoff4ChPro #ifdef Sonoff4ChPro
button1.setup(); button1.setup();
button2.setup(); button2.setup();
@ -50,6 +53,10 @@ inline void ioLoop() {
status.loop(); status.loop();
button0.loop(); button0.loop();
relay0.loop(); relay0.loop();
#ifdef GosundSP111
relay0Led.set(relay0.get());
relay0Led.loop();
#endif
#ifdef Sonoff4ChPro #ifdef Sonoff4ChPro
button1.loop(); button1.loop();
button2.loop(); button2.loop();

View File

@ -19,7 +19,4 @@ void loop() {
wifiLoop(); wifiLoop();
ioLoop(); ioLoop();
ArduinoOTA.handle(); ArduinoOTA.handle();
#ifdef GosundSP111
relay0Led.set(relay0.get());
#endif
} }