diff --git a/interface/src/i18n/se/index.ts b/interface/src/i18n/se/index.ts index 800c9ace9..c03e0e136 100644 --- a/interface/src/i18n/se/index.ts +++ b/interface/src/i18n/se/index.ts @@ -69,8 +69,8 @@ const se: Translation = { SENSOR: 'Sensor', TEMP_SENSOR: 'Temperatursensor', TEMP_SENSORS: 'Temperatursensorer', - WRITE_CMD_SENT: 'Skrivkommando sent', // TODO - WRITE_CMD_FAILED: 'Skrivkommando failed', // TODO + WRITE_CMD_SENT: 'Skrivkommandon skickade', + WRITE_CMD_FAILED: 'Skrivkommandon misslyckade', EMS_BUS_WARNING: 'EMS-buss nedkopplad. Om denna varning kvarstår efter några sekunder, kontrollera inställningar och enhets-profil.', EMS_BUS_SCANNING: 'Söker efter EMS-enheter...', CONNECTED: 'Ansluten', @@ -249,10 +249,10 @@ const se: Translation = { MQTT_INT_HEARTBEAT: 'Heartbeat', MQTT_QUEUE: 'MQTT Queue', DEFAULT: 'Standard', - MQTT_ENTITY_FORMAT: 'Entity ID format', // TODO - MQTT_ENTITY_FORMAT_0: 'Single instance, long name (v3.4)', // TODO - MQTT_ENTITY_FORMAT_1: 'Single instance, short name', // TODO - MQTT_ENTITY_FORMAT_2: 'Multiple instances, short name', // TODO + MQTT_ENTITY_FORMAT: 'Entitets-ID format', + MQTT_ENTITY_FORMAT_0: 'Singel-instans, långt namn(v3.4)', + MQTT_ENTITY_FORMAT_1: 'Singel-instans, kort name', + MQTT_ENTITY_FORMAT_2: 'Multi-instans, kort name', MQTT_CLEAN_SESSION: 'Använd "Clean Session"-flaggan', MQTT_RETAIN_FLAG: 'Använd "Always Retain"-flaggan', INACTIVE: 'Inaktiv', diff --git a/lib/framework/MqttSettingsService.cpp b/lib/framework/MqttSettingsService.cpp index 7491691c5..cc6354c32 100644 --- a/lib/framework/MqttSettingsService.cpp +++ b/lib/framework/MqttSettingsService.cpp @@ -178,18 +178,17 @@ StateUpdateResult MqttSettings::update(JsonObject & root, MqttSettings & setting MqttSettings newSettings = {}; bool changed = false; - newSettings.enabled = root["enabled"] | FACTORY_MQTT_ENABLED; - newSettings.host = root["host"] | FACTORY_MQTT_HOST; - newSettings.port = root["port"] | FACTORY_MQTT_PORT; - newSettings.base = root["base"] | FACTORY_MQTT_BASE; - newSettings.username = root["username"] | FACTORY_MQTT_USERNAME; - newSettings.password = root["password"] | FACTORY_MQTT_PASSWORD; - newSettings.clientId = root["client_id"] | FACTORY_MQTT_CLIENT_ID; - newSettings.keepAlive = root["keep_alive"] | FACTORY_MQTT_KEEP_ALIVE; - newSettings.cleanSession = root["clean_session"] | FACTORY_MQTT_CLEAN_SESSION; - newSettings.entity_format = root["entity_format"] | FACTORY_MQTT_ENTITY_FORMAT; - newSettings.mqtt_qos = root["mqtt_qos"] | EMSESP_DEFAULT_MQTT_QOS; - newSettings.mqtt_retain = root["mqtt_retain"] | EMSESP_DEFAULT_MQTT_RETAIN; + newSettings.enabled = root["enabled"] | FACTORY_MQTT_ENABLED; + newSettings.host = root["host"] | FACTORY_MQTT_HOST; + newSettings.port = root["port"] | FACTORY_MQTT_PORT; + newSettings.base = root["base"] | FACTORY_MQTT_BASE; + newSettings.username = root["username"] | FACTORY_MQTT_USERNAME; + newSettings.password = root["password"] | FACTORY_MQTT_PASSWORD; + newSettings.clientId = root["client_id"] | FACTORY_MQTT_CLIENT_ID; + newSettings.keepAlive = root["keep_alive"] | FACTORY_MQTT_KEEP_ALIVE; + newSettings.cleanSession = root["clean_session"] | FACTORY_MQTT_CLEAN_SESSION; + newSettings.mqtt_qos = root["mqtt_qos"] | EMSESP_DEFAULT_MQTT_QOS; + newSettings.mqtt_retain = root["mqtt_retain"] | EMSESP_DEFAULT_MQTT_RETAIN; newSettings.publish_time_boiler = root["publish_time_boiler"] | EMSESP_DEFAULT_PUBLISH_TIME; newSettings.publish_time_thermostat = root["publish_time_thermostat"] | EMSESP_DEFAULT_PUBLISH_TIME; @@ -205,6 +204,7 @@ StateUpdateResult MqttSettings::update(JsonObject & root, MqttSettings & setting newSettings.publish_single = root["publish_single"] | EMSESP_DEFAULT_PUBLISH_SINGLE; newSettings.publish_single2cmd = root["publish_single2cmd"] | EMSESP_DEFAULT_PUBLISH_SINGLE2CMD; newSettings.send_response = root["send_response"] | EMSESP_DEFAULT_SEND_RESPONSE; + newSettings.entity_format = root["entity_format"] | EMSESP_DEFAULT_ENTITY_FORMAT; if (newSettings.enabled != settings.enabled) { changed = true; diff --git a/lib/framework/MqttSettingsService.h b/lib/framework/MqttSettingsService.h index d4ec575cc..78ca7df7a 100644 --- a/lib/framework/MqttSettingsService.h +++ b/lib/framework/MqttSettingsService.h @@ -57,10 +57,6 @@ static String generateClientId() { #define FACTORY_MQTT_MAX_TOPIC_LENGTH 128 #endif -#ifndef FACTORY_MQTT_ENTITY_FORMAT -#define FACTORY_MQTT_ENTITY_FORMAT 1 // use shortnames -#endif - class MqttSettings { public: // host and port - if enabled @@ -79,9 +75,6 @@ class MqttSettings { uint16_t keepAlive; bool cleanSession; - // multiple instances - uint8_t entity_format; - // proddy EMS-ESP specific String base; uint16_t publish_time_boiler; @@ -99,6 +92,7 @@ class MqttSettings { bool publish_single; bool publish_single2cmd; bool send_response; + uint8_t entity_format; static void read(MqttSettings & settings, JsonObject & root); static StateUpdateResult update(JsonObject & root, MqttSettings & settings); diff --git a/scripts/dump_entities.py b/scripts/dump_entities.py index 7efc0fe0c..df1a65215 100644 --- a/scripts/dump_entities.py +++ b/scripts/dump_entities.py @@ -1,5 +1,6 @@ -# use like -# make clean; make ARGS=-DEMSESP_STANDALONE_DUMP; echo "test dump" | ./emsesp | python3 ./scripts/dump_entities.py +# strips out lines between two markers +# pipe a file into, for example: +# make clean; make ARGS=-DEMSESP_STANDALONE_DUMP; echo "test dump" | ./emsesp | python3 ./scripts/dump_entities.py import fileinput with fileinput.input() as f_input: diff --git a/scripts/dump_entities.sh b/scripts/dump_entities.sh index 76c7fb824..3ba5ad62f 100644 --- a/scripts/dump_entities.sh +++ b/scripts/dump_entities.sh @@ -2,4 +2,8 @@ # creates an CSV file called "dump_entities.cvs" with all devices and their entities # run from top folder like `sh ./scripts/dump_entities.sh` -make clean; make ARGS=-DEMSESP_STANDALONE_DUMP; echo "test dump" | ./emsesp | python3 ./scripts/dump_entities.py > dump_entities.csv +rm -f dump_entities.csv +make clean; +make ARGS=-DEMSESP_STANDALONE_DUMP; +echo "test dump" | ./emsesp | python3 ./scripts/dump_entities.py > dump_entities.csv +cat dump_entities.csv \ No newline at end of file diff --git a/src/default_settings.h b/src/default_settings.h index 230ae9c7f..4366eb4c7 100644 --- a/src/default_settings.h +++ b/src/default_settings.h @@ -209,6 +209,10 @@ #define EMSESP_DEFAULT_WEBLOG_COMPACT true #endif +#ifndef EMSESP_DEFAULT_ENTITY_FORMAT +#define EMSESP_DEFAULT_ENTITY_FORMAT 1 // in MQTT discovery, use shortnames and not multiple (prefixed with base) +#endif + // matches Web UI settings enum { diff --git a/src/emsdevice.cpp b/src/emsdevice.cpp index 58176d889..4d3cc0dd4 100644 --- a/src/emsdevice.cpp +++ b/src/emsdevice.cpp @@ -1063,7 +1063,8 @@ void EMSdevice::getCustomEntities(std::vector & entity_ids) { } #if defined(EMSESP_STANDALONE_DUMP) -// device name, device type, shortname, fullname, type [(enum values) | (min/max)], uom, readable, writeable, visible +// dumps all entity values in native English +// device name,device type,product_id,shortname,fullname,type [(enum values) | (min/max)],uom,writeable,discovery_entityid void EMSdevice::dump_value_info() { for (auto & dv : devicevalues_) { Serial.print(name_); @@ -1071,9 +1072,13 @@ void EMSdevice::dump_value_info() { Serial.print(device_type_name().c_str()); Serial.print(','); + Serial.print(product_id_); + Serial.print(','); + Serial.print(dv.short_name); Serial.print(','); - Serial.print(dv.get_fullname().c_str()); + + Serial.print(dv.fullname[0]); Serial.print(','); // type and optional enum values and min/max @@ -1161,12 +1166,54 @@ void EMSdevice::dump_value_info() { } Serial.print(","); - // readable, writeable, visible flags - Serial.print(!dv.has_state(DeviceValueState::DV_API_MQTT_EXCLUDE) ? "true" : "false"); - Serial.print(","); - Serial.print((dv.has_cmd && !dv.has_state(DeviceValueState::DV_READONLY)) ? "true" : "false"); + // writeable flag + Serial.print(dv.has_cmd ? "true" : "false"); Serial.print(","); - Serial.print(!dv.has_state(DeviceValueState::DV_WEB_EXCLUDE) ? "true" : "false"); + + // MQTT Discovery entity name, assuming we're using the default v3.5 option + char entity_with_tag[50]; + if (dv.tag >= DeviceValueTAG::TAG_HC1) { + snprintf(entity_with_tag, + sizeof(entity_with_tag), + "%s_%s_%s", + device_type_2_device_name(device_type_), + EMSdevice::tag_to_mqtt(dv.tag).c_str(), + dv.short_name); + } else { + // should really test for which device types have tags (like hc, wwc etc) + // snprintf(entity_with_tag, sizeof(entity_with_tag), "%s_[_]%s", device_type_2_device_name(device_type_), dv.short_name); + snprintf(entity_with_tag, sizeof(entity_with_tag), "%s_%s", device_type_2_device_name(device_type_), dv.short_name); + } + + char entityid[150]; + if (dv.has_cmd) { + switch (dv.type) { + case DeviceValueType::INT: + case DeviceValueType::UINT: + case DeviceValueType::SHORT: + case DeviceValueType::USHORT: + case DeviceValueType::ULONG: + snprintf(entityid, sizeof(entityid), "number.%s", entity_with_tag); + break; + case DeviceValueType::BOOL: + snprintf(entityid, sizeof(entityid), "switch.%s", entity_with_tag); + break; + case DeviceValueType::ENUM: + snprintf(entityid, sizeof(entityid), "select.%s", entity_with_tag); + break; + default: + snprintf(entityid, sizeof(entityid), "sensor.%s", entity_with_tag); + break; + } + } else { + if (dv.type == DeviceValueType::BOOL) { + snprintf(entityid, sizeof(entityid), "binary_sensor.%s", entity_with_tag); // binary sensor (for booleans) + } else { + snprintf(entityid, sizeof(entityid), "sensor.%s", entity_with_tag); // normal HA sensor + } + } + + Serial.print(entityid); Serial.println(); } diff --git a/src/emsdevice.h b/src/emsdevice.h index dde3da85c..f5d3937c1 100644 --- a/src/emsdevice.h +++ b/src/emsdevice.h @@ -201,7 +201,9 @@ class EMSdevice { bool get_value_info(JsonObject & root, const char * cmd, const int8_t id); void get_dv_info(JsonObject & json); +#if defined(EMSESP_STANDALONE_DUMP) void dump_value_info(); +#endif enum OUTPUT_TARGET : uint8_t { API_VERBOSE, API_SHORTNAMES, MQTT, CONSOLE }; bool generate_values(JsonObject & output, const uint8_t tag_filter, const bool nested, const uint8_t output_target); diff --git a/src/emsesp.cpp b/src/emsesp.cpp index be7aeea5c..792e6c229 100644 --- a/src/emsesp.cpp +++ b/src/emsesp.cpp @@ -313,7 +313,7 @@ void EMSESP::show_ems(uuid::console::Shell & shell) { void EMSESP::dump_all_values(uuid::console::Shell & shell) { Serial.println("---- CSV START ----"); // marker use by py script // add header for CSV - Serial.print("device name,device type,shortname,fullname,type [(enum values) | (min/max)],uom,readable,writeable,visible"); + Serial.print("device name,device type,product_id,shortname,fullname,type [(enum values) | (min/max)],uom,writeable,discovery_entityid"); Serial.println(); for (const auto & device_class : EMSFactory::device_handlers()) { diff --git a/src/locale_translations.h b/src/locale_translations.h index b5777e234..4a6dbda9a 100644 --- a/src/locale_translations.h +++ b/src/locale_translations.h @@ -260,12 +260,12 @@ MAKE_PSTR_LIST(outdoorTemp, "outdoortemp", "outside temperature", "Aussentempera MAKE_PSTR_LIST(curFlowTemp, "curflowtemp", "current flow temperature", "aktuelle Vorlauftemperatur", "Huidige aanvoertemperatuur", "Aktuell flödestemperatur", "temperatura zasilania", "aktuell strømmetemperatur", "température actuelle du flux") MAKE_PSTR_LIST(retTemp, "rettemp", "return temperature", "Rücklauftemperatur", "Retourtemperatuur", "Returtemperatur", "temperatura powrotu", "returtemperatur", "température de retour") MAKE_PSTR_LIST(switchTemp, "switchtemp", "mixing switch temperature", "Mischer Schalttemperatur", "Mixer temperatuur", "Blandartemperatur", "temperatura przełączania mieszacza", "Blandertemperatur", "température de bascule du mélangeur") -MAKE_PSTR_LIST(sysPress, "syspress", "system pressure", "Systemdruck", "Systeemdruk", "systemtryck", "ciśnienie w systemie", "systemtrykk", "pression du système") +MAKE_PSTR_LIST(sysPress, "syspress", "system pressure", "Systemdruck", "Systeemdruk", "Systemtryck", "ciśnienie w systemie", "systemtrykk", "pression du système") MAKE_PSTR_LIST(boilTemp, "boiltemp", "actual boiler temperature", "Kesseltemperatur", "Keteltemperatuur", "Temperatur Värmepanna", "temperatura zasobnika", "Temperatur Värmepanna", "température de la chaudière") MAKE_PSTR_LIST(exhaustTemp, "exhausttemp", "exhaust temperature", "Abgastemperatur", "Uitlaattemperatuur", "Avgastemperatur", "temperatura spalin", "røykgasstemp", "température des gaz d'échappement") MAKE_PSTR_LIST(burnGas, "burngas", "gas", "Gas", "Gas", "Gas", "gaz", "gass", "gaz") MAKE_PSTR_LIST(burnGas2, "burngas2", "gas stage 2", "Gas Stufe 2", "gas fase 2", "Gas Fas 2", "gaz 2 stopień", "gass 2", "gaz état 2") -MAKE_PSTR_LIST(flameCurr, "flamecurr", "flame current", "Flammenstrom", "Vlammenstroom", "Lagström", "prąd palnika", "flammestrøm", "courrant de flamme") +MAKE_PSTR_LIST(flameCurr, "flamecurr", "flame current", "Flammenstrom", "Vlammenstroom", "Lågström", "prąd palnika", "flammestrøm", "courrant de flamme") MAKE_PSTR_LIST(heatingPump, "heatingpump", "heating pump", "Heizungspumpe", "Verwarmingspomp", "Värmepump", "pompa ciepła", "varmepumpe", "pompe à chaleur") MAKE_PSTR_LIST(fanWork, "fanwork", "fan", "Gebläse", "Ventilator", "Fläkt", "wentylator", "vifte", "ventilateur") MAKE_PSTR_LIST(ignWork, "ignwork", "ignition", "Zündung", "Ontsteking", "Tändning", "zapłon", "tenning", "ignition") @@ -310,7 +310,7 @@ MAKE_PSTR_LIST(totalCompStarts, "totalcompstarts", "total compressor control sta MAKE_PSTR_LIST(heatingStarts, "heatingstarts", "heating control starts", "Heizen Starts", "Starts verwarmingsbedrijf", "Kompressorstarter Uppvärmning", "liczba załączeń ogrzewania", "kompressorstarter oppvarming", "démarrages contrôle chauffage") MAKE_PSTR_LIST(coolingStarts, "coolingstarts", "cooling control starts", "Kühlen Starts", "Starts koelbedrijf", "Kompressorstarter Kyla", "liczba załączeń chłodzenia", "kompressorstarter kjøling", "démarrages contrôle refroidissement") MAKE_PSTR_LIST(poolStarts, "poolstarts", "pool control starts", "Pool Starts", "Starts zwembadbedrijf", "Kompressorstarter Pool", "liczba załączeń podgrzewania basenu", "kompressorstarter basseng", "démarrages contrôle piscine") -MAKE_PSTR_LIST(nrgConsTotal, "nrgconstotal", "total energy consumption", "Energieverbrauch gesamt", "Energieverbrauch gesamt", "Energieverbruik totaal", "energia pobrana (sumarycznie)", "energiforbruk totalt", "consommation totale énergie") +MAKE_PSTR_LIST(nrgConsTotal, "nrgconstotal", "total energy consumption", "Energieverbrauch gesamt", "Energieverbrauch gesamt", "Energiförbrukning totalt", "energia pobrana (sumarycznie)", "energiforbruk totalt", "consommation totale énergie") MAKE_PSTR_LIST(nrgConsCompTotal, "nrgconscomptotal", "total energy consumption compressor", "Energieverbrauch Kompressor gesamt", "Energieverbruik compressor totaal", "Energiförbrukning kompressor", "energia pobrana przez sprężarkę", "energiforbruk kompressor", "consommation totale énergie compresseur") MAKE_PSTR_LIST(nrgConsCompHeating, "nrgconscompheating", "energy consumption compressor heating", "Energieverbrauch Kompressor heizen", "Energieverbruik compressor verwarmingsbedrijf", "Energiförbrukning uppvärmning", "energia pobrana przez sprężarkę na ogrzewanie", "energiforbruk oppvarming", "consommation énergie compresseur chauffage") MAKE_PSTR_LIST(nrgConsCompWw, "nrgconscompww", "energy consumption compressor dhw", "Energieverbrauch Kompressor", "Energieverbruik compressor warmwaterbedrijf", "Energiförbrukning varmvatten", "energia pobrana przez sprężarkę na c.w.u.", "energiforbruk varmvann", "consommation énergie compresseur ecs") @@ -367,23 +367,23 @@ MAKE_PSTR_LIST(maxHeatHeat, "maxheatheat", "heat limit heating", "Heizgrenze Hei MAKE_PSTR_LIST(maxHeatDhw, "maxheatdhw", "heat limit dhw", "Heizgrenze Warmwasser", "heat limit dhw", "heat limit dhw", "ograniczenie mocy w trybie c.w.u.", "varmegrense varmtvann", "limite chaleur ecs") // translations missing, remember order en, de, nl, se, pl, no, fr -MAKE_PSTR_LIST(auxHeaterOff, "auxheateroff", "disable auxilliary heater", "Verbiete Zusatzheizer", "Bijverwarming uitsc", "", "wyłącz dogrzewacz", "", "Désactiver chauff. d'app") -MAKE_PSTR_LIST(auxHeaterStatus, "auxheaterstatus", "auxilliary heater status", "Status Zusatzheizer", "Bijverwarming", "", "status dogrzewacza", "", "Chauffage auxiliaire") -MAKE_PSTR_LIST(auxHeaterOnly, "auxheateronly", "auxilliary heater only", "nur Zusatzheizer","Alleen bijverwarming", "", "tylko dogrzewacz", "", "Que chauffage auxiliaire") -MAKE_PSTR_LIST(auxHeaterDelay, "auxheaterdelay", "auxilliary heater on delay", "Zusatzheizer verzögert ein", "Bijverw. vertraagd aan", "Tillskottfördröjning på", "opóźnienie włączania dogrzewacza", "Tilleggsvarmer forsinket på", "Chauff app tempo marche") -MAKE_PSTR_LIST(silentMode, "silentmode", "silent mode", "Silentmodus", " Stiller gebruik", "", "trybu cichego", "", "Fct silencieux") -MAKE_PSTR_LIST(minTempSilent, "mintempsilent", "min. outside temp. for silent mode", "Minimale Aussentemperatur Silentmodus", " Stiller gebruik min. buitentemp", "", "minimalna temperatura zewnętrzna dla trybu cichego", "", "Fct silencieux: Temp. extérieure min.") -MAKE_PSTR_LIST(tempParMode, "tempparmode", "outside temp. parallel mode", "Aussentemperatur Parallelmodus", "Buitentemp. parallelbedr", "", "maksymalna temperatura zewnętrzna dla dogrzewacza", "", "Temp. ext. fct parallèle") -MAKE_PSTR_LIST(auxHeatMixValve, "auxheatmix", "aux. heater mixing valve", "Mischer Zusatzheizer", "Bijverwarming menger", "", "mieszacz dogrzewacza", "", "Chauffage auxiliaire mélangeur") -MAKE_PSTR_LIST(hpHystHeat, "hphystheat", "on/off hyst heat", "Schalthysterese Heizen", "Aan/uit-hysteresis in verw. bedrijf", "På/av-hystereses Husv.", "histereza wł./wył. ogrzewania", "På/av-hysterese Oppvar.", "Hystérésis Marche en mode chauffage") -MAKE_PSTR_LIST(hpHystCool, "hphystcool", "on/off hyst cool", "Schalthysterese Kühlen", "Aan/uit-hysteresis in koelbedrijf ", "", "histereza wł./wył. chłodzenia", "", "Hystérésis Marche en mode refroidissement") -MAKE_PSTR_LIST(hpHystPool, "hphystpool", "on/off hyst pool", "Schalthysterese Pool", "an/uit-hysteresis in zwembadbedri", "", "histereza wł./wył. podgrzewania basenu", "", "Hystérésis Marche en mode piscine") -MAKE_PSTR_LIST(tempDiffHeat, "tempdiffheat", "temp. diff. TC3/TC0 heat", "Temp.diff. TC3/TC0 Heizen", "Temp.vers. TC3/TC0 verw", "", "różnica temperatur TC3/TC0 w trakcie ogrzewania", "", "Delta T TC3/TC0 Chauff") -MAKE_PSTR_LIST(tempDiffCool, "tempdiffcool", "temp. diff. TC3/TC0 cool", "Temp.diff. TC3/TC0 Kühlen", "Temp.vers. TC3/TC0 koel.", "", "różnica temperatur TC3/TC0 w trakcie chłodzenia", "", "Delta T TC3/TC0 Refroid.") - -MAKE_PSTR_LIST(wwComfOffTemp, "wwcomfoff", "comfort switch off", "Komfort Ausschalttemp", "Comfort Uitschakeltemp.", "", "temperatura wyłączania w trybie komfort", "", "Confort Temp. d'arrêt") -MAKE_PSTR_LIST(wwEcoOffTemp, "wwecooff", "eco switch off", "ECO Ausschalttemp", "Eco Uitschakeltemp.", "", "temperatura wyłączania w trybie eko", "", "Eco Temp. d'arrêt") -MAKE_PSTR_LIST(wwEcoPlusOffTemp, "wwecoplusoff", "eco+ switch off", "ECO+ Ausschalttemp", "Eco+ Uitschakeltemp.", "", "temperatura wyłączania w trybie eko+", "", "Eco+ Temp. d'arrêt") +MAKE_PSTR_LIST(auxHeaterOff, "auxheateroff", "disable auxilliary heater", "Verbiete Zusatzheizer", "Bijverwarming uitsc", "Stäng av eltillskott", "wyłącz dogrzewacz", "", "Désactiver chauff. d'app") +MAKE_PSTR_LIST(auxHeaterStatus, "auxheaterstatus", "auxilliary heater status", "Status Zusatzheizer", "Bijverwarming", "Eltillskott Status", "status dogrzewacza", "", "Chauffage auxiliaire") +MAKE_PSTR_LIST(auxHeaterOnly, "auxheateronly", "auxilliary heater only", "nur Zusatzheizer","Alleen bijverwarming", "Eltillskott Enbart", "tylko dogrzewacz", "", "Que chauffage auxiliaire") +MAKE_PSTR_LIST(auxHeaterDelay, "auxheaterdelay", "auxilliary heater on delay", "Zusatzheizer verzögert ein", "Bijverw. vertraagd aan", "Eltillskottfördröjning på", "opóźnienie włączania dogrzewacza", "Tilleggsvarmer forsinket på", "Chauff app tempo marche") +MAKE_PSTR_LIST(silentMode, "silentmode", "silent mode", "Silentmodus", " Stiller gebruik", "Tyst läge", "trybu cichego", "", "Fct silencieux") +MAKE_PSTR_LIST(minTempSilent, "mintempsilent", "min. outside temp. for silent mode", "Minimale Aussentemperatur Silentmodus", " Stiller gebruik min. buitentemp", "Tyst läge min temp", "minimalna temperatura zewnętrzna dla trybu cichego", "", "Fct silencieux: Temp. extérieure min.") +MAKE_PSTR_LIST(tempParMode, "tempparmode", "outside temp. parallel mode", "Aussentemperatur Parallelmodus", "Buitentemp. parallelbedr", "Parallelläge Utomhustemp.", "maksymalna temperatura zewnętrzna dla dogrzewacza", "", "Temp. ext. fct parallèle") +MAKE_PSTR_LIST(auxHeatMixValve, "auxheatmix", "aux. heater mixing valve", "Mischer Zusatzheizer", "Bijverwarming menger", "Eltilskott Blandarventil", "mieszacz dogrzewacza", "", "Chauffage auxiliaire mélangeur") +MAKE_PSTR_LIST(hpHystHeat, "hphystheat", "on/off hyst heat", "Schalthysterese Heizen", "Aan/uit-hysteresis in verw. bedrijf", "På/av-hystereses Uppvärm.", "histereza wł./wył. ogrzewania", "På/av-hysterese Oppvar.", "Hystérésis Marche en mode chauffage") +MAKE_PSTR_LIST(hpHystCool, "hphystcool", "on/off hyst cool", "Schalthysterese Kühlen", "Aan/uit-hysteresis in koelbedrijf ", "På/av-hystereses Kyla", "histereza wł./wył. chłodzenia", "", "Hystérésis Marche en mode refroidissement") +MAKE_PSTR_LIST(hpHystPool, "hphystpool", "on/off hyst pool", "Schalthysterese Pool", "an/uit-hysteresis in zwembadbedri", "På/av-hystereses Pool", "histereza wł./wył. podgrzewania basenu", "", "Hystérésis Marche en mode piscine") +MAKE_PSTR_LIST(tempDiffHeat, "tempdiffheat", "temp. diff. TC3/TC0 heat", "Temp.diff. TC3/TC0 Heizen", "Temp.vers. TC3/TC0 verw", "Delta(T) TC3/TC0 Uppvärm.", "różnica temperatur TC3/TC0 w trakcie ogrzewania", "", "Delta T TC3/TC0 Chauff") +MAKE_PSTR_LIST(tempDiffCool, "tempdiffcool", "temp. diff. TC3/TC0 cool", "Temp.diff. TC3/TC0 Kühlen", "Temp.vers. TC3/TC0 koel.", "Delta(T) TC3/TC0 Kyla", "różnica temperatur TC3/TC0 w trakcie chłodzenia", "", "Delta T TC3/TC0 Refroid.") + +MAKE_PSTR_LIST(wwComfOffTemp, "wwcomfoff", "comfort switch off", "Komfort Ausschalttemp", "Comfort Uitschakeltemp.", "Komfortläge avstängingstemp.", "temperatura wyłączania w trybie komfort", "", "Confort Temp. d'arrêt") +MAKE_PSTR_LIST(wwEcoOffTemp, "wwecooff", "eco switch off", "ECO Ausschalttemp", "Eco Uitschakeltemp.", "Ekoläge avstängningstemp.", "temperatura wyłączania w trybie eko", "", "Eco Temp. d'arrêt") +MAKE_PSTR_LIST(wwEcoPlusOffTemp, "wwecoplusoff", "eco+ switch off", "ECO+ Ausschalttemp", "Eco+ Uitschakeltemp.", "Eko+ avstängningstemp.", "temperatura wyłączania w trybie eko+", "", "Eco+ Temp. d'arrêt") // hybrid heatpump MAKE_PSTR_LIST(hybridStrategy, "hybridstrategy", "hybrid control strategy", "Hybrid Strategie", "Hybride strategie", "Hybrid kontrollstrategi", "strategia sterowania hybrydowego", "hybrid kontrollstrategi", "stratégie contrôle hybride") @@ -393,19 +393,19 @@ MAKE_PSTR_LIST(fossileFactor, "fossilefactor", "fossile energy factor", "Energie MAKE_PSTR_LIST(electricFactor, "electricfactor", "electric energy factor", "Energiefaktor elektrisch", "Energiefactor electrisch", "Elektrisk energifaktor", "udział energii elektrycznej", "elektrisk energifaktor", "facteur énergie électrique") MAKE_PSTR_LIST(delayBoiler, "delayboiler", "delay boiler support", "Verzögerungs-Option", "Vertragingsoptie", "Fördörjningsoption", "opcja opóźnienia", "Fördörjningsoption", "option retardement chaudière") MAKE_PSTR_LIST(tempDiffBoiler, "tempdiffboiler", "temp diff boiler support", "Temperaturdifferenz-Option", "Verschiltemperatuuroptie", "Temperaturskillnadsoption", "opcja różnicy temperatur", "temperatursforskjell kjele", "option différence température") -MAKE_PSTR_LIST(lowNoiseMode, "lownoisemode", "low noise mode", "Geräuscharmer Betrieb", "", "", "tryb cichy", "", "mode faible bruit") -MAKE_PSTR_LIST(lowNoiseStart, "lownoisestart", "low noise starttime", "Start geräuscharmer Betrieb", "", "", "początek trybu cichego", "", "heure démarrage faible bruit") -MAKE_PSTR_LIST(lowNoiseStop, "lownoisestop", "low noise stoptime", "Stopp geräuscharmer Betrieb", "", "", "koniec trybu cichego", "", "heure arrêt faible bruit") -MAKE_PSTR_LIST(energyPriceGas, "energypricegas", "energy price gas", "Energiepreis Gas", "", "", "cena energii z gazu", "", "prix énergie gaz") -MAKE_PSTR_LIST(energyPriceEl, "energypriceel", "energy price electric", "Energiepreis Eletrizität", "", "", "cena energii elektrycznej", "", "prix énergie électrique") -MAKE_PSTR_LIST(energyPricePV, "energyfeedpv", "feed in PV", "PV Einspeisevergütung", "", "", "zasilanie energią fotowoltaiczną", "", "alimentation PV") -MAKE_PSTR_LIST(hybridDHW, "hybriddhw", "hybrid DHW", "Hybrid Warmwasser", "", "", "hybrydowa c.w.u.", "", "ecs hybride") -MAKE_PSTR_LIST(airPurgeMode, "airpurgemode", "air purge mode", "Luftspülung", "", "", "tryb oczyszczania powietrza", "", "mode purge air") -MAKE_PSTR_LIST(heatPumpOutput, "heatpumpoutput", "heatpump output", "WP Leistung", "", "", "moc wyjściowa pompy ciepła", "", "sortie pompe à chaleur") -MAKE_PSTR_LIST(coolingCircuit, "coolingcircuit", "cooling circuit", "Kühlkreislauf", "", "", "obwód chłodzący", "", "circuit refroidissement") -MAKE_PSTR_LIST(compStartMod, "compstartmod", "compressor start modulation", "Kompressor Startleistung", "", "", "początkowa modulacja sprężarki", "", "modulation démarrage compresseur") -MAKE_PSTR_LIST(heatDrainPan, "heatdrainpan", "heat drain pan", "Wärmeausgleichsgefäß", "", "", "zbiornik wyrównawczy ciepła", "", "bac récupération chaleur") -MAKE_PSTR_LIST(heatCable, "heatcable", "heating cable", "Heizband", "heating cable", "heating cable", "przewód grzejny", "", "câble chauffant") +MAKE_PSTR_LIST(lowNoiseMode, "lownoisemode", "low noise mode", "Geräuscharmer Betrieb", "", "Tyst läge", "tryb cichy", "", "mode faible bruit") +MAKE_PSTR_LIST(lowNoiseStart, "lownoisestart", "low noise starttime", "Start geräuscharmer Betrieb", "", "Tyst läge starttid", "początek trybu cichego", "", "heure démarrage faible bruit") +MAKE_PSTR_LIST(lowNoiseStop, "lownoisestop", "low noise stoptime", "Stopp geräuscharmer Betrieb", "", "Tyst läge stopptid", "koniec trybu cichego", "", "heure arrêt faible bruit") +MAKE_PSTR_LIST(energyPriceGas, "energypricegas", "energy price gas", "Energiepreis Gas", "", "Gaspris", "cena energii z gazu", "", "prix énergie gaz") +MAKE_PSTR_LIST(energyPriceEl, "energypriceel", "energy price electric", "Energiepreis Eletrizität", "", "Elpris", "cena energii elektrycznej", "", "prix énergie électrique") +MAKE_PSTR_LIST(energyPricePV, "energyfeedpv", "feed in PV", "PV Einspeisevergütung", "", "PV Energi", "zasilanie energią fotowoltaiczną", "", "alimentation PV") +MAKE_PSTR_LIST(hybridDHW, "hybriddhw", "hybrid DHW", "Hybrid Warmwasser", "", "Hybridläge varmvatten", "hybrydowa c.w.u.", "", "ecs hybride") +MAKE_PSTR_LIST(airPurgeMode, "airpurgemode", "air purge mode", "Luftspülung", "", "Luftreningsläge", "tryb oczyszczania powietrza", "", "mode purge air") +MAKE_PSTR_LIST(heatPumpOutput, "heatpumpoutput", "heatpump output", "WP Leistung", "", "Värmepumpseffekt", "moc wyjściowa pompy ciepła", "", "sortie pompe à chaleur") +MAKE_PSTR_LIST(coolingCircuit, "coolingcircuit", "cooling circuit", "Kühlkreislauf", "", "Kylkrets", "obwód chłodzący", "", "circuit refroidissement") +MAKE_PSTR_LIST(compStartMod, "compstartmod", "compressor start modulation", "Kompressor Startleistung", "", "Kompressor startmodulering", "początkowa modulacja sprężarki", "", "modulation démarrage compresseur") +MAKE_PSTR_LIST(heatDrainPan, "heatdrainpan", "heat drain pan", "Wärmeausgleichsgefäß", "", "Uppvärm. dränering", "zbiornik wyrównawczy ciepła", "", "bac récupération chaleur") +MAKE_PSTR_LIST(heatCable, "heatcable", "heating cable", "Heizband", "heating cable", "värmekabel", "przewód grzejny", "", "câble chauffant") // alternative heatsource AM200 MAKE_PSTR_LIST(aCylTopTemp, "cyltoptemp", "cylinder top temperature", "Speichertemperatur Oben", "Buffer temperatuur boven", "Cylindertemperatur Toppen", "temperatura na górze cylindra", "beredertemperatur topp", "température haut cylindre") diff --git a/src/mqtt.cpp b/src/mqtt.cpp index 76a87da0e..d9d5cb456 100644 --- a/src/mqtt.cpp +++ b/src/mqtt.cpp @@ -992,12 +992,11 @@ void Mqtt::publish_ha_sensor_config(uint8_t type, // EMSdev // prefix base name to each uniq_id and use the shortname snprintf(uniq_id, sizeof(uniq_id), "%s_%s_%s", mqtt_basename_.c_str(), device_name, entity_with_tag); } else if (Mqtt::entity_format() == 1) { - // shortname, no mqtt base + // shortname, no mqtt base. This is the default version. snprintf(uniq_id, sizeof(uniq_id), "%s_%s", device_name, entity_with_tag); } else { - // entity_format is 0 - // old v3.4 style - // take en_name and replace all spaces and lowercase it + // entity_format is 0, the old v3.4 style + // take en_name and replace all spaces char uniq_s[60]; strlcpy(uniq_s, en_name, sizeof(uniq_s)); Helpers::replace_char(uniq_s, ' ', '_');