mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
@@ -69,7 +69,7 @@ const GeneralFileUpload: FC<UploadFileProps> = ({ uploadGeneralFile }) => {
|
|||||||
|
|
||||||
const downloadSchedule = async () => {
|
const downloadSchedule = async () => {
|
||||||
try {
|
try {
|
||||||
const response = await EMSESP.readSchedule();
|
const response = await EMSESP.getSchedule();
|
||||||
if (response.status !== 200) {
|
if (response.status !== 200) {
|
||||||
toast.error(LL.PROBLEM_LOADING());
|
toast.error(LL.PROBLEM_LOADING());
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -96,6 +96,10 @@ export function getCustomizations(): AxiosPromise<void> {
|
|||||||
return AXIOS.get('/getCustomizations');
|
return AXIOS.get('/getCustomizations');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getSchedule(): AxiosPromise<Schedule> {
|
||||||
|
return AXIOS.get('/getSchedule');
|
||||||
|
}
|
||||||
|
|
||||||
export function readSchedule(): AxiosPromise<Schedule> {
|
export function readSchedule(): AxiosPromise<Schedule> {
|
||||||
return AXIOS.get('/schedule');
|
return AXIOS.get('/schedule');
|
||||||
}
|
}
|
||||||
|
|||||||
14
src/common.h
14
src/common.h
@@ -54,17 +54,17 @@ using string_vector = std::vector<const char *>;
|
|||||||
|
|
||||||
#if defined(EMSESP_TEST) || defined(EMSESP_EN_ONLY)
|
#if defined(EMSESP_TEST) || defined(EMSESP_EN_ONLY)
|
||||||
// In testing just take one language (en) to save on Flash space
|
// In testing just take one language (en) to save on Flash space
|
||||||
#define MAKE_WORD_TRANSLATION(list_name, en, ...) static const char * const __pstr__L_##list_name[] = {en, nullptr};
|
#define MAKE_WORD_TRANSLATION(list_name, en, ...) static const char * const __pstr__L_##list_name[] = {en, nullptr};
|
||||||
#define MAKE_TRANSLATION(list_name, shortname, en, ...) static const char * const __pstr__L_##list_name[] = {shortname, en, nullptr};
|
#define MAKE_TRANSLATION(list_name, shortname, en, ...) static const char * const __pstr__L_##list_name[] = {shortname, en, nullptr};
|
||||||
#elif defined(EMSESP_DE_ONLY)
|
#elif defined(EMSESP_DE_ONLY)
|
||||||
#define MAKE_WORD_TRANSLATION(list_name, en, de, ...) static const char * const __pstr__L_##list_name[] = {de, nullptr};
|
#define MAKE_WORD_TRANSLATION(list_name, en, de, ...) static const char * const __pstr__L_##list_name[] = {de, nullptr};
|
||||||
#define MAKE_TRANSLATION(list_name, shortname, en, de, ...) static const char * const __pstr__L_##list_name[] = {shortname, de, nullptr};
|
#define MAKE_TRANSLATION(list_name, shortname, en, de, ...) static const char * const __pstr__L_##list_name[] = {shortname, de, nullptr};
|
||||||
#else
|
#else
|
||||||
#define MAKE_WORD_TRANSLATION(list_name, ...) static const char * const __pstr__L_##list_name[] = {__VA_ARGS__, nullptr};
|
#define MAKE_WORD_TRANSLATION(list_name, ...) static const char * const __pstr__L_##list_name[] = {__VA_ARGS__, nullptr};
|
||||||
#define MAKE_TRANSLATION(list_name, ...) static const char * const __pstr__L_##list_name[] = {__VA_ARGS__, nullptr};
|
#define MAKE_TRANSLATION(list_name, ...) static const char * const __pstr__L_##list_name[] = {__VA_ARGS__, nullptr};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define MAKE_NOTRANSLATION(list_name, ...) static const char * const __pstr__L_##list_name[] = {__VA_ARGS__, nullptr};
|
#define MAKE_NOTRANSLATION(list_name, ...) static const char * const __pstr__L_##list_name[] = {__VA_ARGS__, nullptr};
|
||||||
|
|
||||||
// fixed strings, no translations
|
// fixed strings, no translations
|
||||||
#define MAKE_ENUM_FIXED(enum_name, ...) static const char * const __pstr__L_##enum_name[] = {__VA_ARGS__, nullptr};
|
#define MAKE_ENUM_FIXED(enum_name, ...) static const char * const __pstr__L_##enum_name[] = {__VA_ARGS__, nullptr};
|
||||||
|
|||||||
@@ -1352,7 +1352,7 @@ bool EMSdevice::get_value_info(JsonObject & output, const char * cmd, const int8
|
|||||||
if (dv.has_tag()) {
|
if (dv.has_tag()) {
|
||||||
char name[50];
|
char name[50];
|
||||||
snprintf(name, sizeof(name), "%s %s", tag_to_string(dv.tag), fullname.c_str());
|
snprintf(name, sizeof(name), "%s %s", tag_to_string(dv.tag), fullname.c_str());
|
||||||
json["name"] = name;
|
json["fullname"] = name;
|
||||||
} else {
|
} else {
|
||||||
json["fullname"] = fullname;
|
json["fullname"] = fullname;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,35 +35,35 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
// device types, as display in Web and Console
|
// device types, as display in Web and Console
|
||||||
MAKE_WORD_TRANSLATION(boiler_device, "Boiler", "Kessel", "Boiler", "Värmepanna", "Kocioł", "Varmekjele", "", "Kazan")
|
MAKE_WORD_TRANSLATION(boiler_device, "Boiler", "Kessel", "Boiler", "Värmepanna", "Kocioł", "Varmekjele", "", "Kazan") // TODO translate
|
||||||
MAKE_WORD_TRANSLATION(thermostat_device, "Thermostat", "Thermostat", "Thermostaat", "Termostat", "Termostat", "Termostat", "", "Termostat")
|
MAKE_WORD_TRANSLATION(thermostat_device, "Thermostat", "Thermostat", "Thermostaat", "Termostat", "Termostat", "Termostat", "", "Termostat") // TODO translate
|
||||||
MAKE_WORD_TRANSLATION(heatpump_device, "Heat Pump", "Wärmepumpe", "Warmtepomp", "Värmepump", "Pompa ciepła", "Varmepumpe", "", "Isı Pompası")
|
MAKE_WORD_TRANSLATION(heatpump_device, "Heat Pump", "Wärmepumpe", "Warmtepomp", "Värmepump", "Pompa ciepła", "Varmepumpe", "", "Isı Pompası") // TODO translate
|
||||||
MAKE_WORD_TRANSLATION(solar_device, "Solar Module", "Solarmodul", "Solar Module", "Solmodul", "Moduł solarny", "Solmodul", "", "Güneş Enerjisi Cihazı")
|
MAKE_WORD_TRANSLATION(solar_device, "Solar Module", "Solarmodul", "Solar Module", "Solmodul", "Moduł solarny", "Solmodul", "", "Güneş Enerjisi Cihazı") // TODO translate
|
||||||
MAKE_WORD_TRANSLATION(connect_device, "Connect Module", "Verbindungsmodul", "Connect Module", "Uppkopplingsmodul", "Moduł przyłączeń", "Sammenkoblingsmodul", "", "Güneş Enerjisi Cihazı")
|
MAKE_WORD_TRANSLATION(connect_device, "Connect Module", "Verbindungsmodul", "Connect Module", "Uppkopplingsmodul", "Moduł przyłączeń", "Sammenkoblingsmodul", "", "Güneş Enerjisi Cihazı") // TODO translate
|
||||||
MAKE_WORD_TRANSLATION(mixer_device, "Mixer Module", "Mischermodul", "Mixer Module", "Blandningsmodul", "Moduł mieszacza", "Miksermodul", "", "Karışım Cihazı")
|
MAKE_WORD_TRANSLATION(mixer_device, "Mixer Module", "Mischermodul", "Mixer Module", "Blandningsmodul", "Moduł mieszacza", "Miksermodul", "", "Karışım Cihazı") // TODO translate
|
||||||
MAKE_WORD_TRANSLATION(controller_device, "Controller Module", "Kontrollmodul", "Controller Module", "Styrmodul", "Moduł sterujący", "Styremodul", "", "Kontrol Ünitesi")
|
MAKE_WORD_TRANSLATION(controller_device, "Controller Module", "Kontrollmodul", "Controller Module", "Styrmodul", "Moduł sterujący", "Styremodul", "", "Kontrol Ünitesi") // TODO translate
|
||||||
MAKE_WORD_TRANSLATION(switch_device, "Switch Module", "Schaltmodul", "Switch Module", "Relämodul", "Moduł przełączający", "Switch modul", "", "Anahtar")
|
MAKE_WORD_TRANSLATION(switch_device, "Switch Module", "Schaltmodul", "Switch Module", "Relämodul", "Moduł przełączający", "Switch modul", "", "Anahtar") // TODO translate
|
||||||
MAKE_WORD_TRANSLATION(gateway_device, "Gateway Module", "Gateway Modul", "Gateway Module", "Gateway", "Moduł IP", "Gateway", "", "Ağ Geçidi")
|
MAKE_WORD_TRANSLATION(gateway_device, "Gateway Module", "Gateway Modul", "Gateway Module", "Gateway", "Moduł IP", "Gateway", "", "Ağ Geçidi") // TODO translate
|
||||||
MAKE_WORD_TRANSLATION(alert_device, "Alert Module", "Alarmmodul", "Alert Module", "Larmmodul", "Moduł alarmowy", "Alarmmodul", "", "Alarm Cihazı")
|
MAKE_WORD_TRANSLATION(alert_device, "Alert Module", "Alarmmodul", "Alert Module", "Larmmodul", "Moduł alarmowy", "Alarmmodul", "", "Alarm Cihazı") // TODO translate
|
||||||
MAKE_WORD_TRANSLATION(pump_device, "Pump Module", "Pumpenmodul", "Pump Module", "Pumpmodul", "Moduł pompy", "Pumpemodul", "", "Pompa")
|
MAKE_WORD_TRANSLATION(pump_device, "Pump Module", "Pumpenmodul", "Pump Module", "Pumpmodul", "Moduł pompy", "Pumpemodul", "", "Pompa") // TODO translate
|
||||||
MAKE_WORD_TRANSLATION(heatsource_device, "Heatsource", "Heizquelle", "Heatsource", "Värmekälla", "Źródło ciepła", "Varmekilde", "", "Isı Kaynağı")
|
MAKE_WORD_TRANSLATION(heatsource_device, "Heatsource", "Heizquelle", "Heatsource", "Värmekälla", "Źródło ciepła", "Varmekilde", "", "Isı Kaynağı") // TODO translate
|
||||||
MAKE_WORD_TRANSLATION(sensors_device, "Sensors", "Sensoren", "Sensoren", "Sensorer", "Czujniki", "Sensorer", "Capteurs", "Sensör Cihazı")
|
MAKE_WORD_TRANSLATION(sensors_device, "Sensors", "Sensoren", "Sensoren", "Sensorer", "Czujniki", "Sensorer", "Capteurs", "Sensör Cihazı")
|
||||||
MAKE_WORD_TRANSLATION(unknown_device, "Unknown", "Unbekannt", "Onbekend", "Okänt", "Nieznane urządzenie", "Ukjent", "Inconnu", "")
|
MAKE_WORD_TRANSLATION(unknown_device, "Unknown", "Unbekannt", "Onbekend", "Okänt", "Nieznane urządzenie", "Ukjent", "Inconnu", "") // TODO translate
|
||||||
|
|
||||||
// commands
|
// commands
|
||||||
// TODO translate
|
// TODO translate
|
||||||
MAKE_WORD_TRANSLATION(info_cmd, "lists all values", "Liste aller Werte", "", "", "wyświetl wszystkie wartości", "Viser alle verdier", "", "Tüm değerleri listele")
|
MAKE_WORD_TRANSLATION(info_cmd, "lists all values", "Liste aller Werte", "", "", "wyświetl wszystkie wartości", "Viser alle verdier", "", "Tüm değerleri listele") // TODO translate
|
||||||
MAKE_WORD_TRANSLATION(commands_cmd, "lists all commands", "Liste aller Kommandos", "", "", "wyświetl wszystkie komendy", "Viser alle kommandoer", "", "Tüm komutları listele")
|
MAKE_WORD_TRANSLATION(commands_cmd, "lists all commands", "Liste aller Kommandos", "", "", "wyświetl wszystkie komendy", "Viser alle kommandoer", "", "Tüm komutları listele") // TODO translate
|
||||||
MAKE_WORD_TRANSLATION(entities_cmd, "lists all entities", "Liste aller Entitäten", "", "", "wyświetl wszsytkie encje", "Viser alle enheter", "", "Tüm varlıkları listele")
|
MAKE_WORD_TRANSLATION(entities_cmd, "lists all entities", "Liste aller Entitäten", "", "", "wyświetl wszsytkie encje", "Viser alle enheter", "", "Tüm varlıkları listele") // TODO translate
|
||||||
MAKE_WORD_TRANSLATION(send_cmd, "send a telegram", "Sende EMS-Telegramm", "", "", "wyślij telegram", "send et telegram", "", "Bir telegram gönder")
|
MAKE_WORD_TRANSLATION(send_cmd, "send a telegram", "Sende EMS-Telegramm", "", "", "wyślij telegram", "send et telegram", "", "Bir telegram gönder") // TODO translate
|
||||||
MAKE_WORD_TRANSLATION(setiovalue_cmd, "set io value", "Setze Wertevorgabe", "", "", "ustaw wartość", "sett en io verdi", "", "Giriş/Çıkış değerlerini ayarla")
|
MAKE_WORD_TRANSLATION(setiovalue_cmd, "set io value", "Setze Wertevorgabe", "", "", "ustaw wartość", "sett en io verdi", "", "Giriş/Çıkış değerlerini ayarla") // TODO translate
|
||||||
MAKE_WORD_TRANSLATION(changeloglevel_cmd, "change log level", "Ändere Sysloglevel", "", "", "zmień poziom log-u", "endre loggnivå", "", "Kayıt seviyesini değiştir")
|
MAKE_WORD_TRANSLATION(changeloglevel_cmd, "change log level", "Ändere Sysloglevel", "", "", "zmień poziom log-u", "endre loggnivå", "", "Kayıt seviyesini değiştir") // TODO translate
|
||||||
MAKE_WORD_TRANSLATION(fetch_cmd, "refresh all EMS values", "Lese alle EMS-Werte neu", "", "", "odśwież wszystkie wartości EMS", "oppfrisk alle EMS verdier", "", "Bütün EMS değerlerini yenile")
|
MAKE_WORD_TRANSLATION(fetch_cmd, "refresh all EMS values", "Lese alle EMS-Werte neu", "", "", "odśwież wszystkie wartości EMS", "oppfrisk alle EMS verdier", "", "Bütün EMS değerlerini yenile") // TODO translate
|
||||||
MAKE_WORD_TRANSLATION(restart_cmd, "restart EMS-ESP", "Neustart", "", "", "uruchom ponownie EMS-ESP", "restart EMS-ESP", "se innkommende telegrammer", "EMS-ESPyi yeniden başlat")
|
MAKE_WORD_TRANSLATION(restart_cmd, "restart EMS-ESP", "Neustart", "", "", "uruchom ponownie EMS-ESP", "restart EMS-ESP", "se innkommende telegrammer", "EMS-ESPyi yeniden başlat") // TODO translate
|
||||||
MAKE_WORD_TRANSLATION(watch_cmd, "watch incoming telegrams", "Watch auf eingehende Telegramme", "", "", "obserwuj przyczodzące telegramy", "se innkommende telegrammer", "", "Gelen telegramları ")
|
MAKE_WORD_TRANSLATION(watch_cmd, "watch incoming telegrams", "Watch auf eingehende Telegramme", "", "", "obserwuj przyczodzące telegramy", "se innkommende telegrammer", "", "Gelen telegramları ") // TODO translate
|
||||||
MAKE_WORD_TRANSLATION(publish_cmd, "publish all to MQTT", "Publiziere MQTT", "", "", "opublikuj wszystko na MQTT", "Publiser alt til MQTT", "", "Hepsini MQTTye gönder")
|
MAKE_WORD_TRANSLATION(publish_cmd, "publish all to MQTT", "Publiziere MQTT", "", "", "opublikuj wszystko na MQTT", "Publiser alt til MQTT", "", "Hepsini MQTTye gönder") // TODO translate
|
||||||
MAKE_WORD_TRANSLATION(system_info_cmd, "show system status", "Zeige System-Status", "", "", "pokaż status systemu", "vis system status", "", "Sistem Durumunu Göster")
|
MAKE_WORD_TRANSLATION(system_info_cmd, "show system status", "Zeige System-Status", "", "", "pokaż status systemu", "vis system status", "", "Sistem Durumunu Göster") // TODO translate
|
||||||
MAKE_WORD_TRANSLATION(schedule_cmd, "enable schedule item", "Aktiviere Zeitplan", "", "", "aktywuj wybrany harmonogram", "", "", "")
|
MAKE_WORD_TRANSLATION(schedule_cmd, "enable schedule item", "Aktiviere Zeitplan", "", "", "aktywuj wybrany harmonogram", "", "", "") // TODO translate
|
||||||
|
|
||||||
// tags
|
// tags
|
||||||
MAKE_WORD_TRANSLATION(tag_boiler_data_ww, "dhw", "WW", "dhw", "VV", "CWU", "dhw", "ecs", "SKS")
|
MAKE_WORD_TRANSLATION(tag_boiler_data_ww, "dhw", "WW", "dhw", "VV", "CWU", "dhw", "ecs", "SKS")
|
||||||
@@ -116,7 +116,7 @@ MAKE_WORD_TRANSLATION(OFF, "OFF", "AUS", "UIT", "AV", "wył.", "AV", "OFF", "KAP
|
|||||||
MAKE_WORD_TRANSLATION(minutes, "minutes", "Minuten", "Minuten", "Minuter", "minut", "Minutter", "minutes", "dakika")
|
MAKE_WORD_TRANSLATION(minutes, "minutes", "Minuten", "Minuten", "Minuter", "minut", "Minutter", "minutes", "dakika")
|
||||||
MAKE_WORD_TRANSLATION(hours, "hours", "Stunden", "Uren", "Timmar", "godzin", "Timer", "heures", "saat")
|
MAKE_WORD_TRANSLATION(hours, "hours", "Stunden", "Uren", "Timmar", "godzin", "Timer", "heures", "saat")
|
||||||
MAKE_WORD_TRANSLATION(days, "days", "Tage", "Dagen", "Dagar", "dni", "Dager", "jours", "gün")
|
MAKE_WORD_TRANSLATION(days, "days", "Tage", "Dagen", "Dagar", "dni", "Dager", "jours", "gün")
|
||||||
MAKE_WORD_TRANSLATION(seconds, "seconds", "Sekunden", "Seconden", "Sekunder", "sekundy", "Sekunder", "secondes", "saniye")
|
MAKE_WORD_TRANSLATION(seconds, "seconds", "Sekunden", "Seconden", "Sekunder", "sekund", "Sekunder", "secondes", "saniye")
|
||||||
|
|
||||||
// Enum translations
|
// Enum translations
|
||||||
// general
|
// general
|
||||||
@@ -415,16 +415,16 @@ MAKE_TRANSLATION(manDefrost, "mandefrost", "manual defrost", "Manuelle Enteisung
|
|||||||
MAKE_TRANSLATION(pvCooling, "pvcooling", "Cooling only with PV", "Kühlen nur mit PV", "", "", "chłodzenie tylko z PV", "kjøling med solpanel", "", "") // TODO translate
|
MAKE_TRANSLATION(pvCooling, "pvcooling", "Cooling only with PV", "Kühlen nur mit PV", "", "", "chłodzenie tylko z PV", "kjøling med solpanel", "", "") // TODO translate
|
||||||
MAKE_TRANSLATION(hpCircPumpWw, "hpcircpumpww", "circulation pump available during dhw", "", "", "", "pompa cyrkulacji dostępna w trakcie c.w.u.", "sirkulasjonspumpe tilgjengelig under varmtvann", "", "") // TODO translate
|
MAKE_TRANSLATION(hpCircPumpWw, "hpcircpumpww", "circulation pump available during dhw", "", "", "", "pompa cyrkulacji dostępna w trakcie c.w.u.", "sirkulasjonspumpe tilgjengelig under varmtvann", "", "") // TODO translate
|
||||||
MAKE_TRANSLATION(vp_cooling, "vpcooling", "valve/pump cooling", "", "", "", "zawór/pompa chłodzenia", "varmepumpe kjøling", "", "") // TODO translate
|
MAKE_TRANSLATION(vp_cooling, "vpcooling", "valve/pump cooling", "", "", "", "zawór/pompa chłodzenia", "varmepumpe kjøling", "", "") // TODO translate
|
||||||
MAKE_TRANSLATION(VC0valve, "vc0valve", "VC0 valve", "", "", "", "zawór VC0", "vc0 ventil", "", "") // TODO translate
|
MAKE_TRANSLATION(VC0valve, "vc0valve", "VC0 valve", "VC0 Ventil", "", "", "zawór VC0", "vc0 ventil", "", "") // TODO translate
|
||||||
MAKE_TRANSLATION(primePump, "primepump", "primary heatpump", "", "", "", "główna pompa ciepła", "primærpumpe", "", "") // TODO translate
|
MAKE_TRANSLATION(primePump, "primepump", "primary heatpump", "Hauptpumpe", "", "", "główna pompa ciepła", "primærpumpe", "", "") // TODO translate
|
||||||
MAKE_TRANSLATION(primePumpMod, "primepumpmod", "primary heatpump modulation", "", "", "", "wysterowanie głównej pompy ciepła", "primærpumpelast", "", "") // TODO translate
|
MAKE_TRANSLATION(primePumpMod, "primepumpmod", "primary heatpump modulation", "Modulation Hauptpumpe", "", "", "wysterowanie głównej pompy ciepła", "primærpumpelast", "", "") // TODO translate
|
||||||
MAKE_TRANSLATION(hp3wayValve, "hp3way", "3-way valve", "", "", "", "zawór 3-drogowy pompy ciepła", "3-veisventil", "", "") // TODO translate
|
MAKE_TRANSLATION(hp3wayValve, "hp3way", "3-way valve", "3-Wege-Ventil", "", "", "zawór 3-drogowy pompy ciepła", "3-veisventil", "", "") // TODO translate
|
||||||
MAKE_TRANSLATION(elHeatStep1, "elheatstep1", "el. heater step 1", "", "", "", "dogrzewacz poziom 1", "el-kolbe steg 1", "", "") // TODO translate
|
MAKE_TRANSLATION(elHeatStep1, "elheatstep1", "el. heater step 1", "El. Heizer Stufe 1", "", "", "dogrzewacz poziom 1", "el-kolbe steg 1", "", "") // TODO translate
|
||||||
MAKE_TRANSLATION(elHeatStep2, "elheatstep2", "el. heater step 2", "", "", "", "dogrzewacz poziom 2", "el-kolbe steg 2", "", "") // TODO translate
|
MAKE_TRANSLATION(elHeatStep2, "elheatstep2", "el. heater step 2", "El. Heizer Stufe 2", "", "", "dogrzewacz poziom 2", "el-kolbe steg 2", "", "") // TODO translate
|
||||||
MAKE_TRANSLATION(elHeatStep3, "elheatstep3", "el. heater step 3", "", "", "", "dogrzewacz poziom 3", "el-kolbe steg 3", "", "") // TODO translate
|
MAKE_TRANSLATION(elHeatStep3, "elheatstep3", "el. heater step 3", "El. Heizer Stufe 3", "", "", "dogrzewacz poziom 3", "el-kolbe steg 3", "", "") // TODO translate
|
||||||
MAKE_TRANSLATION(wwAlternatingOper, "wwalternatingop", "alternating operation", "", "", "", "praca naprzemienna", "alternativ drift", "") // TODO translate
|
MAKE_TRANSLATION(wwAlternatingOper, "wwalternatingop", "alternating operation", "Wechselbetrieb", "", "", "praca naprzemienna", "alternativ drift", "") // TODO translate
|
||||||
MAKE_TRANSLATION(wwAltOpPrioHeat, "wwaltopprioheat", "prioritise heating during dhw", "", "", "", "czas na ogrzewanie w trakcie c.w.u", "prioritert oppvarmning", "", "") // TODO translate
|
MAKE_TRANSLATION(wwAltOpPrioHeat, "wwaltopprioheat", "prioritise heating during dhw", "Heizen bevorzugt vor WW", "", "", "czas na ogrzewanie w trakcie c.w.u", "prioritert oppvarmning", "", "") // TODO translate
|
||||||
MAKE_TRANSLATION(wwAltOpPrioWw, "wwaltopprioww", "prioritise dhw during heating", "", "", "", "czas na c.w.u w trakcie ogrzewania", "prioritert varmtvann", "", "") // TODO translate
|
MAKE_TRANSLATION(wwAltOpPrioWw, "wwaltopprioww", "prioritise dhw during heating", "WW bevorzugt vor Heizen", "", "", "czas na c.w.u w trakcie ogrzewania", "prioritert varmtvann", "", "") // TODO translate
|
||||||
|
|
||||||
// hybrid heatpump
|
// hybrid heatpump
|
||||||
MAKE_TRANSLATION(hybridStrategy, "hybridstrategy", "hybrid control strategy", "Hybrid Strategie", "Hybride strategie", "Hybrid kontrollstrategi", "strategia sterowania hybrydowego", "hybrid kontrollstrategi", "stratégie contrôle hybride", "")
|
MAKE_TRANSLATION(hybridStrategy, "hybridstrategy", "hybrid control strategy", "Hybrid Strategie", "Hybride strategie", "Hybrid kontrollstrategi", "strategia sterowania hybrydowego", "hybrid kontrollstrategi", "stratégie contrôle hybride", "")
|
||||||
|
|||||||
@@ -814,8 +814,8 @@ void Mqtt::process_queue() {
|
|||||||
// it will have a real packet ID
|
// it will have a real packet ID
|
||||||
if (mqtt_message.packet_id_ > 0) {
|
if (mqtt_message.packet_id_ > 0) {
|
||||||
LOG_DEBUG("Waiting for QOS-ACK");
|
LOG_DEBUG("Waiting for QOS-ACK");
|
||||||
// if we don't get the ack within 10 minutes, republish with new packet_id
|
// if we don't get the ack within 10 seconds, republish with new packet_id
|
||||||
if (uuid::get_uptime_sec() - last_publish_queue_ < 600) {
|
if (uuid::get_uptime_sec() - last_publish_queue_ < 10) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -656,7 +656,6 @@ void System::network_init(bool refresh) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
last_system_check_ = 0; // force the LED to go from fast flash to pulse
|
last_system_check_ = 0; // force the LED to go from fast flash to pulse
|
||||||
send_heartbeat();
|
|
||||||
|
|
||||||
// no ethernet present
|
// no ethernet present
|
||||||
if (phy_type_ == PHY_type::PHY_TYPE_NONE) {
|
if (phy_type_ == PHY_type::PHY_TYPE_NONE) {
|
||||||
@@ -713,7 +712,6 @@ void System::system_check() {
|
|||||||
digitalWrite(led_gpio_, hide_led_ ? !LED_ON : LED_ON);
|
digitalWrite(led_gpio_, hide_led_ ? !LED_ON : LED_ON);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
send_heartbeat();
|
|
||||||
} else {
|
} else {
|
||||||
// turn off LED so we're ready to the flashes
|
// turn off LED so we're ready to the flashes
|
||||||
if (led_gpio_) {
|
if (led_gpio_) {
|
||||||
|
|||||||
@@ -88,8 +88,8 @@ void EMSuart::start(const uint8_t tx_mode, const uint8_t rx_gpio, const uint8_t
|
|||||||
uart_set_rx_full_threshold(EMSUART_NUM, 1);
|
uart_set_rx_full_threshold(EMSUART_NUM, 1);
|
||||||
uart_set_rx_timeout(EMSUART_NUM, 0); // disable
|
uart_set_rx_timeout(EMSUART_NUM, 0); // disable
|
||||||
|
|
||||||
// note setting the static max buffer to 1024 causes OTA to fail
|
// note esp32s3 crashes with 2k stacksize, stack overflow here sometimes wipes settingsfiles.
|
||||||
xTaskCreate(uart_event_task, "uart_event_task", 2048, NULL, configMAX_PRIORITIES - 1, NULL);
|
xTaskCreate(uart_event_task, "uart_event_task", 2560, NULL, configMAX_PRIORITIES - 1, NULL);
|
||||||
}
|
}
|
||||||
tx_mode_ = tx_mode;
|
tx_mode_ = tx_mode;
|
||||||
uart_enable_intr_mask(EMSUART_NUM, UART_BRK_DET_INT_ENA | UART_RXFIFO_FULL_INT_ENA);
|
uart_enable_intr_mask(EMSUART_NUM, UART_BRK_DET_INT_ENA | UART_RXFIFO_FULL_INT_ENA);
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ WebAPIService::WebAPIService(AsyncWebServer * server, SecurityManager * security
|
|||||||
server->on(GET_CUSTOMIZATIONS_PATH,
|
server->on(GET_CUSTOMIZATIONS_PATH,
|
||||||
HTTP_GET,
|
HTTP_GET,
|
||||||
securityManager->wrapRequest(std::bind(&WebAPIService::getCustomizations, this, _1), AuthenticationPredicates::IS_ADMIN));
|
securityManager->wrapRequest(std::bind(&WebAPIService::getCustomizations, this, _1), AuthenticationPredicates::IS_ADMIN));
|
||||||
|
server->on(GET_SCHEDULE_PATH, HTTP_GET, securityManager->wrapRequest(std::bind(&WebAPIService::getSchedule, this, _1), AuthenticationPredicates::IS_ADMIN));
|
||||||
}
|
}
|
||||||
|
|
||||||
// HTTP GET
|
// HTTP GET
|
||||||
@@ -196,4 +197,16 @@ void WebAPIService::getCustomizations(AsyncWebServerRequest * request) {
|
|||||||
request->send(response);
|
request->send(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void WebAPIService::getSchedule(AsyncWebServerRequest * request) {
|
||||||
|
auto * response = new AsyncJsonResponse(false, FS_BUFFER_SIZE);
|
||||||
|
JsonObject root = response->getRoot();
|
||||||
|
|
||||||
|
root["type"] = "schedule";
|
||||||
|
|
||||||
|
System::extractSettings(EMSESP_SCHEDULER_FILE, "Schedule", root);
|
||||||
|
|
||||||
|
response->setLength();
|
||||||
|
request->send(response);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace emsesp
|
} // namespace emsesp
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
#define EMSESP_API_SERVICE_PATH "/api"
|
#define EMSESP_API_SERVICE_PATH "/api"
|
||||||
#define GET_SETTINGS_PATH "/rest/getSettings"
|
#define GET_SETTINGS_PATH "/rest/getSettings"
|
||||||
#define GET_CUSTOMIZATIONS_PATH "/rest/getCustomizations"
|
#define GET_CUSTOMIZATIONS_PATH "/rest/getCustomizations"
|
||||||
|
#define GET_SCHEDULE_PATH "/rest/getSchedule"
|
||||||
|
|
||||||
namespace emsesp {
|
namespace emsesp {
|
||||||
|
|
||||||
@@ -51,6 +52,7 @@ class WebAPIService {
|
|||||||
|
|
||||||
void getSettings(AsyncWebServerRequest * request);
|
void getSettings(AsyncWebServerRequest * request);
|
||||||
void getCustomizations(AsyncWebServerRequest * request);
|
void getCustomizations(AsyncWebServerRequest * request);
|
||||||
|
void getSchedule(AsyncWebServerRequest * request);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace emsesp
|
} // namespace emsesp
|
||||||
|
|||||||
@@ -60,13 +60,11 @@ class WebSchedulerService : public StatefulService<WebScheduler> {
|
|||||||
bool command_setvalue(const char * value, const std::string name);
|
bool command_setvalue(const char * value, const std::string name);
|
||||||
bool get_value_info(JsonObject & output, const char * cmd);
|
bool get_value_info(JsonObject & output, const char * cmd);
|
||||||
|
|
||||||
private:
|
|
||||||
bool command(const char * cmd, const char * data);
|
|
||||||
|
|
||||||
// make all functions public so we can test in the debug and standalone mode
|
// make all functions public so we can test in the debug and standalone mode
|
||||||
#ifndef EMSESP_STANDALONE
|
#ifndef EMSESP_STANDALONE
|
||||||
private:
|
private:
|
||||||
#endif
|
#endif
|
||||||
|
bool command(const char * cmd, const char * data);
|
||||||
|
|
||||||
HttpEndpoint<WebScheduler> _httpEndpoint;
|
HttpEndpoint<WebScheduler> _httpEndpoint;
|
||||||
FSPersistence<WebScheduler> _fsPersistence;
|
FSPersistence<WebScheduler> _fsPersistence;
|
||||||
|
|||||||
@@ -257,26 +257,16 @@ StateUpdateResult WebSettings::update(JsonObject & root, WebSettings & settings)
|
|||||||
check_flag(prev, settings.enum_format, ChangeFlags::MQTT);
|
check_flag(prev, settings.enum_format, ChangeFlags::MQTT);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
String old_locale = settings.locale;
|
||||||
// these may need mqtt restart to rebuild HA discovery topics
|
settings.locale = root["locale"] | EMSESP_DEFAULT_LOCALE;
|
||||||
//
|
EMSESP::system_.locale(settings.locale);
|
||||||
prev = settings.bool_format;
|
if (Mqtt::ha_enabled() && !old_locale.equals(settings.locale)) {
|
||||||
settings.bool_format = root["bool_format"] | EMSESP_DEFAULT_BOOL_FORMAT;
|
add_flags(ChangeFlags::MQTT);
|
||||||
EMSESP::system_.bool_format(settings.bool_format);
|
}
|
||||||
if (Mqtt::ha_enabled())
|
|
||||||
check_flag(prev, settings.bool_format, ChangeFlags::MQTT);
|
|
||||||
|
|
||||||
prev = settings.enum_format;
|
|
||||||
settings.enum_format = root["enum_format"] | EMSESP_DEFAULT_ENUM_FORMAT;
|
|
||||||
EMSESP::system_.enum_format(settings.enum_format);
|
|
||||||
if (Mqtt::ha_enabled())
|
|
||||||
check_flag(prev, settings.enum_format, ChangeFlags::MQTT);
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// without checks or necessary restarts...
|
// without checks or necessary restarts...
|
||||||
//
|
//
|
||||||
settings.locale = root["locale"] | EMSESP_DEFAULT_LOCALE;
|
|
||||||
EMSESP::system_.locale(settings.locale);
|
|
||||||
|
|
||||||
settings.trace_raw = root["trace_raw"] | EMSESP_DEFAULT_TRACELOG_RAW;
|
settings.trace_raw = root["trace_raw"] | EMSESP_DEFAULT_TRACELOG_RAW;
|
||||||
EMSESP::trace_raw(settings.trace_raw);
|
EMSESP::trace_raw(settings.trace_raw);
|
||||||
|
|||||||
Reference in New Issue
Block a user