mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
Merge pull request #1343 from proddy/dev
show entity count in device list, remove type
This commit is contained in:
@@ -26,10 +26,10 @@
|
||||
"@mui/icons-material": "^5.14.14",
|
||||
"@mui/material": "^5.14.14",
|
||||
"@table-library/react-table-library": "4.1.7",
|
||||
"@types/lodash-es": "^4.17.9",
|
||||
"@types/node": "^20.8.6",
|
||||
"@types/react": "^18.2.28",
|
||||
"@types/react-dom": "^18.2.13",
|
||||
"@types/lodash-es": "^4.17.10",
|
||||
"@types/node": "^20.8.7",
|
||||
"@types/react": "^18.2.30",
|
||||
"@types/react-dom": "^18.2.14",
|
||||
"@types/react-router-dom": "^5.3.3",
|
||||
"alova": "^2.13.1",
|
||||
"async-validator": "^4.2.5",
|
||||
@@ -52,7 +52,7 @@
|
||||
"@preact/preset-vite": "^2.6.0",
|
||||
"@typescript-eslint/eslint-plugin": "^6.8.0",
|
||||
"@typescript-eslint/parser": "^6.8.0",
|
||||
"concurrently": "^8.2.1",
|
||||
"concurrently": "^8.2.2",
|
||||
"eslint": "^8.51.0",
|
||||
"eslint-config-airbnb": "^19.0.4",
|
||||
"eslint-config-airbnb-typescript": "^17.1.0",
|
||||
@@ -68,7 +68,7 @@
|
||||
"prettier": "^3.0.3",
|
||||
"rollup-plugin-visualizer": "^5.9.2",
|
||||
"terser": "^5.22.0",
|
||||
"vite": "^4.4.11",
|
||||
"vite": "^4.5.0",
|
||||
"vite-plugin-imagemin": "^0.6.1",
|
||||
"vite-tsconfig-paths": "^4.2.1"
|
||||
},
|
||||
|
||||
@@ -13,7 +13,7 @@ import * as EMSESP from 'project/api';
|
||||
|
||||
const UploadFileForm: FC = () => {
|
||||
const { LL } = useI18nContext();
|
||||
const [restarting, setRestarting] = useState<boolean>(false);
|
||||
const [restarting, setRestarting] = useState<boolean>();
|
||||
const [md5, setMd5] = useState<string>();
|
||||
|
||||
const { send: getSettings, onSuccess: onSuccessGetSettings } = useRequest(EMSESP.getSettings(), {
|
||||
@@ -28,6 +28,9 @@ const UploadFileForm: FC = () => {
|
||||
const { send: getSchedule, onSuccess: onSuccessGetSchedule } = useRequest(EMSESP.getSchedule(), {
|
||||
immediate: false
|
||||
});
|
||||
const { send: getInfo, onSuccess: onSuccessGetInfo } = useRequest((data) => EMSESP.API(data), {
|
||||
immediate: false
|
||||
});
|
||||
|
||||
const {
|
||||
loading: isUploading,
|
||||
@@ -86,6 +89,9 @@ const UploadFileForm: FC = () => {
|
||||
onSuccessGetSchedule((event) => {
|
||||
saveFile(event.data, 'schedule');
|
||||
});
|
||||
onSuccessGetInfo((event) => {
|
||||
saveFile(event.data, 'info');
|
||||
});
|
||||
|
||||
const downloadSettings = async () => {
|
||||
await getSettings().catch((error) => {
|
||||
@@ -111,13 +117,23 @@ const UploadFileForm: FC = () => {
|
||||
});
|
||||
};
|
||||
|
||||
const downloadInfo = async () => {
|
||||
await getInfo({ device: 'system', entity: 'info', id: 0 }).catch((error) => {
|
||||
toast.error(error.message);
|
||||
});
|
||||
};
|
||||
|
||||
const content = () => (
|
||||
<>
|
||||
<Typography sx={{ pt: 2, pb: 2 }} variant="h6" color="primary">
|
||||
{LL.UPLOAD()}
|
||||
</Typography>
|
||||
<Box mb={2} color="warning.main">
|
||||
<Typography variant="body2">{LL.UPLOAD_TEXT()} </Typography>
|
||||
<Typography variant="body2">
|
||||
{LL.UPLOAD_TEXT()}
|
||||
<br />
|
||||
{LL.RESTART_TEXT()}.
|
||||
</Typography>
|
||||
</Box>
|
||||
{md5 && (
|
||||
<Box mb={2}>
|
||||
@@ -140,7 +156,7 @@ const UploadFileForm: FC = () => {
|
||||
</Button>
|
||||
<Box color="warning.main">
|
||||
<Typography mt={2} mb={1} variant="body2">
|
||||
{LL.DOWNLOAD_CUSTOMIZATION_TEXT()}{' '}
|
||||
{LL.DOWNLOAD_CUSTOMIZATION_TEXT()}
|
||||
</Typography>
|
||||
</Box>
|
||||
<Button startIcon={<DownloadIcon />} variant="outlined" color="primary" onClick={downloadCustomizations}>
|
||||
@@ -157,12 +173,20 @@ const UploadFileForm: FC = () => {
|
||||
</Button>
|
||||
<Box color="warning.main">
|
||||
<Typography mt={2} mb={1} variant="body2">
|
||||
{LL.DOWNLOAD_SCHEDULE_TEXT()}{' '}
|
||||
{LL.DOWNLOAD_SCHEDULE_TEXT()}
|
||||
</Typography>
|
||||
</Box>
|
||||
<Button startIcon={<DownloadIcon />} variant="outlined" color="primary" onClick={downloadSchedule}>
|
||||
{LL.SCHEDULE(0)}
|
||||
</Button>
|
||||
<Box color="warning.main">
|
||||
<Typography mt={2} mb={1} variant="body2">
|
||||
{LL.DOWNLOAD(0)} {LL.SUPPORT_INFORMATION()}
|
||||
</Typography>
|
||||
</Box>
|
||||
<Button startIcon={<DownloadIcon />} variant="outlined" color="primary" onClick={downloadInfo}>
|
||||
{LL.SUPPORT_INFORMATION()}
|
||||
</Button>
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
|
||||
@@ -171,7 +171,6 @@ const de: Translation = {
|
||||
HELP_INFORMATION_3: 'Um neue Funktionen anzufragen oder Fehler zu melden, eröffnen Sie ein Issue auf Github',
|
||||
HELP_INFORMATION_4: 'Bitte laden Sie die System-Details und hängen Sie sie an das Support-Issue an. ',
|
||||
HELP_INFORMATION_5: 'EMS-ESP ist ein freies Open-Source Projekt. Bitte unterstützen Sie die zukünftige Entwicklung mit einem "Star" auf Github!',
|
||||
SUPPORT_INFO: 'Support Info',
|
||||
UPLOAD: 'Hochladen',
|
||||
DOWNLOAD: '{{H|h|h}}erunterladen',
|
||||
ABORTED: 'abgebrochen',
|
||||
|
||||
@@ -171,7 +171,6 @@ const en: Translation = {
|
||||
HELP_INFORMATION_3: 'To request a feature or report a bug',
|
||||
HELP_INFORMATION_4: 'remember to download and attach your system information for a faster response when reporting an issue',
|
||||
HELP_INFORMATION_5: 'EMS-ESP is a free and open-source project. Please support its future development by giving it a star on Github!',
|
||||
SUPPORT_INFO: 'Support Info',
|
||||
UPLOAD: 'Upload',
|
||||
DOWNLOAD: '{{D|d|d}}ownload',
|
||||
ABORTED: 'aborted',
|
||||
|
||||
@@ -171,7 +171,6 @@ const fr: Translation = {
|
||||
HELP_INFORMATION_3: 'Pour demander une fonctionnalité ou signaler un problème',
|
||||
HELP_INFORMATION_4: 'n\'oubliez pas de télécharger et de joindre les informations relatives à votre système pour obtenir une réponse plus rapide lorsque vous signalez un problème',
|
||||
HELP_INFORMATION_5: 'EMS-ESP est un projet libre et open-source. Merci de soutenir son développement futur en lui donnant une étoile sur Github !',
|
||||
SUPPORT_INFO: 'Information de support',
|
||||
UPLOAD: 'Upload',
|
||||
DOWNLOAD: '{{D|d|d}}ownload',
|
||||
ABORTED: 'annulé',
|
||||
|
||||
@@ -173,7 +173,6 @@ const it: Translation = {
|
||||
HELP_INFORMATION_3: 'Per richiedere una funzionalità o segnalare un errore',
|
||||
HELP_INFORMATION_4: 'ricordati di scaricare e allegare le informazioni del tuo sistema per una risposta più rapida quando segnali un problema',
|
||||
HELP_INFORMATION_5: 'EMS-ESP è un progetto gratuito e open-source. Supporta il suo sviluppo futuro assegnandogli una stella su Github!',
|
||||
SUPPORT_INFO: 'Info Supporto',
|
||||
UPLOAD: 'Carica',
|
||||
DOWNLOAD: 'Scarica',
|
||||
ABORTED: 'Annullato',
|
||||
|
||||
@@ -171,7 +171,6 @@ const nl: Translation = {
|
||||
HELP_INFORMATION_3: 'Om een nieuwe feature te vragen of een bug te rapporteren',
|
||||
HELP_INFORMATION_4: 'zorg dat je ook je systeem details zijn toevoeged voor een sneller antwoord',
|
||||
HELP_INFORMATION_5: 'EMS-ESP is een gratis en open source project. Steun ons met een Star op Github!',
|
||||
SUPPORT_INFO: 'Support Info',
|
||||
UPLOAD: 'Upload',
|
||||
DOWNLOAD: '{{D|d|d}}ownload',
|
||||
ABORTED: 'afgebroken',
|
||||
|
||||
@@ -171,7 +171,6 @@ const no: Translation = {
|
||||
HELP_INFORMATION_3: 'For å be om en ny funksjon eller melde feil',
|
||||
HELP_INFORMATION_4: 'husk å laste ned og legg ved din systeminformasjon for en raskere respons når du rapporterer et problem',
|
||||
HELP_INFORMATION_5: 'EMS-ESP er gratis og åpen kildekode. Bidra til utviklingen ved å gi oss en stjerne på GitHub!',
|
||||
SUPPORT_INFO: 'Supportinfo',
|
||||
UPLOAD: 'Opplasning',
|
||||
DOWNLOAD: '{{N|n|n}}edlasting',
|
||||
ABORTED: 'avbrutt',
|
||||
|
||||
@@ -171,7 +171,6 @@ const pl: BaseTranslation = {
|
||||
HELP_INFORMATION_3: 'Aby zaproponować nową funkcjonalność lub zgłosić problem',
|
||||
HELP_INFORMATION_4: 'Zgłaszając problem, nie zapomnij dołączyć informacji o swoim systemie!',
|
||||
HELP_INFORMATION_5: 'EMS-ESP jest darmowym projektem typu open-source. Aby go wesprzeć, rozważ przyznanie nam gwiazdki na Github!',
|
||||
SUPPORT_INFO: 'Pobierz informacje',
|
||||
UPLOAD: 'Wysyłanie',
|
||||
DOWNLOAD: '{{P|p||P}}obier{{anie|z||z}}',
|
||||
ABORTED: 'zostało przerwane!',
|
||||
|
||||
@@ -171,7 +171,6 @@ const sv: Translation = {
|
||||
HELP_INFORMATION_3: 'Önska en ny funktion eller rapportera en bugg',
|
||||
HELP_INFORMATION_4: 'Bifoga din systeminformation för snabbare hantering när du rapporterar ett problem',
|
||||
HELP_INFORMATION_5: 'EMS-ESP är gratis och är öppen källkod. Bidra till utvecklingen genom att ge oss en stjärna på GitHub!',
|
||||
SUPPORT_INFO: 'Supportinfo',
|
||||
UPLOAD: 'Uppladdning',
|
||||
DOWNLOAD: '{{N|n|n}}edladdning',
|
||||
ABORTED: 'Avbruten',
|
||||
|
||||
@@ -171,7 +171,6 @@ const tr: Translation = {
|
||||
HELP_INFORMATION_3: 'Yeni bir özellik talep etmek yada hata bildirmek için',
|
||||
HELP_INFORMATION_4: 'Bir sorun bildirirken daha hızlı bir dönüş için sistem bilginizi indirip eklemeyi unutmayın',
|
||||
HELP_INFORMATION_5: 'EMS-ESP ücretsiz ve açık kaynaklı bir projedir. Lütfen geliştirmeyi desteklemek için Githubda projeye yıldız verin!',
|
||||
SUPPORT_INFO: 'Destek Bilgisi',
|
||||
UPLOAD: 'Yükleme',
|
||||
DOWNLOAD: '{{İ|i|i}}İndirme',
|
||||
ABORTED: 'iptal edildi',
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import CancelIcon from '@mui/icons-material/Cancel';
|
||||
import CommentsDisabledOutlinedIcon from '@mui/icons-material/CommentsDisabledOutlined';
|
||||
import EditIcon from '@mui/icons-material/Edit';
|
||||
import EditOffOutlinedIcon from '@mui/icons-material/EditOffOutlined';
|
||||
import DownloadIcon from '@mui/icons-material/GetApp';
|
||||
import HighlightOffIcon from '@mui/icons-material/HighlightOff';
|
||||
import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';
|
||||
import KeyboardArrowDownOutlinedIcon from '@mui/icons-material/KeyboardArrowDownOutlined';
|
||||
import KeyboardArrowUpOutlinedIcon from '@mui/icons-material/KeyboardArrowUpOutlined';
|
||||
@@ -26,6 +26,7 @@ import {
|
||||
Grid,
|
||||
Typography
|
||||
} from '@mui/material';
|
||||
|
||||
import { useRowSelect } from '@table-library/react-table-library/select';
|
||||
import { useSort, SortToggleType } from '@table-library/react-table-library/sort';
|
||||
import { Table, Header, HeaderRow, HeaderCell, Body, Row, Cell } from '@table-library/react-table-library/table';
|
||||
@@ -52,9 +53,9 @@ import { AuthenticatedContext } from 'contexts/authentication';
|
||||
import { useI18nContext } from 'i18n/i18n-react';
|
||||
|
||||
const DashboardDevices: FC = () => {
|
||||
const [size, setSize] = useState([0, 0]);
|
||||
const { me } = useContext(AuthenticatedContext);
|
||||
const { LL } = useI18nContext();
|
||||
const [size, setSize] = useState([0, 0]);
|
||||
const [selectedDeviceValue, setSelectedDeviceValue] = useState<DeviceValue>();
|
||||
const [onlyFav, setOnlyFav] = useState(false);
|
||||
const [deviceValueDialogOpen, setDeviceValueDialogOpen] = useState(false);
|
||||
@@ -426,7 +427,10 @@ const DashboardDevices: FC = () => {
|
||||
<Cell stiff>
|
||||
<DeviceIcon type_id={device.t} />
|
||||
</Cell>
|
||||
<Cell>{device.n}</Cell>
|
||||
<Cell>
|
||||
{device.n}
|
||||
<span style={{ color: 'lightblue' }}> ({device.e})</span>
|
||||
</Cell>
|
||||
<Cell stiff>{device.tn}</Cell>
|
||||
</Row>
|
||||
))}
|
||||
@@ -480,13 +484,14 @@ const DashboardDevices: FC = () => {
|
||||
right: 16,
|
||||
bottom: 0,
|
||||
top: 128,
|
||||
maxHeight: () => size[1] - 210,
|
||||
zIndex: 'modal'
|
||||
zIndex: 'modal',
|
||||
maxHeight: () => size[1] - 189,
|
||||
border: '1px solid #177ac9'
|
||||
}}
|
||||
>
|
||||
<Box sx={{ border: '1px solid #177ac9' }}>
|
||||
<Typography noWrap variant="subtitle1" color="warning.main" sx={{ mx: 1 }}>
|
||||
{coreData.devices[deviceIndex].n}
|
||||
<Typography noWrap variant="subtitle1" color="warning.main" sx={{ ml: 1 }}>
|
||||
{coreData.devices[deviceIndex].tn} | {coreData.devices[deviceIndex].n}
|
||||
</Typography>
|
||||
|
||||
<Grid container justifyContent="space-between">
|
||||
@@ -511,7 +516,7 @@ const DashboardDevices: FC = () => {
|
||||
</Typography>
|
||||
<Grid item zeroMinWidth justifyContent="flex-end">
|
||||
<IconButton onClick={resetDeviceSelect}>
|
||||
<CancelIcon color="info" sx={{ fontSize: 18, verticalAlign: 'middle' }} />
|
||||
<HighlightOffIcon color="primary" sx={{ fontSize: 18, verticalAlign: 'middle' }} />
|
||||
</IconButton>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
@@ -1,12 +1,8 @@
|
||||
import CommentIcon from '@mui/icons-material/CommentTwoTone';
|
||||
import EastIcon from '@mui/icons-material/East';
|
||||
import DownloadIcon from '@mui/icons-material/GetApp';
|
||||
import GitHubIcon from '@mui/icons-material/GitHub';
|
||||
import MenuBookIcon from '@mui/icons-material/MenuBookTwoTone';
|
||||
import { Typography, Button, Box, List, ListItem, ListItemText, Link, ListItemAvatar } from '@mui/material';
|
||||
import { useRequest } from 'alova';
|
||||
import { toast } from 'react-toastify';
|
||||
import * as EMSESP from './api';
|
||||
import { Typography, Box, List, ListItem, ListItemText, Link, ListItemAvatar } from '@mui/material';
|
||||
import type { FC } from 'react';
|
||||
|
||||
import { SectionContent } from 'components';
|
||||
@@ -16,30 +12,7 @@ import { useI18nContext } from 'i18n/i18n-react';
|
||||
const HelpInformation: FC = () => {
|
||||
const { LL } = useI18nContext();
|
||||
|
||||
const { send: API, onSuccess: onSuccessAPI } = useRequest((data) => EMSESP.API(data), {
|
||||
immediate: false
|
||||
});
|
||||
|
||||
onSuccessAPI((event) => {
|
||||
const a = document.createElement('a');
|
||||
const filename = 'emsesp_info.txt';
|
||||
a.href = URL.createObjectURL(
|
||||
new Blob([JSON.stringify(event.data, null, 2)], {
|
||||
type: 'text/plain'
|
||||
})
|
||||
);
|
||||
a.setAttribute('download', filename);
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
document.body.removeChild(a);
|
||||
toast.info(LL.DOWNLOAD_SUCCESSFUL());
|
||||
});
|
||||
|
||||
const callAPI = async () => {
|
||||
await API({ device: 'system', entity: 'info', id: 0 }).catch((error) => {
|
||||
toast.error(error.message);
|
||||
});
|
||||
};
|
||||
const uploadURL = window.location.origin + '/system/upload';
|
||||
|
||||
return (
|
||||
<SectionContent title={LL.SUPPORT_INFORMATION()} titleGutter>
|
||||
@@ -83,17 +56,11 @@ const HelpInformation: FC = () => {
|
||||
{LL.CLICK_HERE()}
|
||||
</Link>
|
||||
<br />
|
||||
<i>({LL.HELP_INFORMATION_4()}</i>
|
||||
<Button
|
||||
startIcon={<DownloadIcon />}
|
||||
size="small"
|
||||
variant="outlined"
|
||||
color="primary"
|
||||
onClick={() => callAPI()}
|
||||
>
|
||||
{LL.SUPPORT_INFO()}
|
||||
</Button>
|
||||
)
|
||||
<i>({LL.HELP_INFORMATION_4()}</i>
|
||||
<Link href={uploadURL} color="primary">
|
||||
{LL.UPLOAD()}
|
||||
</Link>
|
||||
)
|
||||
</ListItemText>
|
||||
</ListItem>
|
||||
</List>
|
||||
|
||||
@@ -69,6 +69,7 @@ export interface Device {
|
||||
d: number; // deviceid
|
||||
p: number; // productid
|
||||
v: string; // version
|
||||
e: number; // entities
|
||||
}
|
||||
|
||||
export interface TemperatureSensor {
|
||||
|
||||
@@ -1265,12 +1265,12 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/lodash-es@npm:^4.17.9":
|
||||
version: 4.17.9
|
||||
resolution: "@types/lodash-es@npm:4.17.9"
|
||||
"@types/lodash-es@npm:^4.17.10":
|
||||
version: 4.17.10
|
||||
resolution: "@types/lodash-es@npm:4.17.10"
|
||||
dependencies:
|
||||
"@types/lodash": "npm:*"
|
||||
checksum: 5e3a8a74134e67c37f1b8eb4a2897c88038f1b1bd7f508feec9e5561b52787d7efcc30c18981e9c6edec2b894f127b60312a431d98b84e12e785bea9cb5d1d40
|
||||
checksum: a6c68872425418491d693186238e22c9da0e88bdf7ffe2b26e5436a19027ffedabeaec162e336b3722d5c43411866e859beae76a1a8f737bb5b115d5a574f758
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -1288,7 +1288,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/node@npm:*, @types/node@npm:^20.8.6":
|
||||
"@types/node@npm:*":
|
||||
version: 20.8.6
|
||||
resolution: "@types/node@npm:20.8.6"
|
||||
dependencies:
|
||||
@@ -1297,6 +1297,15 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/node@npm:^20.8.7":
|
||||
version: 20.8.7
|
||||
resolution: "@types/node@npm:20.8.7"
|
||||
dependencies:
|
||||
undici-types: "npm:~5.25.1"
|
||||
checksum: a347ac7e6a9748ffff018ca01142ba625e774cb0b53785abb58b16a5a8468cc9b7656686dbe4c39c2f3fc477439994ee8aeae9b80ced86f320598bafaf83f802
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/parse-json@npm:^4.0.0":
|
||||
version: 4.0.0
|
||||
resolution: "@types/parse-json@npm:4.0.0"
|
||||
@@ -1311,12 +1320,12 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/react-dom@npm:^18.2.13":
|
||||
version: 18.2.13
|
||||
resolution: "@types/react-dom@npm:18.2.13"
|
||||
"@types/react-dom@npm:^18.2.14":
|
||||
version: 18.2.14
|
||||
resolution: "@types/react-dom@npm:18.2.14"
|
||||
dependencies:
|
||||
"@types/react": "npm:*"
|
||||
checksum: 0355d036d062bfa69345851282a555817c57be44d909250926296383bcc82fb4b79df08ecc882c519883e5ab8d179961d4cd245157a5c5977a7247714757b0ac
|
||||
checksum: c7feb6542dbeb3de18c9c03260229377e0a0d47a3d2c0bb91861996e2353375a45c57de7216edb8b88448584e363677244bd4355ddec45c243e70e777c2a150b
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -1350,7 +1359,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/react@npm:*, @types/react@npm:^18.2.28":
|
||||
"@types/react@npm:*":
|
||||
version: 18.2.28
|
||||
resolution: "@types/react@npm:18.2.28"
|
||||
dependencies:
|
||||
@@ -1361,6 +1370,17 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/react@npm:^18.2.30":
|
||||
version: 18.2.30
|
||||
resolution: "@types/react@npm:18.2.30"
|
||||
dependencies:
|
||||
"@types/prop-types": "npm:*"
|
||||
"@types/scheduler": "npm:*"
|
||||
csstype: "npm:^3.0.2"
|
||||
checksum: dcad8aed0d0bf5731f4c6a7e8d28d8f571bd031c6c94edbcc1b7ab2c86e7cf61ae49d66c3229e1849fb4b82c5aa7be7c40e71ac5c2d7fef4eafb7a3b4abd25d6
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/responselike@npm:^1.0.0":
|
||||
version: 1.0.1
|
||||
resolution: "@types/responselike@npm:1.0.1"
|
||||
@@ -1528,16 +1548,16 @@ __metadata:
|
||||
"@preact/compat": "npm:^17.1.2"
|
||||
"@preact/preset-vite": "npm:^2.6.0"
|
||||
"@table-library/react-table-library": "npm:4.1.7"
|
||||
"@types/lodash-es": "npm:^4.17.9"
|
||||
"@types/node": "npm:^20.8.6"
|
||||
"@types/react": "npm:^18.2.28"
|
||||
"@types/react-dom": "npm:^18.2.13"
|
||||
"@types/lodash-es": "npm:^4.17.10"
|
||||
"@types/node": "npm:^20.8.7"
|
||||
"@types/react": "npm:^18.2.30"
|
||||
"@types/react-dom": "npm:^18.2.14"
|
||||
"@types/react-router-dom": "npm:^5.3.3"
|
||||
"@typescript-eslint/eslint-plugin": "npm:^6.8.0"
|
||||
"@typescript-eslint/parser": "npm:^6.8.0"
|
||||
alova: "npm:^2.13.1"
|
||||
async-validator: "npm:^4.2.5"
|
||||
concurrently: "npm:^8.2.1"
|
||||
concurrently: "npm:^8.2.2"
|
||||
eslint: "npm:^8.51.0"
|
||||
eslint-config-airbnb: "npm:^19.0.4"
|
||||
eslint-config-airbnb-typescript: "npm:^17.1.0"
|
||||
@@ -1566,7 +1586,7 @@ __metadata:
|
||||
terser: "npm:^5.22.0"
|
||||
typesafe-i18n: "npm:^5.26.2"
|
||||
typescript: "npm:^5.2.2"
|
||||
vite: "npm:^4.4.11"
|
||||
vite: "npm:^4.5.0"
|
||||
vite-plugin-imagemin: "npm:^0.6.1"
|
||||
vite-tsconfig-paths: "npm:^4.2.1"
|
||||
languageName: unknown
|
||||
@@ -2364,9 +2384,9 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"concurrently@npm:^8.2.1":
|
||||
version: 8.2.1
|
||||
resolution: "concurrently@npm:8.2.1"
|
||||
"concurrently@npm:^8.2.2":
|
||||
version: 8.2.2
|
||||
resolution: "concurrently@npm:8.2.2"
|
||||
dependencies:
|
||||
chalk: "npm:^4.1.2"
|
||||
date-fns: "npm:^2.30.0"
|
||||
@@ -2380,7 +2400,7 @@ __metadata:
|
||||
bin:
|
||||
conc: dist/bin/concurrently.js
|
||||
concurrently: dist/bin/concurrently.js
|
||||
checksum: 8a7cb8caeb9430f939ae6ba3ccdce6080e7f3084dcbffb6383059002937bbe771d71f8f4f854258e6138f52918637a3d66a6b21fd19d0ea69c426011f878e701
|
||||
checksum: dcb1aa69d9c611a7bda9d4fc0fe1e388f971d1744acec7e0d52dffa2ef55743f1266ec9292f414c5789b9f61734b3fce772bd005d4de9564a949fb121b97bae1
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -8298,9 +8318,9 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"vite@npm:^4.4.11":
|
||||
version: 4.4.11
|
||||
resolution: "vite@npm:4.4.11"
|
||||
"vite@npm:^4.5.0":
|
||||
version: 4.5.0
|
||||
resolution: "vite@npm:4.5.0"
|
||||
dependencies:
|
||||
esbuild: "npm:^0.18.10"
|
||||
fsevents: "npm:~2.3.2"
|
||||
@@ -8334,7 +8354,7 @@ __metadata:
|
||||
optional: true
|
||||
bin:
|
||||
vite: bin/vite.js
|
||||
checksum: 325e2955fe939bc5706aab2aa46498d98adace1df4d11f42cf4539754b886798b6bf7c247c94d23fb6cf3a569e56bad4a11561bf25e8e6dcc8c0e2f73ecc5e5b
|
||||
checksum: b262ea4880ba7de8a77b0a665c771561ae3cb7f0d6c5b90e65298039755192550bf90cb96a2910d564506e2d499aa20e9becd330b835c34d414249083ac6e40c
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
||||
@@ -427,7 +427,8 @@ const emsesp_coredata = {
|
||||
// n: 'Enviline/Compress 6000AW/Hybrid 3000-7000iAW/SupraEco/Geo 5xx/WLW196i/WSW196i',
|
||||
d: 8,
|
||||
p: 123,
|
||||
v: '06.01'
|
||||
v: '06.01',
|
||||
e: 69
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
@@ -437,7 +438,8 @@ const emsesp_coredata = {
|
||||
n: 'GB125/GB135/MC10',
|
||||
d: 8,
|
||||
p: 123,
|
||||
v: '06.01'
|
||||
v: '06.01',
|
||||
e: 73
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
@@ -447,7 +449,8 @@ const emsesp_coredata = {
|
||||
n: 'RC35',
|
||||
d: 24,
|
||||
p: 86,
|
||||
v: '04.01'
|
||||
v: '04.01',
|
||||
e: 57
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
@@ -457,7 +460,8 @@ const emsesp_coredata = {
|
||||
n: 'RC20/Moduline 300',
|
||||
d: 23,
|
||||
p: 77,
|
||||
v: '03.03'
|
||||
v: '03.03',
|
||||
e: 6
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
@@ -467,7 +471,8 @@ const emsesp_coredata = {
|
||||
n: 'RC100/Moduline 1000/1010',
|
||||
d: 16,
|
||||
p: 165,
|
||||
v: '04.01'
|
||||
v: '04.01',
|
||||
e: 3
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
@@ -477,7 +482,8 @@ const emsesp_coredata = {
|
||||
n: 'MM10',
|
||||
d: 32,
|
||||
p: 69,
|
||||
v: '01.01'
|
||||
v: '01.01',
|
||||
e: 6
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
@@ -487,7 +493,8 @@ const emsesp_coredata = {
|
||||
n: 'SM10',
|
||||
d: 48,
|
||||
p: 73,
|
||||
v: '01.02'
|
||||
v: '01.02',
|
||||
e: 22
|
||||
},
|
||||
{
|
||||
id: 99,
|
||||
@@ -497,7 +504,8 @@ const emsesp_coredata = {
|
||||
n: 'User defined entities',
|
||||
d: 1,
|
||||
p: 1,
|
||||
v: ''
|
||||
v: '',
|
||||
e: 1
|
||||
}
|
||||
]
|
||||
};
|
||||
@@ -2154,7 +2162,7 @@ rest_server.post(UPLOAD_FILE_ENDPOINT, progress_middleware, upload.single('file'
|
||||
console.log(req.file);
|
||||
console.log('ext: ' + ext);
|
||||
|
||||
if (ext === 'bin') {
|
||||
if (ext === 'bin' || ext === 'json') {
|
||||
return res.sendStatus(200);
|
||||
} else if (ext === 'md5') {
|
||||
return res.json({ md5: 'ef4304fc4d9025a58dcf25d71c882d2c' });
|
||||
|
||||
@@ -243,7 +243,7 @@ bool DeviceValue::hasValue() const {
|
||||
has_value = Helpers::hasValue(*(uint32_t *)(value_p));
|
||||
break;
|
||||
case DeviceValueType::CMD:
|
||||
has_value = false; // commands don't have values!
|
||||
has_value = true; // we count command as an actual entity
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -1 +1 @@
|
||||
#define EMSESP_APP_VERSION "3.6.3-dev.3"
|
||||
#define EMSESP_APP_VERSION "3.6.3-dev.4"
|
||||
|
||||
@@ -88,6 +88,7 @@ void WebDataService::core_data(AsyncWebServerRequest * request) {
|
||||
obj["d"] = emsdevice->device_id(); // deviceid
|
||||
obj["p"] = emsdevice->product_id(); // productid
|
||||
obj["v"] = emsdevice->version(); // version
|
||||
obj["e"] = emsdevice->count_entities(); // number of entities
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,6 +103,7 @@ void WebDataService::core_data(AsyncWebServerRequest * request) {
|
||||
obj["d"] = 0; // deviceid
|
||||
obj["p"] = 0; // productid
|
||||
obj["v"] = 0; // version
|
||||
obj["e"] = EMSESP::webCustomEntityService.count_entities(); // number of custom entities
|
||||
}
|
||||
|
||||
root["connected"] = EMSESP::bus_status() != 2;
|
||||
|
||||
Reference in New Issue
Block a user