diff --git a/interface/package-lock.json b/interface/package-lock.json index 92f489cf9..74b349269 100644 --- a/interface/package-lock.json +++ b/interface/package-lock.json @@ -12,10 +12,10 @@ "@emotion/styled": "^11.10.5", "@msgpack/msgpack": "^2.8.0", "@mui/icons-material": "^5.10.9", - "@mui/material": "^5.10.11", + "@mui/material": "^5.10.12", "@table-library/react-table-library": "4.0.23", "@types/lodash": "^4.14.186", - "@types/node": "^18.11.7", + "@types/node": "^18.11.8", "@types/react": "^18.0.24", "@types/react-dom": "^18.0.8", "@types/react-router-dom": "^5.3.3", @@ -3091,9 +3091,9 @@ } }, "node_modules/@mui/base": { - "version": "5.0.0-alpha.103", - "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-alpha.103.tgz", - "integrity": "sha512-fJIyB2df3CHn7D26WHnutnY7vew6aytTlhmRJz6GX7ag19zU2GcOUhJAzY5qwWcrXKnlYgzimhEjaEnuiUWU4g==", + "version": "5.0.0-alpha.104", + "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-alpha.104.tgz", + "integrity": "sha512-tQPxZTzfYMwxYfKhEwufbTfdLpNjFdW7bXq6dK0j8651AAyZL4M8wynWUQ98hH1362R26mZFhVxHB2UD9t7VuA==", "dependencies": { "@babel/runtime": "^7.19.0", "@emotion/is-prop-valid": "^1.2.0", @@ -3123,9 +3123,9 @@ } }, "node_modules/@mui/core-downloads-tracker": { - "version": "5.10.11", - "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.10.11.tgz", - "integrity": "sha512-u5ff+UCFDHcR8MoQ8tuJR4c35vt7T/ki3aMEE2O3XQoGs8KJSrBiisFpFKyldg9/W2NSyoZxN+kxEGIfRxh+9Q==", + "version": "5.10.12", + "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.10.12.tgz", + "integrity": "sha512-cR8lOS606G++iVHR8I6ySgMAEiPoA3DxO/nLeqiv7w7d1707kvKoV4/7SWjh4ui+kHb052xlf/G196q2EKx31w==", "funding": { "type": "opencollective", "url": "https://opencollective.com/mui" @@ -3157,14 +3157,14 @@ } }, "node_modules/@mui/material": { - "version": "5.10.11", - "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.10.11.tgz", - "integrity": "sha512-KJ0wPCTbv6sFzwA3dgg0gowdfF+SRl7D510J9l6Nl/KFX0EawcewQudqKY4slYGFXniKa5PykqokpaWXsCCPqg==", + "version": "5.10.12", + "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.10.12.tgz", + "integrity": "sha512-rG9ZTkG9qUwujyAY1I+uQAa9pkGdsWY3KN+wvS/6H6ZbYIA06QRwmig6ySC6LbeB3WL/I/1ngwJqWX7nfINSbA==", "dependencies": { "@babel/runtime": "^7.19.0", - "@mui/base": "5.0.0-alpha.103", - "@mui/core-downloads-tracker": "^5.10.11", - "@mui/system": "^5.10.10", + "@mui/base": "5.0.0-alpha.104", + "@mui/core-downloads-tracker": "^5.10.12", + "@mui/system": "^5.10.12", "@mui/types": "^7.2.0", "@mui/utils": "^5.10.9", "@types/react-transition-group": "^4.4.5", @@ -3258,9 +3258,9 @@ } }, "node_modules/@mui/system": { - "version": "5.10.10", - "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.10.10.tgz", - "integrity": "sha512-TXwtKN0adKpBrZmO+eilQWoPf2veh050HLYrN78Kps9OhlvO70v/2Kya0+mORFhu9yhpAwjHXO8JII/R4a5ZLA==", + "version": "5.10.12", + "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.10.12.tgz", + "integrity": "sha512-9DcN3hF2KTTTpZ0K5Tn20B+Tz7tIqDmJLk1M6P0CYoAGUN/xrcF/6dn1zZ829rxE5tmauoDUekTfomrvPsvlSQ==", "dependencies": { "@babel/runtime": "^7.19.0", "@mui/private-theming": "^5.10.9", @@ -19614,9 +19614,9 @@ "integrity": "sha512-h9u4u/jiIRKbq25PM+zymTyW6bhTzELvOoUd+AvYriWOAKpLGnIamaET3pnHYoI5iYphAHBI4ayx0MehR+VVPQ==" }, "@mui/base": { - "version": "5.0.0-alpha.103", - "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-alpha.103.tgz", - "integrity": "sha512-fJIyB2df3CHn7D26WHnutnY7vew6aytTlhmRJz6GX7ag19zU2GcOUhJAzY5qwWcrXKnlYgzimhEjaEnuiUWU4g==", + "version": "5.0.0-alpha.104", + "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-alpha.104.tgz", + "integrity": "sha512-tQPxZTzfYMwxYfKhEwufbTfdLpNjFdW7bXq6dK0j8651AAyZL4M8wynWUQ98hH1362R26mZFhVxHB2UD9t7VuA==", "requires": { "@babel/runtime": "^7.19.0", "@emotion/is-prop-valid": "^1.2.0", @@ -19629,9 +19629,9 @@ } }, "@mui/core-downloads-tracker": { - "version": "5.10.11", - "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.10.11.tgz", - "integrity": "sha512-u5ff+UCFDHcR8MoQ8tuJR4c35vt7T/ki3aMEE2O3XQoGs8KJSrBiisFpFKyldg9/W2NSyoZxN+kxEGIfRxh+9Q==" + "version": "5.10.12", + "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.10.12.tgz", + "integrity": "sha512-cR8lOS606G++iVHR8I6ySgMAEiPoA3DxO/nLeqiv7w7d1707kvKoV4/7SWjh4ui+kHb052xlf/G196q2EKx31w==" }, "@mui/icons-material": { "version": "5.10.9", @@ -19642,14 +19642,14 @@ } }, "@mui/material": { - "version": "5.10.11", - "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.10.11.tgz", - "integrity": "sha512-KJ0wPCTbv6sFzwA3dgg0gowdfF+SRl7D510J9l6Nl/KFX0EawcewQudqKY4slYGFXniKa5PykqokpaWXsCCPqg==", + "version": "5.10.12", + "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.10.12.tgz", + "integrity": "sha512-rG9ZTkG9qUwujyAY1I+uQAa9pkGdsWY3KN+wvS/6H6ZbYIA06QRwmig6ySC6LbeB3WL/I/1ngwJqWX7nfINSbA==", "requires": { "@babel/runtime": "^7.19.0", - "@mui/base": "5.0.0-alpha.103", - "@mui/core-downloads-tracker": "^5.10.11", - "@mui/system": "^5.10.10", + "@mui/base": "5.0.0-alpha.104", + "@mui/core-downloads-tracker": "^5.10.12", + "@mui/system": "^5.10.12", "@mui/types": "^7.2.0", "@mui/utils": "^5.10.9", "@types/react-transition-group": "^4.4.5", @@ -19682,9 +19682,9 @@ } }, "@mui/system": { - "version": "5.10.10", - "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.10.10.tgz", - "integrity": "sha512-TXwtKN0adKpBrZmO+eilQWoPf2veh050HLYrN78Kps9OhlvO70v/2Kya0+mORFhu9yhpAwjHXO8JII/R4a5ZLA==", + "version": "5.10.12", + "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.10.12.tgz", + "integrity": "sha512-9DcN3hF2KTTTpZ0K5Tn20B+Tz7tIqDmJLk1M6P0CYoAGUN/xrcF/6dn1zZ829rxE5tmauoDUekTfomrvPsvlSQ==", "requires": { "@babel/runtime": "^7.19.0", "@mui/private-theming": "^5.10.9", diff --git a/interface/package.json b/interface/package.json index 1fa89b2e0..e5b1afac4 100644 --- a/interface/package.json +++ b/interface/package.json @@ -8,10 +8,10 @@ "@emotion/styled": "^11.10.5", "@msgpack/msgpack": "^2.8.0", "@mui/icons-material": "^5.10.9", - "@mui/material": "^5.10.11", + "@mui/material": "^5.10.12", "@table-library/react-table-library": "4.0.23", "@types/lodash": "^4.14.186", - "@types/node": "^18.11.7", + "@types/node": "^18.11.8", "@types/react": "^18.0.24", "@types/react-dom": "^18.0.8", "@types/react-router-dom": "^5.3.3", diff --git a/interface/src/components/upload/useFileUpload.ts b/interface/src/components/upload/useFileUpload.ts index cc2f296d3..dacc0cd95 100644 --- a/interface/src/components/upload/useFileUpload.ts +++ b/interface/src/components/upload/useFileUpload.ts @@ -51,7 +51,7 @@ const useFileUpload = ({ upload }: MediaUploadOptions) => { if (response.status === 200) { enqueueSnackbar(LL.UPLOAD() + ' ' + LL.SUCCESSFUL(), { variant: 'success' }); } else if (response.status === 201) { - setMd5((String)(response.data)); + setMd5(String(response.data)); enqueueSnackbar(LL.UPLOAD() + ' MD5 ' + LL.SUCCESSFUL(), { variant: 'success' }); } } catch (error) { diff --git a/interface/src/framework/system/GeneralFileUpload.tsx b/interface/src/framework/system/GeneralFileUpload.tsx index f5aa03f50..ff49a9155 100644 --- a/interface/src/framework/system/GeneralFileUpload.tsx +++ b/interface/src/framework/system/GeneralFileUpload.tsx @@ -22,7 +22,6 @@ interface UploadFileProps { } const GeneralFileUpload: FC = ({ uploadGeneralFile }) => { - const [uploadFile, cancelUpload, uploading, uploadProgress, md5] = useFileUpload({ upload: uploadGeneralFile }); const { enqueueSnackbar } = useSnackbar(); diff --git a/interface/src/framework/system/SystemStatusForm.tsx b/interface/src/framework/system/SystemStatusForm.tsx index 7ead2e2a4..f8dde19ea 100644 --- a/interface/src/framework/system/SystemStatusForm.tsx +++ b/interface/src/framework/system/SystemStatusForm.tsx @@ -72,7 +72,6 @@ const SystemStatusForm: FC = () => { version: response.data.name, url: response.data.assets[1].browser_download_url, changelog: response.data.assets[0].browser_download_url - }); }); axios.get(VERSIONCHECK_DEV_ENDPOINT).then((response) => { @@ -308,7 +307,9 @@ const SystemStatusForm: FC = () => { diff --git a/interface/src/i18n/de/index.ts b/interface/src/i18n/de/index.ts index ed7b70ba4..e4ef844f3 100644 --- a/interface/src/i18n/de/index.ts +++ b/interface/src/i18n/de/index.ts @@ -31,7 +31,7 @@ const de: Translation = { DEVICE_DETAILS: 'Geräte Details', BRAND: 'Marke', ENTITY_NAME: 'Entitätsname', - VALUE: 'Wert', + VALUE: '{{Wert||wert}}', SHOW_FAV: 'nur Favoriten anzeigen', DEVICE_SENSOR_DATA: 'Geräte- und Sensordaten', DEVICES_SENSORS: 'Geräte & Sensoren', @@ -202,7 +202,8 @@ const de: Translation = { DOWNLOAD_CUSTOMIZATION_TEXT: 'Herunterladen der individuellen Entitätsanpassungen', DOWNLOAD_SETTINGS_TEXT: 'Herunterladen der Anwendungseinstellungen. Vorsicht beim Teilen der Einstellungen, da sie Passwörter und andere sensitive Einstellungen enthalten', - UPLOAD_TEXT: 'Hochladen von neuer Firmware (.bin), Geräte- oder Entitätseinstellungen (.json), zur optionalen Validitätsprüfung zuerst die (.md5) Datei hochladen', + UPLOAD_TEXT: + 'Hochladen von neuer Firmware (.bin), Geräte- oder Entitätseinstellungen (.json), zur optionalen Validitätsprüfung zuerst die (.md5) Datei hochladen', UPLOADING: 'Hochladen', UPLOAD_DROP_TEXT: 'Klicken Sie hier, oder ziehen eine Datei hierher', ERROR: 'Unerwarteter Fehler, bitter versuchen Sie es erneut', diff --git a/interface/src/i18n/en/index.ts b/interface/src/i18n/en/index.ts index d4bb52cfe..e06d71f6f 100644 --- a/interface/src/i18n/en/index.ts +++ b/interface/src/i18n/en/index.ts @@ -31,7 +31,7 @@ const en: BaseTranslation = { DEVICE_DETAILS: 'Device Details', BRAND: 'Brand', ENTITY_NAME: 'Entity Name', - VALUE: '{{Value}}', + VALUE: '{{Value|value}}', SHOW_FAV: 'only show favorites', DEVICE_SENSOR_DATA: 'Device and Sensor Data', DEVICES_SENSORS: 'Devices & Sensors', @@ -203,7 +203,8 @@ const en: BaseTranslation = { DOWNLOAD_CUSTOMIZATION_TEXT: 'Download the entity customizations', DOWNLOAD_SETTINGS_TEXT: 'Download the application settings. Be careful when sharing your settings as this file contains passwords and other sensitive system information', - UPLOAD_TEXT: 'Upload a new firmware (.bin) file, settings or customizations (.json) file below, for optional validation upload (.md5) first', + UPLOAD_TEXT: + 'Upload a new firmware (.bin) file, settings or customizations (.json) file below, for optional validation upload (.md5) first', UPLOADING: 'Uploading', UPLOAD_DROP_TEXT: 'Drop file or click here', ERROR: 'Unexpected Error, please try again', diff --git a/interface/src/i18n/nl/index.ts b/interface/src/i18n/nl/index.ts index ccaacc105..1ab08c6ed 100644 --- a/interface/src/i18n/nl/index.ts +++ b/interface/src/i18n/nl/index.ts @@ -31,7 +31,7 @@ const nl: Translation = { DEVICE_DETAILS: 'Device Gegevens', BRAND: 'Merk', ENTITY_NAME: 'Entiteit', - VALUE: 'Waarde', + VALUE: '{{Waarde|waarde}}', SHOW_FAV: 'alleen favorieten weergeven', DEVICE_SENSOR_DATA: 'Apparaat en Sensor data', DEVICES_SENSORS: 'Apparaten & Sensoren', diff --git a/interface/src/i18n/no/index.ts b/interface/src/i18n/no/index.ts index 002cedb6d..7a8bf8041 100644 --- a/interface/src/i18n/no/index.ts +++ b/interface/src/i18n/no/index.ts @@ -31,7 +31,7 @@ const no: Translation = { DEVICE_DETAILS: 'Enhetsdetaljer', BRAND: 'Fabrikat', ENTITY_NAME: 'Objektsnavn', - VALUE: 'Verdi', + VALUE: '{{Verdi|verdi}}', SHOW_FAV: ' Vis kun favoritter', DEVICE_SENSOR_DATA: 'Enheter og Sensordata', DEVICES_SENSORS: 'Enheter og Sensorer', diff --git a/interface/src/i18n/se/index.ts b/interface/src/i18n/se/index.ts index 9cc334684..d8beb47a7 100644 --- a/interface/src/i18n/se/index.ts +++ b/interface/src/i18n/se/index.ts @@ -31,7 +31,7 @@ const se: Translation = { DEVICE_DETAILS: 'Enhetsdetaljer', BRAND: 'Fabrikat', ENTITY_NAME: 'Entitetsnamn', - VALUE: 'Värde', + VALUE: '{{Värde|värde}}', SHOW_FAV: 'Visa enbart favoriter', DEVICE_SENSOR_DATA: 'Enhets och Sensor-data', DEVICES_SENSORS: 'Enheter & Sensorer', diff --git a/interface/src/project/SettingsApplication.tsx b/interface/src/project/SettingsApplication.tsx index 6a1dd3d32..f73617d31 100644 --- a/interface/src/project/SettingsApplication.tsx +++ b/interface/src/project/SettingsApplication.tsx @@ -318,10 +318,10 @@ const SettingsApplication: FC = () => { Time Module (0x0F) Gateway 1 (0x48) Gateway 2 (0x49) - Gateway 3 (0x4A) - Gateway 4 (0x4B) - Gateway 5 (0x4C) - Gateway 7 (0x4D) + Gateway 3 (0x4A) + Gateway 4 (0x4B) + Gateway 5 (0x4C) + Gateway 7 (0x4D) diff --git a/interface/src/project/SettingsCustomization.tsx b/interface/src/project/SettingsCustomization.tsx index 850054ad3..c2003d2c7 100644 --- a/interface/src/project/SettingsCustomization.tsx +++ b/interface/src/project/SettingsCustomization.tsx @@ -511,8 +511,8 @@ const SettingsCustomization: FC = () => { {formatName(de)} - {!(de.m & DeviceEntityMask.DV_READONLY) && (formatValue(de.mi))} - {!(de.m & DeviceEntityMask.DV_READONLY) && (formatValue(de.ma))} + {!(de.m & DeviceEntityMask.DV_READONLY) && formatValue(de.mi)} + {!(de.m & DeviceEntityMask.DV_READONLY) && formatValue(de.ma)} {formatValue(de.v)} ))} diff --git a/src/default_settings.h b/src/default_settings.h index 70d373aaf..70145925d 100644 --- a/src/default_settings.h +++ b/src/default_settings.h @@ -25,8 +25,8 @@ #define EMSESP_DEFAULT_LOCALE EMSESP_LOCALE_EN // English #else // this is for debugging different languages in standalone version -#define EMSESP_DEFAULT_LOCALE EMSESP_LOCALE_DE // German -// #define EMSESP_DEFAULT_LOCALE EMSESP_LOCALE_EN // English +// #define EMSESP_DEFAULT_LOCALE EMSESP_LOCALE_DE // German +#define EMSESP_DEFAULT_LOCALE EMSESP_LOCALE_EN // English #endif #ifndef EMSESP_DEFAULT_TX_MODE diff --git a/src/system.cpp b/src/system.cpp index 64a00c0dd..1bd259c85 100644 --- a/src/system.cpp +++ b/src/system.cpp @@ -1021,7 +1021,7 @@ bool System::command_info(const char * value, const int8_t id, JsonObject & outp JsonObject node; // System - node = output.createNestedObject("System Status"); + node = output.createNestedObject("System Info"); node["version"] = EMSESP_APP_VERSION; node["platform"] = EMSESP_PLATFORM; node["uptime"] = uuid::log::format_timestamp_ms(uuid::get_uptime_ms(), 3); @@ -1034,7 +1034,7 @@ bool System::command_info(const char * value, const int8_t id, JsonObject & outp #ifndef EMSESP_STANDALONE // Network Status - node = output.createNestedObject("Network Status"); + node = output.createNestedObject("Network Info"); if (WiFi.status() == WL_CONNECTED) { node["connection"] = "WiFi"; node["hostname"] = WiFi.getHostname(); @@ -1082,9 +1082,9 @@ bool System::command_info(const char * value, const int8_t id, JsonObject & outp #endif // NTP status - node = output.createNestedObject("NTP Status"); + node = output.createNestedObject("NTP Info"); #ifndef EMSESP_STANDALONE - node["network time"] = EMSESP::system_.ntp_connected() ? "connected" : "disconnected"; + node["NTP status"] = EMSESP::system_.ntp_connected() ? "connected" : "disconnected"; EMSESP::esp8266React.getNTPSettingsService()->read([&](NTPSettings & settings) { node["enabled"] = settings.enabled; node["server"] = settings.server; @@ -1093,7 +1093,7 @@ bool System::command_info(const char * value, const int8_t id, JsonObject & outp }); // OTA status - node = output.createNestedObject("OTA Status"); + node = output.createNestedObject("OTA Info"); EMSESP::esp8266React.getOTASettingsService()->read([&](OTASettings & settings) { node["enabled"] = settings.enabled; node["port"] = settings.port; @@ -1101,7 +1101,7 @@ bool System::command_info(const char * value, const int8_t id, JsonObject & outp #endif // MQTT Status - node = output.createNestedObject("MQTT Status"); + node = output.createNestedObject("MQTT Info"); node["MQTT status"] = Mqtt::connected() ? F_(connected) : F_(disconnected); if (Mqtt::enabled()) { node["MQTT publishes"] = Mqtt::publish_count(); @@ -1132,7 +1132,7 @@ bool System::command_info(const char * value, const int8_t id, JsonObject & outp }); // Syslog Status - node = output.createNestedObject("Syslog Status"); + node = output.createNestedObject("Syslog Info"); node["enabled"] = EMSESP::system_.syslog_enabled_; #ifndef EMSESP_STANDALONE if (EMSESP::system_.syslog_enabled_) { @@ -1144,7 +1144,7 @@ bool System::command_info(const char * value, const int8_t id, JsonObject & outp #endif // Sensor Status - node = output.createNestedObject("Sensor Status"); + node = output.createNestedObject("Sensor Info"); if (EMSESP::dallas_enabled()) { node["temperature sensors"] = EMSESP::dallassensor_.no_sensors(); node["temperature sensor reads"] = EMSESP::dallassensor_.reads(); @@ -1157,12 +1157,12 @@ bool System::command_info(const char * value, const int8_t id, JsonObject & outp } // API Status - node = output.createNestedObject("API Status"); + node = output.createNestedObject("API Info"); node["API calls"] = WebAPIService::api_count(); node["API fails"] = WebAPIService::api_fails(); // EMS Bus Status - node = output.createNestedObject("Bus Status"); + node = output.createNestedObject("Bus Info"); switch (EMSESP::bus_status()) { case EMSESP::BUS_STATUS_OFFLINE: node["bus status"] = "disconnected"; @@ -1219,34 +1219,36 @@ bool System::command_info(const char * value, const int8_t id, JsonObject & outp node["telnet enabled"] = settings.telnet_enabled; }); - // Devices - show EMS devices - JsonArray devices = output.createNestedArray("Devices"); - for (const auto & device_class : EMSFactory::device_handlers()) { - for (const auto & emsdevice : EMSESP::emsdevices) { - if (emsdevice && (emsdevice->device_type() == device_class.first)) { - JsonObject obj = devices.createNestedObject(); - obj["type"] = emsdevice->device_type_name(); - obj["name"] = emsdevice->name(); - obj["device id"] = Helpers::hextoa(emsdevice->device_id()); - obj["product id"] = emsdevice->product_id(); - obj["version"] = emsdevice->version(); - obj["entities"] = emsdevice->count_entities(); - char result[300]; - (void)emsdevice->show_telegram_handlers(result, sizeof(result), EMSdevice::Handlers::RECEIVED); - if (result[0] != '\0') { - obj["handlers received"] = result; // don't show handlers if there aren't any - } - (void)emsdevice->show_telegram_handlers(result, sizeof(result), EMSdevice::Handlers::FETCHED); - if (result[0] != '\0') { - obj["handlers fetched"] = result; - } - (void)emsdevice->show_telegram_handlers(result, sizeof(result), EMSdevice::Handlers::PENDING); - if (result[0] != '\0') { - obj["handlers pending"] = result; - } - (void)emsdevice->show_telegram_handlers(result, sizeof(result), EMSdevice::Handlers::IGNORED); - if (result[0] != '\0') { - obj["handlers ignored"] = result; + // Devices - show EMS devices if we have any + if (!EMSESP::emsdevices.empty()) { + JsonArray devices = output.createNestedArray("Devices"); + for (const auto & device_class : EMSFactory::device_handlers()) { + for (const auto & emsdevice : EMSESP::emsdevices) { + if (emsdevice && (emsdevice->device_type() == device_class.first)) { + JsonObject obj = devices.createNestedObject(); + obj["type"] = emsdevice->device_type_name(); + obj["name"] = emsdevice->name(); + obj["device id"] = Helpers::hextoa(emsdevice->device_id()); + obj["product id"] = emsdevice->product_id(); + obj["version"] = emsdevice->version(); + obj["entities"] = emsdevice->count_entities(); + char result[300]; + (void)emsdevice->show_telegram_handlers(result, sizeof(result), EMSdevice::Handlers::RECEIVED); + if (result[0] != '\0') { + obj["handlers received"] = result; // don't show handlers if there aren't any + } + (void)emsdevice->show_telegram_handlers(result, sizeof(result), EMSdevice::Handlers::FETCHED); + if (result[0] != '\0') { + obj["handlers fetched"] = result; + } + (void)emsdevice->show_telegram_handlers(result, sizeof(result), EMSdevice::Handlers::PENDING); + if (result[0] != '\0') { + obj["handlers pending"] = result; + } + (void)emsdevice->show_telegram_handlers(result, sizeof(result), EMSdevice::Handlers::IGNORED); + if (result[0] != '\0') { + obj["handlers ignored"] = result; + } } } } diff --git a/src/test/test.cpp b/src/test/test.cpp index f791b5f9d..3135f6ba4 100644 --- a/src/test/test.cpp +++ b/src/test/test.cpp @@ -1339,6 +1339,10 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & cmd, const uart_telegram({0x90, 0x00, 0xFF, 0x00, 0x00, 0x70, 0x02, 0x01, 0x00, 0xCE, 0x00, 0xE5}); uart_telegram({0x90, 0x00, 0xFF, 0x00, 0x00, 0x71, 0x01, 0x02, 0x00, 0xCF, 0x00, 0xE6}); + // add room sensor - test for https://github.com/emsesp/EMS-ESP32/issues/699 + // use auto + uart_telegram("90 00 FF 00 00 65 01 00 02 19 3D 42 02 01 00 03 FF 28 06 01 02 20 27 29 01 01 00"); + shell.invoke_command("help"); shell.invoke_command("call"); shell.invoke_command("call system info"); diff --git a/src/web/WebStatusService.cpp b/src/web/WebStatusService.cpp index 1b9935bfc..97eac7156 100644 --- a/src/web/WebStatusService.cpp +++ b/src/web/WebStatusService.cpp @@ -226,6 +226,7 @@ void WebStatusService::mDNS_start() const { } const char * WebStatusService::disconnectReason(uint8_t code) { +#ifndef EMSESP_STANDALONE switch (code) { case WIFI_REASON_UNSPECIFIED: // = 1, return "unspecifiied"; @@ -286,6 +287,8 @@ const char * WebStatusService::disconnectReason(uint8_t code) { default: return "unknown"; } +#endif + return ""; }