Skip to content

Commit a57fdaa

Browse files
committed
Merge remote-tracking branch 'origin/dev' into main
2 parents 4841e42 + 1ae7380 commit a57fdaa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+13355
-6206
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ emsesp
2525
/data/www
2626
/lib/framework/WWWData.h
2727
/interface/build
28-
/interface/node_modules
28+
node_modules
2929
/interface/.eslintcache
3030

CHANGELOG.md

+24
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,30 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [3.1.0] May 4 2021
9+
10+
- Mock API to simulate an ESP, for testing web
11+
- Able to write values from the Web UI
12+
- check values with `"cmd":<valuename>` and data empty or `?`
13+
- set hc for values and commands by id or prefix `hc<x>`+separator, separator can be any char
14+
15+
## Fixed
16+
17+
- Don't create Home Assistant MQTT discovery entries for device values that don't exists (#756 on EMS-ESP repo)
18+
- Update shower MQTT when a shower start is detected
19+
- S32 board profile
20+
21+
## Changed
22+
23+
- Icon for Network
24+
- MQTT Formatting payload (nested vs single) is a pull-down option
25+
- moved mqtt-topics and texts to local_EN, all topics lower case
26+
- Re-enabled Shower Alert (still experimental)
27+
- lowercased Flow temp in commands
28+
- system console commands to main
29+
30+
## Removed
31+
832
## [3.0.1] March 30 2021
933

1034
## Added

README.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22

33
**EMS-ESP** is an open-source firmware for the Espressif ESP8266 and ESP32 microcontroller that communicates with **EMS** (Energy Management System) based equipment from manufacturers like Bosch, Buderus, Nefit, Junkers, Worcester and Sieger.
44

5-
This is the firmware for the ESP32.
5+
This is the firmware for the ESP32. Compared to version 2 on the ESP8266, this version has
6+
- Ethernet Support
7+
- Pre-configured board layouts
8+
- Writing values directly from the Web UI
9+
- Mock API server for faster offline development
10+
- Expose to more commands, via MQTT
11+
- Improvements to Dallas sensors, Shower service
612

713
[![version](https://img.shields.io/github/release/emsesp/EMS-ESP32.svg?label=Latest%20Release)](https://github.com/emsesp/EMS-ESP32/blob/main/CHANGELOG.md)
814
[![release-date](https://img.shields.io/github/release-date/emsesp/EMS-ESP32.svg?label=Released)](https://github.com/emsesp/EMS-ESP32/commits/main)

interface/.env.development

+3-9
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
1-
# Change the IP address to that of your ESP device to enable local development of the UI.
2-
# Remember to also enable CORS in platformio.ini before uploading the code to the device
3-
# with -DENABLE_CORS
1+
# Change the IP address to that of your ESP device to enable local development of the UI
42

5-
# my Wifi
6-
#REACT_APP_HTTP_ROOT=http://10.10.10.101
7-
#REACT_APP_WEB_SOCKET_ROOT=ws://10.10.10.101
3+
# REACT_APP_HTTP_ROOT=http://localhost:3000
4+
# REACT_APP_WEB_SOCKET_ROOT=ws://localhost:3000
85

9-
# my Ethernet
10-
REACT_APP_HTTP_ROOT=http://192.168.1.134
11-
REACT_APP_WEB_SOCKET_ROOT=ws://http://192.168.1.134

interface/config-overrides.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const fs = require('fs');
99

1010
module.exports = function override(config, env) {
1111
if (env === "production") {
12-
// rename the ouput file, we need it's path to be short, for SPIFFS
12+
// rename the output file, we need it's path to be short for LittleFS
1313
config.output.filename = 'js/[id].[chunkhash:4].js';
1414
config.output.chunkFilename = 'js/[id].[chunkhash:4].js';
1515

interface/package-lock.json

+6,610-4,259
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

interface/package.json

+23-16
Original file line numberDiff line numberDiff line change
@@ -3,37 +3,40 @@
33
"version": "0.1.0",
44
"private": true,
55
"dependencies": {
6-
"@material-ui/core": "^4.11.3",
6+
"@material-ui/core": "^4.11.4",
77
"@material-ui/icons": "^4.11.2",
88
"@types/lodash": "^4.14.168",
9-
"@types/node": "^12.20.4",
10-
"@types/react": "^17.0.3",
11-
"@types/react-dom": "^17.0.1",
9+
"@types/node": "^15.0.1",
10+
"@types/react": "^17.0.4",
11+
"@types/react-dom": "^17.0.3",
1212
"@types/react-material-ui-form-validator": "^2.1.0",
13-
"@types/react-router": "^5.1.12",
14-
"@types/react-router-dom": "^5.1.6",
15-
"compression-webpack-plugin": "^4.0.0",
13+
"@types/react-router": "^5.1.13",
14+
"@types/react-router-dom": "^5.1.7",
15+
"compression-webpack-plugin": "^5.0.2",
16+
"express": "^4.17.1",
1617
"jwt-decode": "^3.1.2",
1718
"lodash": "^4.17.21",
18-
"mime-types": "^2.1.29",
19-
"notistack": "^1.0.5",
20-
"parse-ms": "^2.1.0",
21-
"react": "^17.0.1",
22-
"react-dom": "^17.0.1",
23-
"react-dropzone": "^11.3.1",
19+
"mime-types": "^2.1.30",
20+
"notistack": "^1.0.6",
21+
"parse-ms": "^3.0.0",
22+
"react": "^17.0.2",
23+
"react-dom": "^17.0.2",
24+
"react-dropzone": "^11.3.2",
2425
"react-form-validator-core": "^1.1.1",
2526
"react-material-ui-form-validator": "^2.1.4",
2627
"react-router": "^5.2.0",
2728
"react-router-dom": "^5.2.0",
28-
"react-scripts": "4.0.1",
29+
"react-scripts": "4.0.3",
2930
"sockette": "^2.0.6",
30-
"typescript": "4.0.5",
31+
"typescript": "4.2.4",
3132
"zlib": "^1.0.5"
3233
},
3334
"scripts": {
3435
"start": "react-app-rewired start",
3536
"build": "react-app-rewired build",
36-
"eject": "react-scripts eject"
37+
"eject": "react-scripts eject",
38+
"mock-api": "nodemon --watch ../mock-api ../mock-api/server.js",
39+
"dev": "run-p start mock-api"
3740
},
3841
"eslintConfig": {
3942
"extends": "react-app"
@@ -51,6 +54,10 @@
5154
]
5255
},
5356
"devDependencies": {
57+
"concurrently": "^6.0.1",
58+
"http-proxy-middleware": "^1.1.1",
59+
"nodemon": "^2.0.7",
60+
"npm-run-all": "^4.1.5",
5461
"react-app-rewired": "^2.1.8"
5562
}
5663
}

interface/src/api/Endpoints.ts

+1
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,6 @@ export const SYSTEM_STATUS_ENDPOINT = ENDPOINT_ROOT + "systemStatus";
1818
export const SIGN_IN_ENDPOINT = ENDPOINT_ROOT + "signIn";
1919
export const VERIFY_AUTHORIZATION_ENDPOINT = ENDPOINT_ROOT + "verifyAuthorization";
2020
export const SECURITY_SETTINGS_ENDPOINT = ENDPOINT_ROOT + "securitySettings";
21+
export const GENERATE_TOKEN_ENDPOINT = ENDPOINT_ROOT + "generateToken";
2122
export const RESTART_ENDPOINT = ENDPOINT_ROOT + "restart";
2223
export const FACTORY_RESET_ENDPOINT = ENDPOINT_ROOT + "factoryReset";

interface/src/authentication/AuthenticatedRoute.tsx

+2-4
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@ import { withSnackbar, WithSnackbarProps } from 'notistack';
55
import * as Authentication from './Authentication';
66
import { withAuthenticationContext, AuthenticationContextProps, AuthenticatedContext, AuthenticatedContextValue } from './AuthenticationContext';
77

8-
type ChildComponent = React.ComponentType<RouteComponentProps<any>> | React.ComponentType<any>;
9-
108
interface AuthenticatedRouteProps extends RouteProps, WithSnackbarProps, AuthenticationContextProps {
11-
component: ChildComponent;
9+
component: React.ComponentType<RouteComponentProps<any>> | React.ComponentType<any>;
1210
}
1311

1412
type RenderComponent = (props: RouteComponentProps<any>) => React.ReactNode;
@@ -27,7 +25,7 @@ export class AuthenticatedRoute extends React.Component<AuthenticatedRouteProps>
2725
);
2826
}
2927
Authentication.storeLoginRedirect(location);
30-
enqueueSnackbar("Please sign in to continue.", { variant: 'info' });
28+
enqueueSnackbar("Please sign in to continue", { variant: 'info' });
3129
return (
3230
<Redirect to='/' />
3331
);

interface/src/authentication/AuthenticationWrapper.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class AuthenticationWrapper extends React.Component<AuthenticationWrapperProps,
101101
me: undefined
102102
}
103103
});
104-
this.props.enqueueSnackbar("You have signed out.", { variant: 'success', });
104+
this.props.enqueueSnackbar("You have signed out", { variant: 'success', });
105105
history.push('/');
106106
}
107107

