mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-09 01:09:51 +03:00
64
interface/package-lock.json
generated
64
interface/package-lock.json
generated
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -22,7 +22,6 @@ interface UploadFileProps {
|
||||
}
|
||||
|
||||
const GeneralFileUpload: FC<UploadFileProps> = ({ uploadGeneralFile }) => {
|
||||
|
||||
const [uploadFile, cancelUpload, uploading, uploadProgress, md5] = useFileUpload({ upload: uploadGeneralFile });
|
||||
|
||||
const { enqueueSnackbar } = useSnackbar();
|
||||
|
||||
@@ -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 = () => {
|
||||
</ListItemAvatar>
|
||||
<ListItemText
|
||||
primary={LL.FLASH()}
|
||||
secondary={formatNumber(data.flash_chip_size) + ' KB / ' + (data.flash_chip_speed / 1000000).toFixed(0) + ' MHz'}
|
||||
secondary={
|
||||
formatNumber(data.flash_chip_size) + ' KB / ' + (data.flash_chip_speed / 1000000).toFixed(0) + ' MHz'
|
||||
}
|
||||
/>
|
||||
</ListItem>
|
||||
<Divider variant="inset" component="li" />
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -318,10 +318,10 @@ const SettingsApplication: FC = () => {
|
||||
<MenuItem value={0x0f}>Time Module (0x0F)</MenuItem>
|
||||
<MenuItem value={0x48}>Gateway 1 (0x48)</MenuItem>
|
||||
<MenuItem value={0x49}>Gateway 2 (0x49)</MenuItem>
|
||||
<MenuItem value={0x4A}>Gateway 3 (0x4A)</MenuItem>
|
||||
<MenuItem value={0x4B}>Gateway 4 (0x4B)</MenuItem>
|
||||
<MenuItem value={0x4C}>Gateway 5 (0x4C)</MenuItem>
|
||||
<MenuItem value={0x4D}>Gateway 7 (0x4D)</MenuItem>
|
||||
<MenuItem value={0x4a}>Gateway 3 (0x4A)</MenuItem>
|
||||
<MenuItem value={0x4b}>Gateway 4 (0x4B)</MenuItem>
|
||||
<MenuItem value={0x4c}>Gateway 5 (0x4C)</MenuItem>
|
||||
<MenuItem value={0x4d}>Gateway 7 (0x4D)</MenuItem>
|
||||
</ValidatedTextField>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
@@ -511,8 +511,8 @@ const SettingsCustomization: FC = () => {
|
||||
</ToggleButtonGroup>
|
||||
</Cell>
|
||||
<Cell>{formatName(de)}</Cell>
|
||||
<Cell>{!(de.m & DeviceEntityMask.DV_READONLY) && (formatValue(de.mi))}</Cell>
|
||||
<Cell>{!(de.m & DeviceEntityMask.DV_READONLY) && (formatValue(de.ma))}</Cell>
|
||||
<Cell>{!(de.m & DeviceEntityMask.DV_READONLY) && formatValue(de.mi)}</Cell>
|
||||
<Cell>{!(de.m & DeviceEntityMask.DV_READONLY) && formatValue(de.ma)}</Cell>
|
||||
<Cell>{formatValue(de.v)}</Cell>
|
||||
</Row>
|
||||
))}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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 "";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user