mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev2
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
"@types/imagemin": "^8.0.5",
|
||||
"@types/lodash-es": "^4.17.12",
|
||||
"@types/node": "^20.10.6",
|
||||
"@types/react": "^18.2.46",
|
||||
"@types/react": "^18.2.47",
|
||||
"@types/react-dom": "^18.2.18",
|
||||
"@types/react-router-dom": "^5.3.3",
|
||||
"alova": "^2.16.2",
|
||||
@@ -52,8 +52,8 @@
|
||||
"devDependencies": {
|
||||
"@preact/compat": "^17.1.2",
|
||||
"@preact/preset-vite": "^2.8.1",
|
||||
"@typescript-eslint/eslint-plugin": "^6.17.0",
|
||||
"@typescript-eslint/parser": "^6.17.0",
|
||||
"@typescript-eslint/eslint-plugin": "^6.18.0",
|
||||
"@typescript-eslint/parser": "^6.18.0",
|
||||
"concurrently": "^8.2.2",
|
||||
"eslint": "^8.56.0",
|
||||
"eslint-config-airbnb": "^19.0.4",
|
||||
@@ -70,7 +70,7 @@
|
||||
"prettier": "^3.1.1",
|
||||
"rollup-plugin-visualizer": "^5.12.0",
|
||||
"terser": "^5.26.0",
|
||||
"vite": "^5.0.10",
|
||||
"vite": "^5.0.11",
|
||||
"vite-plugin-imagemin": "^0.6.1",
|
||||
"vite-tsconfig-paths": "^4.2.3"
|
||||
},
|
||||
|
||||
@@ -273,6 +273,7 @@ const MqttSettingsForm: FC = () => {
|
||||
>
|
||||
<MenuItem value={0}>Home Assistant</MenuItem>
|
||||
<MenuItem value={1}>Domoticz</MenuItem>
|
||||
<MenuItem value={2}>Domoticz (latest)</MenuItem>
|
||||
</TextField>
|
||||
</Grid>
|
||||
<Grid item xs={12} sm={6} md={4}>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import DeviceHubIcon from '@mui/icons-material/DeviceHub';
|
||||
import DnsIcon from '@mui/icons-material/Dns';
|
||||
import GiteIcon from '@mui/icons-material/Gite';
|
||||
import RefreshIcon from '@mui/icons-material/Refresh';
|
||||
import RouterIcon from '@mui/icons-material/Router';
|
||||
import SettingsInputAntennaIcon from '@mui/icons-material/SettingsInputAntenna';
|
||||
@@ -115,6 +116,15 @@ const NetworkStatusForm: FC = () => {
|
||||
<ListItemText primary="Status" secondary={networkStatus(data)} />
|
||||
</ListItem>
|
||||
<Divider variant="inset" component="li" />
|
||||
<ListItem>
|
||||
<ListItemAvatar>
|
||||
<Avatar sx={{ bgcolor: networkStatusHighlight(data, theme) }}>
|
||||
<GiteIcon />
|
||||
</Avatar>
|
||||
</ListItemAvatar>
|
||||
<ListItemText primary="Hostname" secondary={data.hostname} />
|
||||
</ListItem>
|
||||
<Divider variant="inset" component="li" />
|
||||
{isWiFi(data) && (
|
||||
<>
|
||||
<ListItem>
|
||||
|
||||
@@ -227,6 +227,8 @@ const SystemStatusForm: FC = () => {
|
||||
<ListItemText
|
||||
primary="CPU"
|
||||
secondary={
|
||||
data.esp_platform +
|
||||
'/' +
|
||||
data.cpu_type +
|
||||
' (rev.' +
|
||||
data.cpu_rev +
|
||||
|
||||
@@ -136,6 +136,7 @@ const UploadFileForm: FC = () => {
|
||||
<Typography variant="body2">
|
||||
{LL.UPLOAD_TEXT()}
|
||||
<br />
|
||||
<br />
|
||||
{LL.RESTART_TEXT(1)}.
|
||||
</Typography>
|
||||
</Box>
|
||||
|
||||
@@ -420,7 +420,7 @@ const DashboardDevices: FC = () => {
|
||||
<MessageBox my={2} level="warning" message={LL.EMS_BUS_SCANNING()} />
|
||||
)}
|
||||
|
||||
{coreData.connected && (
|
||||
{coreData.devices.length !== 0 && (
|
||||
<Table data={{ nodes: coreData.devices }} select={device_select} theme={device_theme} layout={{ custom: true }}>
|
||||
{(tableList: any) => (
|
||||
<>
|
||||
|
||||
@@ -262,7 +262,7 @@ const DashboardSensors: FC = () => {
|
||||
setSelectedAnalogSensor({
|
||||
id: Math.floor(Math.random() * (Math.floor(200) - 100) + 100),
|
||||
n: '',
|
||||
g: 40,
|
||||
g: 21, // default GPIO 21 which is safe for all platforms
|
||||
u: 0,
|
||||
v: 0,
|
||||
o: 0,
|
||||
|
||||
@@ -20,7 +20,7 @@ export const readCoreData = () => alovaInstance.Get<CoreData>(`/rest/coreData`);
|
||||
export const readDeviceData = (id: number) =>
|
||||
alovaInstance.Get<DeviceData>('/rest/deviceData', {
|
||||
// alovaInstance.Get<DeviceData>(`/rest/deviceData/${id}`, {
|
||||
params: { id }, // TODO remove later
|
||||
params: { id }, // TODO replace later
|
||||
responseType: 'arraybuffer' // uses msgpack
|
||||
});
|
||||
export const writeDeviceValue = (data: any) => alovaInstance.Post('/rest/writeDeviceValue', data);
|
||||
@@ -56,7 +56,7 @@ export const getSchedule = () => alovaInstance.Get('/rest/getSchedule');
|
||||
export const readDeviceEntities = (id: number) =>
|
||||
// alovaInstance.Get<DeviceEntity[]>(`/rest/deviceEntities/${id}`, {
|
||||
alovaInstance.Get<DeviceEntity[]>(`/rest/deviceEntities`, {
|
||||
params: { id }, // TODO remove later
|
||||
params: { id }, // TODO replace later
|
||||
responseType: 'arraybuffer',
|
||||
transformData(data: any) {
|
||||
return data.map((de: DeviceEntity) => ({ ...de, o_m: de.m, o_cn: de.cn, o_mi: de.mi, o_ma: de.ma }));
|
||||
|
||||
@@ -33,6 +33,7 @@ export interface NetworkStatus {
|
||||
gateway_ip: string;
|
||||
dns_ip_1: string;
|
||||
dns_ip_2: string;
|
||||
hostname: string;
|
||||
}
|
||||
|
||||
export interface NetworkSettings {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { defineConfig } from 'vite';
|
||||
import { defineConfig, splitVendorChunkPlugin } from 'vite';
|
||||
import viteTsconfigPaths from 'vite-tsconfig-paths';
|
||||
import preact from '@preact/preset-vite';
|
||||
import viteImagemin from 'vite-plugin-imagemin';
|
||||
@@ -44,6 +44,7 @@ export default defineConfig(({ command, mode }) => {
|
||||
plugins: [
|
||||
preact(),
|
||||
viteTsconfigPaths(),
|
||||
splitVendorChunkPlugin(),
|
||||
{
|
||||
...viteImagemin({
|
||||
verbose: false,
|
||||
@@ -112,6 +113,20 @@ export default defineConfig(({ command, mode }) => {
|
||||
nameCache: null,
|
||||
safari10: false,
|
||||
toplevel: false
|
||||
},
|
||||
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks(id: string) {
|
||||
if (id.includes('node_modules')) {
|
||||
// creating a chunk to react routes deps. Reducing the vendor chunk size
|
||||
if (id.includes('react-router-dom') || id.includes('@remix-run') || id.includes('react-router')) {
|
||||
return '@react-router';
|
||||
}
|
||||
return 'vendor';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1648,14 +1648,14 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/react@npm:^18.2.46":
|
||||
version: 18.2.46
|
||||
resolution: "@types/react@npm:18.2.46"
|
||||
"@types/react@npm:^18.2.47":
|
||||
version: 18.2.47
|
||||
resolution: "@types/react@npm:18.2.47"
|
||||
dependencies:
|
||||
"@types/prop-types": "npm:*"
|
||||
"@types/scheduler": "npm:*"
|
||||
csstype: "npm:^3.0.2"
|
||||
checksum: 10fb28a5b8504106512ce3b154c45d1ac045c31633786773a29f003b3079b434060368bb56f95ef6c39510835ceec4fb8fdc271d6ca2b9cdd979379cf53f126b
|
||||
checksum: 0a98c2ef8303909f78c973ac9731cb671f3a0b96bc5213b538d1a50cbaae6e51b6befd64845a9cb95af8528767315d5bd99a85608eb716c020393c7d33a9b477
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -1691,15 +1691,15 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@typescript-eslint/eslint-plugin@npm:^6.17.0":
|
||||
version: 6.17.0
|
||||
resolution: "@typescript-eslint/eslint-plugin@npm:6.17.0"
|
||||
"@typescript-eslint/eslint-plugin@npm:^6.18.0":
|
||||
version: 6.18.0
|
||||
resolution: "@typescript-eslint/eslint-plugin@npm:6.18.0"
|
||||
dependencies:
|
||||
"@eslint-community/regexpp": "npm:^4.5.1"
|
||||
"@typescript-eslint/scope-manager": "npm:6.17.0"
|
||||
"@typescript-eslint/type-utils": "npm:6.17.0"
|
||||
"@typescript-eslint/utils": "npm:6.17.0"
|
||||
"@typescript-eslint/visitor-keys": "npm:6.17.0"
|
||||
"@typescript-eslint/scope-manager": "npm:6.18.0"
|
||||
"@typescript-eslint/type-utils": "npm:6.18.0"
|
||||
"@typescript-eslint/utils": "npm:6.18.0"
|
||||
"@typescript-eslint/visitor-keys": "npm:6.18.0"
|
||||
debug: "npm:^4.3.4"
|
||||
graphemer: "npm:^1.4.0"
|
||||
ignore: "npm:^5.2.4"
|
||||
@@ -1712,44 +1712,44 @@ __metadata:
|
||||
peerDependenciesMeta:
|
||||
typescript:
|
||||
optional: true
|
||||
checksum: f2a5774e9cc03e491a5a488501e5622c7eebd766f5a4fc2c30642864a3b89b0807946bde33a678f326ba7032f3f6a51aa0bf9c2d10adc823804fc9fb47db55a6
|
||||
checksum: 7810a84f6d9cb735f6848aa4a7ef64c77740812afc0248fda63ec182910a1d045cd9a32d8e49b0e5323266db6da12a2fe50171147927b3186815a56f12c16ee7
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@typescript-eslint/parser@npm:^6.17.0":
|
||||
version: 6.17.0
|
||||
resolution: "@typescript-eslint/parser@npm:6.17.0"
|
||||
"@typescript-eslint/parser@npm:^6.18.0":
|
||||
version: 6.18.0
|
||||
resolution: "@typescript-eslint/parser@npm:6.18.0"
|
||||
dependencies:
|
||||
"@typescript-eslint/scope-manager": "npm:6.17.0"
|
||||
"@typescript-eslint/types": "npm:6.17.0"
|
||||
"@typescript-eslint/typescript-estree": "npm:6.17.0"
|
||||
"@typescript-eslint/visitor-keys": "npm:6.17.0"
|
||||
"@typescript-eslint/scope-manager": "npm:6.18.0"
|
||||
"@typescript-eslint/types": "npm:6.18.0"
|
||||
"@typescript-eslint/typescript-estree": "npm:6.18.0"
|
||||
"@typescript-eslint/visitor-keys": "npm:6.18.0"
|
||||
debug: "npm:^4.3.4"
|
||||
peerDependencies:
|
||||
eslint: ^7.0.0 || ^8.0.0
|
||||
peerDependenciesMeta:
|
||||
typescript:
|
||||
optional: true
|
||||
checksum: 2ed0ed4a5b30e953430ce3279df3655af09fa1caed2abf11804d239717daefc32a22864f6620ef57bb9c684c74a99a13241384fea5096e961385e3678fc2e920
|
||||
checksum: 6798332819f839454a8405e31cfaa0fe908d5966be929bef55e78ac51a0ff3868feb42b38e7772cedf88277f6b2841b3d91f6c573eacb945e2741ecae94047c7
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@typescript-eslint/scope-manager@npm:6.17.0":
|
||||
version: 6.17.0
|
||||
resolution: "@typescript-eslint/scope-manager@npm:6.17.0"
|
||||
"@typescript-eslint/scope-manager@npm:6.18.0":
|
||||
version: 6.18.0
|
||||
resolution: "@typescript-eslint/scope-manager@npm:6.18.0"
|
||||
dependencies:
|
||||
"@typescript-eslint/types": "npm:6.17.0"
|
||||
"@typescript-eslint/visitor-keys": "npm:6.17.0"
|
||||
checksum: fe09c628553c9336e6a36d32c1d34e78ebd20aa02130a6bf535329621ba5a98aaac171f607bc6e4d17b3478c42e7de6476376636897ce3f227c754eb99acd07e
|
||||
"@typescript-eslint/types": "npm:6.18.0"
|
||||
"@typescript-eslint/visitor-keys": "npm:6.18.0"
|
||||
checksum: c2c465e6803f78d3300142167a8a79dd2613c64cf464a40a9cf6b13a2c10c3d82ca30bb9c2d26aba7f054b8740b38e1d25f377fcdf917aba489d5b5ea2550858
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@typescript-eslint/type-utils@npm:6.17.0":
|
||||
version: 6.17.0
|
||||
resolution: "@typescript-eslint/type-utils@npm:6.17.0"
|
||||
"@typescript-eslint/type-utils@npm:6.18.0":
|
||||
version: 6.18.0
|
||||
resolution: "@typescript-eslint/type-utils@npm:6.18.0"
|
||||
dependencies:
|
||||
"@typescript-eslint/typescript-estree": "npm:6.17.0"
|
||||
"@typescript-eslint/utils": "npm:6.17.0"
|
||||
"@typescript-eslint/typescript-estree": "npm:6.18.0"
|
||||
"@typescript-eslint/utils": "npm:6.18.0"
|
||||
debug: "npm:^4.3.4"
|
||||
ts-api-utils: "npm:^1.0.1"
|
||||
peerDependencies:
|
||||
@@ -1757,23 +1757,23 @@ __metadata:
|
||||
peerDependenciesMeta:
|
||||
typescript:
|
||||
optional: true
|
||||
checksum: dc7938429193acfda61b7282197ec046039e2c4da41cdcddf4daaf300d10229e4e23bb0fcf0503b19c0b99a874849c8a9f5bb35ce106260f56a14106d2b41d8c
|
||||
checksum: 9f4a392fe7b7f6b1fb02acbdaa331e764775f6404c29ca66774419e39552523d878227020526ca9c438d997555a99600f8d711496e9a435fb14a779e25ed094e
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@typescript-eslint/types@npm:6.17.0":
|
||||
version: 6.17.0
|
||||
resolution: "@typescript-eslint/types@npm:6.17.0"
|
||||
checksum: 87ab1b5a3270ab34b917c22a2fb90a9ad7d9f3b19d73a337bc9efbe65f924da13482c97e8ccbe3bd3d081aa96039eeff50de41c1da2a2128066429b931cdb21d
|
||||
"@typescript-eslint/types@npm:6.18.0":
|
||||
version: 6.18.0
|
||||
resolution: "@typescript-eslint/types@npm:6.18.0"
|
||||
checksum: fc507ca7a1bfec04467087165ff6722f7b9aa9a089ecf0c17656824a951b92ca014766e480122de850057c63a3066628985eb0681c5bbb80ab41d94e7bb52288
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@typescript-eslint/typescript-estree@npm:6.17.0":
|
||||
version: 6.17.0
|
||||
resolution: "@typescript-eslint/typescript-estree@npm:6.17.0"
|
||||
"@typescript-eslint/typescript-estree@npm:6.18.0":
|
||||
version: 6.18.0
|
||||
resolution: "@typescript-eslint/typescript-estree@npm:6.18.0"
|
||||
dependencies:
|
||||
"@typescript-eslint/types": "npm:6.17.0"
|
||||
"@typescript-eslint/visitor-keys": "npm:6.17.0"
|
||||
"@typescript-eslint/types": "npm:6.18.0"
|
||||
"@typescript-eslint/visitor-keys": "npm:6.18.0"
|
||||
debug: "npm:^4.3.4"
|
||||
globby: "npm:^11.1.0"
|
||||
is-glob: "npm:^4.0.3"
|
||||
@@ -1783,34 +1783,34 @@ __metadata:
|
||||
peerDependenciesMeta:
|
||||
typescript:
|
||||
optional: true
|
||||
checksum: 1671b0d2f2fdf07074fb1e2524d61935cec173bd8db6e482cc5b2dcc77aed3ffa831396736ffa0ee2fdbddd8585ae9ca8d6c97bcaea1385b23907a1ec0508f83
|
||||
checksum: b65392e944baba97ed98e99a1e7122b7b05fa0d9a082b48d0190b377ae9e2ae4ed72d505a2f0f05f2ca78908f0e4b0f1acd44d345c7f4f4415fcec6bb2c57791
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@typescript-eslint/utils@npm:6.17.0":
|
||||
version: 6.17.0
|
||||
resolution: "@typescript-eslint/utils@npm:6.17.0"
|
||||
"@typescript-eslint/utils@npm:6.18.0":
|
||||
version: 6.18.0
|
||||
resolution: "@typescript-eslint/utils@npm:6.18.0"
|
||||
dependencies:
|
||||
"@eslint-community/eslint-utils": "npm:^4.4.0"
|
||||
"@types/json-schema": "npm:^7.0.12"
|
||||
"@types/semver": "npm:^7.5.0"
|
||||
"@typescript-eslint/scope-manager": "npm:6.17.0"
|
||||
"@typescript-eslint/types": "npm:6.17.0"
|
||||
"@typescript-eslint/typescript-estree": "npm:6.17.0"
|
||||
"@typescript-eslint/scope-manager": "npm:6.18.0"
|
||||
"@typescript-eslint/types": "npm:6.18.0"
|
||||
"@typescript-eslint/typescript-estree": "npm:6.18.0"
|
||||
semver: "npm:^7.5.4"
|
||||
peerDependencies:
|
||||
eslint: ^7.0.0 || ^8.0.0
|
||||
checksum: 37c63afcf66124bf84808699997953b8c84a378aa2c490a771b611d82cdac8499c58fac8eeb8378528e97660b59563d99297bfec4b982cd68760b0ffe54aa714
|
||||
checksum: f91798069e337ed42b7e415aabded833d540dab9adf66ae88183003428892584946f20a5496aae2dc65fc0f65b66496baed785a3470ee782b6e2dd25b9200c6c
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@typescript-eslint/visitor-keys@npm:6.17.0":
|
||||
version: 6.17.0
|
||||
resolution: "@typescript-eslint/visitor-keys@npm:6.17.0"
|
||||
"@typescript-eslint/visitor-keys@npm:6.18.0":
|
||||
version: 6.18.0
|
||||
resolution: "@typescript-eslint/visitor-keys@npm:6.18.0"
|
||||
dependencies:
|
||||
"@typescript-eslint/types": "npm:6.17.0"
|
||||
"@typescript-eslint/types": "npm:6.18.0"
|
||||
eslint-visitor-keys: "npm:^3.4.1"
|
||||
checksum: a2aed0e1437fdab8858ab9c7c8e355f8b72a5fa4b0adc54f28b8a2bbc29d4bb93214968ee940f83d013d0a4b83d00cd4eeeb05fb4c2c7d0ead324c6793f7d6d4
|
||||
checksum: bf34a357549d515607c761f385b7c7c82aaa07795cada0be2e1e3860c5103fbf731408ac07eaeb0517b51426d77ef9b194dfb94f205c776107a46e0d0027b452
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -1837,11 +1837,11 @@ __metadata:
|
||||
"@types/imagemin": "npm:^8.0.5"
|
||||
"@types/lodash-es": "npm:^4.17.12"
|
||||
"@types/node": "npm:^20.10.6"
|
||||
"@types/react": "npm:^18.2.46"
|
||||
"@types/react": "npm:^18.2.47"
|
||||
"@types/react-dom": "npm:^18.2.18"
|
||||
"@types/react-router-dom": "npm:^5.3.3"
|
||||
"@typescript-eslint/eslint-plugin": "npm:^6.17.0"
|
||||
"@typescript-eslint/parser": "npm:^6.17.0"
|
||||
"@typescript-eslint/eslint-plugin": "npm:^6.18.0"
|
||||
"@typescript-eslint/parser": "npm:^6.18.0"
|
||||
alova: "npm:^2.16.2"
|
||||
async-validator: "npm:^4.2.5"
|
||||
concurrently: "npm:^8.2.2"
|
||||
@@ -1873,7 +1873,7 @@ __metadata:
|
||||
terser: "npm:^5.26.0"
|
||||
typesafe-i18n: "npm:^5.26.2"
|
||||
typescript: "npm:^5.3.3"
|
||||
vite: "npm:^5.0.10"
|
||||
vite: "npm:^5.0.11"
|
||||
vite-plugin-imagemin: "npm:^0.6.1"
|
||||
vite-tsconfig-paths: "npm:^4.2.3"
|
||||
languageName: unknown
|
||||
@@ -8771,9 +8771,9 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"vite@npm:^5.0.10":
|
||||
version: 5.0.10
|
||||
resolution: "vite@npm:5.0.10"
|
||||
"vite@npm:^5.0.11":
|
||||
version: 5.0.11
|
||||
resolution: "vite@npm:5.0.11"
|
||||
dependencies:
|
||||
esbuild: "npm:^0.19.3"
|
||||
fsevents: "npm:~2.3.3"
|
||||
@@ -8807,7 +8807,7 @@ __metadata:
|
||||
optional: true
|
||||
bin:
|
||||
vite: bin/vite.js
|
||||
checksum: 5421e9c7f8cf3152eace9a8b528269141635f367e5dc63c5f1fe2712a766d9757f8197733cf3f28be590afdd520130d38de90c955e6dba6edfa6f9056c1e5ea7
|
||||
checksum: f1a8fea35ed9f162d7a10fd13efb2c96637028b0a319d726aeec8b31e20e4d047272bda5df82167618e7774a520236c66f3093ed172802660aec5227814072f4
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
||||
Reference in New Issue
Block a user