interface/src/authentication/UnauthenticatedRoute.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ class UnauthenticatedRoute extends Route<UnauthenticatedRouteProps> {
1919
if (authenticationContext.me) {
2020
return (<Redirect to={Authentication.fetchLoginRedirect(features)} />);
2121
}
22-
return (<Component {...props} />);
22+
if (Component) {
23+
return (<Component {...props} />);
24+
}
2325
}
2426
return (
2527
<Route {...rest} render={renderComponent} />

interface/src/components/MenuAppBar.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { Card, CardContent, CardActions } from '@material-ui/core';
88

99
import { withStyles, createStyles, Theme, WithTheme, WithStyles, withTheme } from '@material-ui/core/styles';
1010

11-
import WifiIcon from '@material-ui/icons/Wifi';
11+
import SettingsEthernetIcon from '@material-ui/icons/SettingsEthernet';
1212
import SettingsIcon from '@material-ui/icons/Settings';
1313
import AccessTimeIcon from '@material-ui/icons/AccessTime';
1414
import AccountCircleIcon from '@material-ui/icons/AccountCircle';
@@ -146,7 +146,7 @@ class MenuAppBar extends React.Component<MenuAppBarProps, MenuAppBarState> {
146146
<List>
147147
<ListItem to='/network/' selected={path.startsWith('/network/')} button component={Link}>
148148
<ListItemIcon>
149-
<WifiIcon />
149+
<SettingsEthernetIcon />
150150
</ListItemIcon>
151151
<ListItemText primary="Network Connection" />
152152
</ListItem>

0 commit comments

Comments
 (0)