Skip to content

Commit

Permalink
Merge pull request emsesp#1574 from MichaelDvP/dev2
Browse files Browse the repository at this point in the history
Update dev2 to latest changes of dev
  • Loading branch information
proddy authored Jan 21, 2024
2 parents f25ab5f + 1491f28 commit 89da6d5
Show file tree
Hide file tree
Showing 319 changed files with 5,231 additions and 5,696 deletions.
13 changes: 12 additions & 1 deletion CHANGELOG_LATEST.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,27 @@
- heatpump energy meters [#1463](https://github.com/emsesp/EMS-ESP32/issues/1463)
- heatpump max power [#1475](https://github.com/emsesp/EMS-ESP32/issues/1475)
- checkbox for MQTT-TLS enable [#1474](https://github.com/emsesp/EMS-ESP32/issues/1474)
- added SK (Slovencina) language. Thanks @misa1515
- added SK (Slovenian) language. Thanks @misa1515
- CPU info [#1497](https://github.com/emsesp/EMS-ESP32/pull/1497)
- Show network hostname in Web UI under Network Status
- Improved HA Discovery so each section (EMS device, Scheduler, Analog, Temperature, Custom, Shower) have their own section
- boiler Bosch C1200W, id 12, [#1536](https://github.com/emsesp/EMS-ESP32/issues/1536)
- mixer MM100 telegram 0x2CC [#1554](https://github.com/emsesp/EMS-ESP32/issues/1554)
- boiler hpSetDiffPressure [#1563](https://github.com/emsesp/EMS-ESP32/issues/1563)
- custom variables [#1423](https://github.com/emsesp/EMS-ESP32/issues/1423)

## Fixed

- exhaust temperature for some boilers
- add back boil2hyst [#1477](https://github.com/emsesp/EMS-ESP32/issues/1477)
- subscribed MQTT topics not detecting changes by EMS-ESP [#1494](https://github.com/emsesp/EMS-ESP32/issues/1494)
- changed HA name and grouping to be consistent [#1528](https://github.com/emsesp/EMS-ESP32/issues/1528)
- MQTT autodiscovery in Domoticz not working [#1360](https://github.com/emsesp/EMS-ESP32/issues/1528)
- dhw comfort for new ems+, [#1495](https://github.com/emsesp/EMS-ESP32/issues/1495)
- added writeable icon to Web's Custom Entity page for each entity shown in the table

## Changed

- use flag for BC400 compatible thermostats, manage different mode settings
- HA don't set entity_category to Diagnostic/Configuration for EMS entities [#1459](https://github.com/emsesp/EMS-ESP32/discussions/1459)
- upgraded ArduinoJson to 7.0.0 #1538 and then 7.0.2
30 changes: 15 additions & 15 deletions interface/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@
"lint": "eslint . --cache --fix"
},
"dependencies": {
"@alova/adapter-xhr": "^1.0.2",
"@alova/adapter-xhr": "^1.0.3",
"@babel/core": "^7.23.7",
"@emotion/react": "^11.11.3",
"@emotion/styled": "^11.11.0",
"@mui/icons-material": "^5.15.3",
"@mui/material": "^5.15.3",
"@mui/icons-material": "^5.15.5",
"@mui/material": "^5.15.5",
"@table-library/react-table-library": "4.1.7",
"@types/imagemin": "^8.0.5",
"@types/lodash-es": "^4.17.12",
"@types/node": "^20.10.6",
"@types/react": "^18.2.46",
"@types/node": "^20.11.5",
"@types/react": "^18.2.48",
"@types/react-dom": "^18.2.18",
"@types/react-router-dom": "^5.3.3",
"alova": "^2.16.2",
"alova": "^2.17.0",
"async-validator": "^4.2.5",
"history": "^5.3.0",
"jwt-decode": "^4.0.0",
Expand All @@ -42,18 +42,18 @@
"react": "latest",
"react-dom": "latest",
"react-dropzone": "^14.2.3",
"react-icons": "^4.12.0",
"react-router-dom": "^6.21.1",
"react-toastify": "^9.1.3",
"react-icons": "^5.0.1",
"react-router-dom": "^6.21.3",
"react-toastify": "^10.0.4",
"sockette": "^2.0.6",
"typesafe-i18n": "^5.26.2",
"typescript": "^5.3.3"
},
"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.19.0",
"@typescript-eslint/parser": "^6.19.0",
"concurrently": "^8.2.2",
"eslint": "^8.56.0",
"eslint-config-airbnb": "^19.0.4",
Expand All @@ -67,12 +67,12 @@
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"preact": "^10.19.3",
"prettier": "^3.1.1",
"prettier": "^3.2.4",
"rollup-plugin-visualizer": "^5.12.0",
"terser": "^5.26.0",
"vite": "^5.0.10",
"terser": "^5.27.0",
"vite": "^5.0.12",
"vite-plugin-imagemin": "^0.6.1",
"vite-tsconfig-paths": "^4.2.3"
"vite-tsconfig-paths": "^4.3.1"
},
"packageManager": "yarn@4.0.2"
}
1 change: 1 addition & 0 deletions interface/progmem-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ var totalSize = 0;

const generateWWWClass = () =>
`typedef std::function<void(const String& uri, const String& contentType, const uint8_t * content, size_t len)> RouteRegistrationHandler;
// Total size is ${totalSize} bytes
class WWWData {
${indent}public:
Expand Down
14 changes: 11 additions & 3 deletions interface/src/components/upload/SingleUpload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ const SingleUpload: FC<SingleUploadProps> = ({ onDrop, onCancel, isUploading, pr

const progressText = () => {
if (uploading) {
if (progress.total) {
return LL.UPLOADING() + ': ' + Math.round((progress.loaded * 100) / progress.total) + '%';
if (progress.total && progress.loaded) {
return progress.loaded <= progress.total
? LL.UPLOADING() + ': ' + Math.round((progress.loaded * 100) / progress.total) + '%'
: LL.UPLOADING() + ': ' + Math.round((progress.total * 100) / progress.loaded) + '%';
}
}
return LL.UPLOAD_DROP_TEXT();
Expand Down Expand Up @@ -83,7 +85,13 @@ const SingleUpload: FC<SingleUploadProps> = ({ onDrop, onCancel, isUploading, pr
<Box width="100%" p={2}>
<LinearProgress
variant="determinate"
value={progress.total === 0 ? 0 : Math.round((progress.loaded * 100) / progress.total)}
value={
progress.total === 0 || progress.loaded === 0
? 0
: progress.loaded <= progress.total
? Math.round((progress.loaded * 100) / progress.total)
: Math.round((progress.total * 100) / progress.loaded)
}
/>
</Box>
<Button startIcon={<CancelIcon />} variant="outlined" color="secondary" onClick={onCancel}>
Expand Down
1 change: 1 addition & 0 deletions interface/src/framework/mqtt/MqttSettingsForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}>
Expand Down
10 changes: 10 additions & 0 deletions interface/src/framework/network/NetworkStatusForm.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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>
Expand Down
3 changes: 2 additions & 1 deletion interface/src/framework/security/GenerateToken.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ const GenerateToken: FC<GenerateTokenProps> = ({ username, onClose }) => {
if (open) {
void generateToken();
}
}, [open, generateToken]);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [open]);

return (
<Dialog sx={dialogStyle} onClose={onClose} open={!!username} fullWidth maxWidth="sm">
Expand Down
2 changes: 2 additions & 0 deletions interface/src/framework/system/SystemStatusForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,8 @@ const SystemStatusForm: FC = () => {
<ListItemText
primary="CPU"
secondary={
data.esp_platform +
'/' +
data.cpu_type +
' (rev.' +
data.cpu_rev +
Expand Down
1 change: 1 addition & 0 deletions interface/src/framework/system/UploadFileForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ const UploadFileForm: FC = () => {
<Typography variant="body2">
{LL.UPLOAD_TEXT()}
<br />
<br />
{LL.RESTART_TEXT(1)}.
</Typography>
</Box>
Expand Down
2 changes: 1 addition & 1 deletion interface/src/i18n/en/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const en: Translation = {
FREQ: 'Frequency',
DUTY_CYCLE: 'Duty Cycle',
UNIT: 'UoM',
STARTVALUE: 'Start value',
STARTVALUE: 'Start Value',
WARN_GPIO: 'Warning: be careful when assigning a GPIO!',
EDIT: 'Edit',
SENSOR: 'Sensor',
Expand Down
2 changes: 1 addition & 1 deletion interface/src/project/DashboardDevices.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) => (
<>
Expand Down
2 changes: 1 addition & 1 deletion interface/src/project/DashboardDevicesDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const DashboardDevicesDialog = ({
return (
<Dialog sx={dialogStyle} open={open} onClose={close}>
<DialogTitle>
{selectedItem.v === '' && selectedItem.c ? LL.RUN_COMMAND() : writeable ? LL.CHANGE_VALUE() : LL.VALUE(0)}
{selectedItem.v === '' && selectedItem.c ? LL.RUN_COMMAND() : writeable ? LL.CHANGE_VALUE() : LL.VALUE(1)}
</DialogTitle>
<DialogContent dividers>
<Box color="warning.main" p={0} pl={0} pr={0} mt={0} mb={2}>
Expand Down
2 changes: 1 addition & 1 deletion interface/src/project/DashboardSensors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions interface/src/project/DashboardSensorsAnalogDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ const DashboardSensorsAnalogDialog = ({
<Grid item xs={4}>
<TextField
name="o"
label={LL.VALUE(0)}
label={LL.VALUE(1)}
value={numberValue(editItem.o)}
fullWidth
type="number"
Expand All @@ -197,7 +197,7 @@ const DashboardSensorsAnalogDialog = ({
<Grid item xs={4}>
<TextField
name="o"
label={LL.VALUE(0)}
label={LL.VALUE(1)}
value={numberValue(editItem.o)}
fullWidth
select
Expand Down
4 changes: 2 additions & 2 deletions interface/src/project/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { Tab } from '@mui/material';
import { Navigate, Route, Routes } from 'react-router-dom';

import SettingsApplication from './SettingsApplication';
import SettingsCustomEntities from './SettingsCustomEntities';
import SettingsCustomization from './SettingsCustomization';
import SettingsEntities from './SettingsEntities';
import SettingsScheduler from './SettingsScheduler';
import type { FC } from 'react';
import { RouterTabs, useRouterTab, useLayoutTitle } from 'components';
Expand All @@ -27,7 +27,7 @@ const Settings: FC = () => {
<Route path="application" element={<SettingsApplication />} />
<Route path="customization" element={<SettingsCustomization />} />
<Route path="scheduler" element={<SettingsScheduler />} />
<Route path="customentities" element={<SettingsEntities />} />
<Route path="customentities" element={<SettingsCustomEntities />} />
<Route path="*" element={<Navigate replace to="/settings/application" />} />
</Routes>
</>
Expand Down
Loading

0 comments on commit 89da6d5

Please sign in to comment.