This commit is contained in:
Tower committed 2026-04-15 17:43:31 +02:00
1 parent 479593c30b
commit 58102dc294
1 file changed
+27 -49
+27 -49
View File
@@ -8,6 +8,7 @@
#include <LiquidCrystal.h>
#include <MAX6675.h>
#include <Wire.h>
#include <ArduinoJson.h>
// Adafruit_GFX und Adafruit_SSD1306 entfernt – OLED aktuell nicht genutzt,
// das Objekt würde ~1 KB RAM als Frame-Buffer belegen.;
@@ -182,7 +183,7 @@ void setup()
}
// Kesselpumpe sofort an wenn Abgas heiß
if (ktc.readCelsius() >= 40)
if (ktc.getCelsius() >= 40)
{
digitalWrite(relais5, LOW);
}
@@ -296,7 +297,7 @@ void readSensors()
readSensor(temp_koben, sensors.getTempC(Koben));
readSensor(temp_kunten, sensors.getTempC(Kunten));
readSensor(temp_wohnung, sensors.getTempC(wohnung));
temp_abgas = ktc.readCelsius(); // MAX6675 hat eigenes Fehlerprotokoll
temp_abgas = ktc.getCelsius(); // MAX6675 hat eigenes Fehlerprotokoll
}
// ============================================================
@@ -555,60 +556,37 @@ void showSensor()
// ============================================================
void sendSerialJSON()
{
char buffer[512];
StaticJsonDocument<512> doc;
float abw = vtsoll - temp_vorlauf;
snprintf(buffer, sizeof(buffer),
"{"
"\"aussentemp\":%.1f,"
"\"vorlauf_ist\":%.1f,"
"\"vorlauf_soll\":%.1f,"
"\"kessel_oben\":%.1f,"
"\"kessel_unten\":%.1f,"
"\"wohnung\":%.1f,"
"\"abgas\":%.1f,"
"\"stellung\":%d,"
"\"mischeron\":%d,"
"\"neigung\":%.2f,"
"\"rtsoll\":%d,"
"\"misch_begin\":%d,"
"\"nachtabs\":%d,"
"\"tag_anfang\":%d,"
"\"tag_ende\":%d,"
"\"time_adjust\":%d,"
"\"abweichung\":%.1f,"
"\"check_intervall\":%ld,"
"\"puls_zeit\":%ld,"
"\"puls_aktiv\":%d,"
"\"warmup\":%d"
"}",
doc["aussentemp"] = temp_aussen;
doc["vorlauf_ist"] = temp_vorlauf;
doc["vorlauf_soll"] = vtsoll;
doc["kessel_oben"] = temp_koben;
doc["kessel_unten"] = temp_kunten;
doc["wohnung"] = temp_wohnung;
doc["abgas"] = temp_abgas;
temp_aussen,
temp_vorlauf,
vtsoll,
temp_koben,
temp_kunten,
temp_wohnung,
temp_abgas,
doc["stellung"] = stellung;
doc["mischeron"] = mischeron;
doc["neigung"] = neigung;
doc["rtsoll"] = rtsoll;
doc["misch_begin"] = misch_begin;
doc["nachtabs"] = nachtabs;
doc["tag_anfang"] = tag_anfang;
doc["tag_ende"] = tag_ende;
doc["time_adjust"] = time_adjust;
stellung,
mischeron,
neigung,
rtsoll,
misch_begin,
nachtabs,
tag_anfang,
tag_ende,
time_adjust,
doc["abweichung"] = abw;
abw,
dynamicCheckInterval / 1000,
activePulseTime / 1000,
(currentPulse != PULSE_NONE) ? 1 : 0,
mischeronWarmup ? 1 : 0);
doc["check_intervall"] = dynamicCheckInterval / 1000;
doc["puls_zeit"] = activePulseTime / 1000;
doc["puls_aktiv"] = (currentPulse != PULSE_NONE) ? 1 : 0;
doc["warmup"] = mischeronWarmup ? 1 : 0;
Serial.println(buffer);
serializeJson(doc, Serial);
Serial.println();
}
// ============================================================