Merge pull request #761 from proddy/dev

use HA connectivity device class #751
This commit is contained in:
Proddy
2022-11-20 20:55:35 +01:00
committed by GitHub
7 changed files with 207 additions and 196 deletions

View File

@@ -17,6 +17,7 @@
- Add min/max to customization table [#686](https://github.com/emsesp/EMS-ESP32/issues/686) - Add min/max to customization table [#686](https://github.com/emsesp/EMS-ESP32/issues/686)
- Add MD5 check [#637](https://github.com/emsesp/EMS-ESP32/issues/637) - Add MD5 check [#637](https://github.com/emsesp/EMS-ESP32/issues/637)
- Add more bus-ids [#673](https://github.com/emsesp/EMS-ESP32/issues/673) - Add more bus-ids [#673](https://github.com/emsesp/EMS-ESP32/issues/673)
- Use HA connectivity device class for Status [#751](https://github.com/emsesp/EMS-ESP32/issues/751)
## Fixed ## Fixed

View File

@@ -11,13 +11,13 @@
"@emotion/react": "^11.10.5", "@emotion/react": "^11.10.5",
"@emotion/styled": "^11.10.5", "@emotion/styled": "^11.10.5",
"@msgpack/msgpack": "^2.8.0", "@msgpack/msgpack": "^2.8.0",
"@mui/icons-material": "^5.10.9", "@mui/icons-material": "^5.10.14",
"@mui/material": "^5.10.13", "@mui/material": "^5.10.14",
"@table-library/react-table-library": "4.0.23", "@table-library/react-table-library": "4.0.23",
"@types/lodash": "^4.14.188", "@types/lodash": "^4.14.189",
"@types/node": "^18.11.9", "@types/node": "^18.11.9",
"@types/react": "^18.0.25", "@types/react": "^18.0.25",
"@types/react-dom": "^18.0.8", "@types/react-dom": "^18.0.9",
"@types/react-router-dom": "^5.3.3", "@types/react-router-dom": "^5.3.3",
"async-validator": "^4.2.5", "async-validator": "^4.2.5",
"axios": "^1.1.3", "axios": "^1.1.3",
@@ -35,7 +35,7 @@
"react-scripts": "5.0.1", "react-scripts": "5.0.1",
"sockette": "^2.0.6", "sockette": "^2.0.6",
"typesafe-i18n": "^5.16.3", "typesafe-i18n": "^5.16.3",
"typescript": "^4.8.4" "typescript": "^4.9.3"
}, },
"devDependencies": { "devDependencies": {
"nodemon": "^2.0.20", "nodemon": "^2.0.20",
@@ -3091,14 +3091,14 @@
} }
}, },
"node_modules/@mui/base": { "node_modules/@mui/base": {
"version": "5.0.0-alpha.105", "version": "5.0.0-alpha.106",
"resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-alpha.105.tgz", "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-alpha.106.tgz",
"integrity": "sha512-4IPBcJQIgVVXQvN6DQMoCHed52GBtwSqYs0jD0dDcMR3o76AodQtpEeWFz3p7mJoc6f/IHBl9U6jEfL1r/kM4g==", "integrity": "sha512-xJQQtwPCPwr6hGWTBdvDwHYwExn3Bw7nPQkN8Fuz8kHpZqoMVWQvvaFS557AIkkI2AFLV3DxVIMjbCvrIntBWg==",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.19.0", "@babel/runtime": "^7.20.1",
"@emotion/is-prop-valid": "^1.2.0", "@emotion/is-prop-valid": "^1.2.0",
"@mui/types": "^7.2.0", "@mui/types": "^7.2.1",
"@mui/utils": "^5.10.9", "@mui/utils": "^5.10.14",
"@popperjs/core": "^2.11.6", "@popperjs/core": "^2.11.6",
"clsx": "^1.2.1", "clsx": "^1.2.1",
"prop-types": "^15.8.1", "prop-types": "^15.8.1",
@@ -3123,20 +3123,20 @@
} }
}, },
"node_modules/@mui/core-downloads-tracker": { "node_modules/@mui/core-downloads-tracker": {
"version": "5.10.13", "version": "5.10.14",
"resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.10.13.tgz", "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.10.14.tgz",
"integrity": "sha512-zWkWPV/SaNdsIdxAWiuVGZ+Ue3BkfSIlU/BFIrJmuUcwiIa7gQsbI/DOpj1KzLvqZhdEe2wC1aG4nCHfzgc1Hg==", "integrity": "sha512-qLgIJNOR9Dre8JiZ/neVzOf4jf88J6YtOkQqugtMrleLjbfRVUSS4LWl9CSOjNq76quYdmYWnSDgfQqOooT2cQ==",
"funding": { "funding": {
"type": "opencollective", "type": "opencollective",
"url": "https://opencollective.com/mui" "url": "https://opencollective.com/mui"
} }
}, },
"node_modules/@mui/icons-material": { "node_modules/@mui/icons-material": {
"version": "5.10.9", "version": "5.10.14",
"resolved": "https://registry.npmjs.org/@mui/icons-material/-/icons-material-5.10.9.tgz", "resolved": "https://registry.npmjs.org/@mui/icons-material/-/icons-material-5.10.14.tgz",
"integrity": "sha512-sqClXdEM39WKQJOQ0ZCPTptaZgqwibhj2EFV9N0v7BU1PO8y4OcX/a2wIQHn4fNuDjIZktJIBrmU23h7aqlGgg==", "integrity": "sha512-qtH60slQa+7MZRn6kyui8rKuoGDglPqaHX+pzBKNvd8JCOlrnfY5DmGGDdToTXyXl8xJ8nhANZbrbpg7UVKq/Q==",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.19.0" "@babel/runtime": "^7.20.1"
}, },
"engines": { "engines": {
"node": ">=12.0.0" "node": ">=12.0.0"
@@ -3157,16 +3157,16 @@
} }
}, },
"node_modules/@mui/material": { "node_modules/@mui/material": {
"version": "5.10.13", "version": "5.10.14",
"resolved": "https://registry.npmjs.org/@mui/material/-/material-5.10.13.tgz", "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.10.14.tgz",
"integrity": "sha512-TkkT1rNc0/hhL4/+zv4gYcA6egNWBH/1Tz+azoTnQIUdZ32fgwFI2pFX2KVJNTt30xnLznxDWtTv7ilmJQ52xw==", "integrity": "sha512-HWzKVAykePMx54WtxVwZyL1W4k3xlHYIqwMw0CaXAvgB3UE9yjABZuuGr8vG5Z6CSNWamzd+s1x8u7pQPFl9og==",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.19.0", "@babel/runtime": "^7.20.1",
"@mui/base": "5.0.0-alpha.105", "@mui/base": "5.0.0-alpha.106",
"@mui/core-downloads-tracker": "^5.10.13", "@mui/core-downloads-tracker": "^5.10.14",
"@mui/system": "^5.10.13", "@mui/system": "^5.10.14",
"@mui/types": "^7.2.0", "@mui/types": "^7.2.1",
"@mui/utils": "^5.10.9", "@mui/utils": "^5.10.14",
"@types/react-transition-group": "^4.4.5", "@types/react-transition-group": "^4.4.5",
"clsx": "^1.2.1", "clsx": "^1.2.1",
"csstype": "^3.1.1", "csstype": "^3.1.1",
@@ -3201,12 +3201,12 @@
} }
}, },
"node_modules/@mui/private-theming": { "node_modules/@mui/private-theming": {
"version": "5.10.9", "version": "5.10.14",
"resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.10.9.tgz", "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.10.14.tgz",
"integrity": "sha512-BN7/CnsVPVyBaQpDTij4uV2xGYHHHhOgpdxeYLlIu+TqnsVM7wUeF+37kXvHovxM6xmL5qoaVUD98gDC0IZnHg==", "integrity": "sha512-3aIBe8WK65CwAPDY8nB11hYnzE1CZMymi76UnaFrA/DdGDwl5Y8F6uB+StKrkVmsqF1po7Mp2odqVkHj320gXw==",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.19.0", "@babel/runtime": "^7.20.1",
"@mui/utils": "^5.10.9", "@mui/utils": "^5.10.14",
"prop-types": "^15.8.1" "prop-types": "^15.8.1"
}, },
"engines": { "engines": {
@@ -3227,12 +3227,12 @@
} }
}, },
"node_modules/@mui/styled-engine": { "node_modules/@mui/styled-engine": {
"version": "5.10.8", "version": "5.10.14",
"resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.10.8.tgz", "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.10.14.tgz",
"integrity": "sha512-w+y8WI18EJV6zM/q41ug19cE70JTeO6sWFsQ7tgePQFpy6ToCVPh0YLrtqxUZXSoMStW5FMw0t9fHTFAqPbngw==", "integrity": "sha512-bgKdM57ExogWpIfhL/ngSlzF4FhbH00vYF+Y5VALTob4uslFqje0xzoWmbfcCn4cZt2NXxZJIwhsq4vzo5itlw==",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.19.0", "@babel/runtime": "^7.20.1",
"@emotion/cache": "^11.10.3", "@emotion/cache": "^11.10.5",
"csstype": "^3.1.1", "csstype": "^3.1.1",
"prop-types": "^15.8.1" "prop-types": "^15.8.1"
}, },
@@ -3258,15 +3258,15 @@
} }
}, },
"node_modules/@mui/system": { "node_modules/@mui/system": {
"version": "5.10.13", "version": "5.10.14",
"resolved": "https://registry.npmjs.org/@mui/system/-/system-5.10.13.tgz", "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.10.14.tgz",
"integrity": "sha512-Xzx26Asu5fVlm0ucm+gnJmeX4Y1isrpVDvqxX4yJaOT7Fzmd8Lfq9ih3QMfZajns5LMtUiOuCQlVFRtUG5IY7A==", "integrity": "sha512-2de7XCjRb1j8Od0Stmo0LwFMLpOMNT4wzfINuExXI1TVSuyxXIXUxiC5FEgJW3GMvf/a7SUR8VOiMoKlKWzukw==",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.19.0", "@babel/runtime": "^7.20.1",
"@mui/private-theming": "^5.10.9", "@mui/private-theming": "^5.10.14",
"@mui/styled-engine": "^5.10.8", "@mui/styled-engine": "^5.10.14",
"@mui/types": "^7.2.0", "@mui/types": "^7.2.1",
"@mui/utils": "^5.10.9", "@mui/utils": "^5.10.14",
"clsx": "^1.2.1", "clsx": "^1.2.1",
"csstype": "^3.1.1", "csstype": "^3.1.1",
"prop-types": "^15.8.1" "prop-types": "^15.8.1"
@@ -3297,9 +3297,9 @@
} }
}, },
"node_modules/@mui/types": { "node_modules/@mui/types": {
"version": "7.2.0", "version": "7.2.1",
"resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.0.tgz", "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.1.tgz",
"integrity": "sha512-lGXtFKe5lp3UxTBGqKI1l7G8sE2xBik8qCfrLHD5olwP/YU0/ReWoWT7Lp1//ri32dK39oPMrJN8TgbkCSbsNA==", "integrity": "sha512-c5mSM7ivD8EsqK6HUi9hQPr5V7TJ/IRThUQ9nWNYPdhCGriTSQV4vL6DflT99LkM+wLiIS1rVjphpEWxERep7A==",
"peerDependencies": { "peerDependencies": {
"@types/react": "*" "@types/react": "*"
}, },
@@ -3310,11 +3310,11 @@
} }
}, },
"node_modules/@mui/utils": { "node_modules/@mui/utils": {
"version": "5.10.9", "version": "5.10.14",
"resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.10.9.tgz", "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.10.14.tgz",
"integrity": "sha512-2tdHWrq3+WCy+G6TIIaFx3cg7PorXZ71P375ExuX61od1NOAJP1mK90VxQ8N4aqnj2vmO3AQDkV4oV2Ktvt4bA==", "integrity": "sha512-12p59+wDZpA++XVJmKwqsZmrA1nmUQ5d0a1yQWtcDjxNyER1EDzozYN/db+FY2i5ceQh2TynPTEwGms2mXDwFg==",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.19.0", "@babel/runtime": "^7.20.1",
"@types/prop-types": "^15.7.5", "@types/prop-types": "^15.7.5",
"@types/react-is": "^16.7.1 || ^17.0.0", "@types/react-is": "^16.7.1 || ^17.0.0",
"prop-types": "^15.8.1", "prop-types": "^15.8.1",
@@ -4007,9 +4007,9 @@
"integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==" "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ=="
}, },
"node_modules/@types/lodash": { "node_modules/@types/lodash": {
"version": "4.14.188", "version": "4.14.189",
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.188.tgz", "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.189.tgz",
"integrity": "sha512-zmEmF5OIM3rb7SbLCFYoQhO4dGt2FRM9AMkxvA3LaADOF1n8in/zGJlWji9fmafLoNyz+FoL6FE0SLtGIArD7w==" "integrity": "sha512-kb9/98N6X8gyME9Cf7YaqIMvYGnBSWqEci6tiettE6iJWH1XdJz/PO8LB0GtLCG7x8dU3KWhZT+lA1a35127tA=="
}, },
"node_modules/@types/mime": { "node_modules/@types/mime": {
"version": "3.0.1", "version": "3.0.1",
@@ -4062,9 +4062,9 @@
} }
}, },
"node_modules/@types/react-dom": { "node_modules/@types/react-dom": {
"version": "18.0.8", "version": "18.0.9",
"resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.0.8.tgz", "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.0.9.tgz",
"integrity": "sha512-C3GYO0HLaOkk9dDAz3Dl4sbe4AKUGTCfFIZsz3n/82dPNN8Du533HzKatDxeUYWu24wJgMP1xICqkWk1YOLOIw==", "integrity": "sha512-qnVvHxASt/H7i+XG1U1xMiY5t+IHcPGUK7TDMDzom08xa7e86eCeKOiLZezwCKVxJn6NEiiy2ekgX8aQssjIKg==",
"dependencies": { "dependencies": {
"@types/react": "*" "@types/react": "*"
} }
@@ -16422,9 +16422,9 @@
} }
}, },
"node_modules/typescript": { "node_modules/typescript": {
"version": "4.8.4", "version": "4.9.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.3.tgz",
"integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", "integrity": "sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==",
"bin": { "bin": {
"tsc": "bin/tsc", "tsc": "bin/tsc",
"tsserver": "bin/tsserver" "tsserver": "bin/tsserver"
@@ -19623,14 +19623,14 @@
"integrity": "sha512-h9u4u/jiIRKbq25PM+zymTyW6bhTzELvOoUd+AvYriWOAKpLGnIamaET3pnHYoI5iYphAHBI4ayx0MehR+VVPQ==" "integrity": "sha512-h9u4u/jiIRKbq25PM+zymTyW6bhTzELvOoUd+AvYriWOAKpLGnIamaET3pnHYoI5iYphAHBI4ayx0MehR+VVPQ=="
}, },
"@mui/base": { "@mui/base": {
"version": "5.0.0-alpha.105", "version": "5.0.0-alpha.106",
"resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-alpha.105.tgz", "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-alpha.106.tgz",
"integrity": "sha512-4IPBcJQIgVVXQvN6DQMoCHed52GBtwSqYs0jD0dDcMR3o76AodQtpEeWFz3p7mJoc6f/IHBl9U6jEfL1r/kM4g==", "integrity": "sha512-xJQQtwPCPwr6hGWTBdvDwHYwExn3Bw7nPQkN8Fuz8kHpZqoMVWQvvaFS557AIkkI2AFLV3DxVIMjbCvrIntBWg==",
"requires": { "requires": {
"@babel/runtime": "^7.19.0", "@babel/runtime": "^7.20.1",
"@emotion/is-prop-valid": "^1.2.0", "@emotion/is-prop-valid": "^1.2.0",
"@mui/types": "^7.2.0", "@mui/types": "^7.2.1",
"@mui/utils": "^5.10.9", "@mui/utils": "^5.10.14",
"@popperjs/core": "^2.11.6", "@popperjs/core": "^2.11.6",
"clsx": "^1.2.1", "clsx": "^1.2.1",
"prop-types": "^15.8.1", "prop-types": "^15.8.1",
@@ -19638,29 +19638,29 @@
} }
}, },
"@mui/core-downloads-tracker": { "@mui/core-downloads-tracker": {
"version": "5.10.13", "version": "5.10.14",
"resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.10.13.tgz", "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.10.14.tgz",
"integrity": "sha512-zWkWPV/SaNdsIdxAWiuVGZ+Ue3BkfSIlU/BFIrJmuUcwiIa7gQsbI/DOpj1KzLvqZhdEe2wC1aG4nCHfzgc1Hg==" "integrity": "sha512-qLgIJNOR9Dre8JiZ/neVzOf4jf88J6YtOkQqugtMrleLjbfRVUSS4LWl9CSOjNq76quYdmYWnSDgfQqOooT2cQ=="
}, },
"@mui/icons-material": { "@mui/icons-material": {
"version": "5.10.9", "version": "5.10.14",
"resolved": "https://registry.npmjs.org/@mui/icons-material/-/icons-material-5.10.9.tgz", "resolved": "https://registry.npmjs.org/@mui/icons-material/-/icons-material-5.10.14.tgz",
"integrity": "sha512-sqClXdEM39WKQJOQ0ZCPTptaZgqwibhj2EFV9N0v7BU1PO8y4OcX/a2wIQHn4fNuDjIZktJIBrmU23h7aqlGgg==", "integrity": "sha512-qtH60slQa+7MZRn6kyui8rKuoGDglPqaHX+pzBKNvd8JCOlrnfY5DmGGDdToTXyXl8xJ8nhANZbrbpg7UVKq/Q==",
"requires": { "requires": {
"@babel/runtime": "^7.19.0" "@babel/runtime": "^7.20.1"
} }
}, },
"@mui/material": { "@mui/material": {
"version": "5.10.13", "version": "5.10.14",
"resolved": "https://registry.npmjs.org/@mui/material/-/material-5.10.13.tgz", "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.10.14.tgz",
"integrity": "sha512-TkkT1rNc0/hhL4/+zv4gYcA6egNWBH/1Tz+azoTnQIUdZ32fgwFI2pFX2KVJNTt30xnLznxDWtTv7ilmJQ52xw==", "integrity": "sha512-HWzKVAykePMx54WtxVwZyL1W4k3xlHYIqwMw0CaXAvgB3UE9yjABZuuGr8vG5Z6CSNWamzd+s1x8u7pQPFl9og==",
"requires": { "requires": {
"@babel/runtime": "^7.19.0", "@babel/runtime": "^7.20.1",
"@mui/base": "5.0.0-alpha.105", "@mui/base": "5.0.0-alpha.106",
"@mui/core-downloads-tracker": "^5.10.13", "@mui/core-downloads-tracker": "^5.10.14",
"@mui/system": "^5.10.13", "@mui/system": "^5.10.14",
"@mui/types": "^7.2.0", "@mui/types": "^7.2.1",
"@mui/utils": "^5.10.9", "@mui/utils": "^5.10.14",
"@types/react-transition-group": "^4.4.5", "@types/react-transition-group": "^4.4.5",
"clsx": "^1.2.1", "clsx": "^1.2.1",
"csstype": "^3.1.1", "csstype": "^3.1.1",
@@ -19670,53 +19670,53 @@
} }
}, },
"@mui/private-theming": { "@mui/private-theming": {
"version": "5.10.9", "version": "5.10.14",
"resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.10.9.tgz", "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.10.14.tgz",
"integrity": "sha512-BN7/CnsVPVyBaQpDTij4uV2xGYHHHhOgpdxeYLlIu+TqnsVM7wUeF+37kXvHovxM6xmL5qoaVUD98gDC0IZnHg==", "integrity": "sha512-3aIBe8WK65CwAPDY8nB11hYnzE1CZMymi76UnaFrA/DdGDwl5Y8F6uB+StKrkVmsqF1po7Mp2odqVkHj320gXw==",
"requires": { "requires": {
"@babel/runtime": "^7.19.0", "@babel/runtime": "^7.20.1",
"@mui/utils": "^5.10.9", "@mui/utils": "^5.10.14",
"prop-types": "^15.8.1" "prop-types": "^15.8.1"
} }
}, },
"@mui/styled-engine": { "@mui/styled-engine": {
"version": "5.10.8", "version": "5.10.14",
"resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.10.8.tgz", "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.10.14.tgz",
"integrity": "sha512-w+y8WI18EJV6zM/q41ug19cE70JTeO6sWFsQ7tgePQFpy6ToCVPh0YLrtqxUZXSoMStW5FMw0t9fHTFAqPbngw==", "integrity": "sha512-bgKdM57ExogWpIfhL/ngSlzF4FhbH00vYF+Y5VALTob4uslFqje0xzoWmbfcCn4cZt2NXxZJIwhsq4vzo5itlw==",
"requires": { "requires": {
"@babel/runtime": "^7.19.0", "@babel/runtime": "^7.20.1",
"@emotion/cache": "^11.10.3", "@emotion/cache": "^11.10.5",
"csstype": "^3.1.1", "csstype": "^3.1.1",
"prop-types": "^15.8.1" "prop-types": "^15.8.1"
} }
}, },
"@mui/system": { "@mui/system": {
"version": "5.10.13", "version": "5.10.14",
"resolved": "https://registry.npmjs.org/@mui/system/-/system-5.10.13.tgz", "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.10.14.tgz",
"integrity": "sha512-Xzx26Asu5fVlm0ucm+gnJmeX4Y1isrpVDvqxX4yJaOT7Fzmd8Lfq9ih3QMfZajns5LMtUiOuCQlVFRtUG5IY7A==", "integrity": "sha512-2de7XCjRb1j8Od0Stmo0LwFMLpOMNT4wzfINuExXI1TVSuyxXIXUxiC5FEgJW3GMvf/a7SUR8VOiMoKlKWzukw==",
"requires": { "requires": {
"@babel/runtime": "^7.19.0", "@babel/runtime": "^7.20.1",
"@mui/private-theming": "^5.10.9", "@mui/private-theming": "^5.10.14",
"@mui/styled-engine": "^5.10.8", "@mui/styled-engine": "^5.10.14",
"@mui/types": "^7.2.0", "@mui/types": "^7.2.1",
"@mui/utils": "^5.10.9", "@mui/utils": "^5.10.14",
"clsx": "^1.2.1", "clsx": "^1.2.1",
"csstype": "^3.1.1", "csstype": "^3.1.1",
"prop-types": "^15.8.1" "prop-types": "^15.8.1"
} }
}, },
"@mui/types": { "@mui/types": {
"version": "7.2.0", "version": "7.2.1",
"resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.0.tgz", "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.1.tgz",
"integrity": "sha512-lGXtFKe5lp3UxTBGqKI1l7G8sE2xBik8qCfrLHD5olwP/YU0/ReWoWT7Lp1//ri32dK39oPMrJN8TgbkCSbsNA==", "integrity": "sha512-c5mSM7ivD8EsqK6HUi9hQPr5V7TJ/IRThUQ9nWNYPdhCGriTSQV4vL6DflT99LkM+wLiIS1rVjphpEWxERep7A==",
"requires": {} "requires": {}
}, },
"@mui/utils": { "@mui/utils": {
"version": "5.10.9", "version": "5.10.14",
"resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.10.9.tgz", "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.10.14.tgz",
"integrity": "sha512-2tdHWrq3+WCy+G6TIIaFx3cg7PorXZ71P375ExuX61od1NOAJP1mK90VxQ8N4aqnj2vmO3AQDkV4oV2Ktvt4bA==", "integrity": "sha512-12p59+wDZpA++XVJmKwqsZmrA1nmUQ5d0a1yQWtcDjxNyER1EDzozYN/db+FY2i5ceQh2TynPTEwGms2mXDwFg==",
"requires": { "requires": {
"@babel/runtime": "^7.19.0", "@babel/runtime": "^7.20.1",
"@types/prop-types": "^15.7.5", "@types/prop-types": "^15.7.5",
"@types/react-is": "^16.7.1 || ^17.0.0", "@types/react-is": "^16.7.1 || ^17.0.0",
"prop-types": "^15.8.1", "prop-types": "^15.8.1",
@@ -20203,9 +20203,9 @@
"integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==" "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ=="
}, },
"@types/lodash": { "@types/lodash": {
"version": "4.14.188", "version": "4.14.189",
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.188.tgz", "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.189.tgz",
"integrity": "sha512-zmEmF5OIM3rb7SbLCFYoQhO4dGt2FRM9AMkxvA3LaADOF1n8in/zGJlWji9fmafLoNyz+FoL6FE0SLtGIArD7w==" "integrity": "sha512-kb9/98N6X8gyME9Cf7YaqIMvYGnBSWqEci6tiettE6iJWH1XdJz/PO8LB0GtLCG7x8dU3KWhZT+lA1a35127tA=="
}, },
"@types/mime": { "@types/mime": {
"version": "3.0.1", "version": "3.0.1",
@@ -20258,9 +20258,9 @@
} }
}, },
"@types/react-dom": { "@types/react-dom": {
"version": "18.0.8", "version": "18.0.9",
"resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.0.8.tgz", "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.0.9.tgz",
"integrity": "sha512-C3GYO0HLaOkk9dDAz3Dl4sbe4AKUGTCfFIZsz3n/82dPNN8Du533HzKatDxeUYWu24wJgMP1xICqkWk1YOLOIw==", "integrity": "sha512-qnVvHxASt/H7i+XG1U1xMiY5t+IHcPGUK7TDMDzom08xa7e86eCeKOiLZezwCKVxJn6NEiiy2ekgX8aQssjIKg==",
"requires": { "requires": {
"@types/react": "*" "@types/react": "*"
} }
@@ -29085,9 +29085,9 @@
"requires": {} "requires": {}
}, },
"typescript": { "typescript": {
"version": "4.8.4", "version": "4.9.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.3.tgz",
"integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==" "integrity": "sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA=="
}, },
"unbox-primitive": { "unbox-primitive": {
"version": "1.0.2", "version": "1.0.2",

View File

@@ -100,32 +100,33 @@ DeviceValue::DeviceValue(uint8_t device_type,
#endif #endif
} }
// mapping of UOM, to match order in DeviceValueUOM enum emsdevice.h // mapping of UOM, to match order in DeviceValueUOM enum emsdevicevalue.h
// also maps to DeviceValueUOM in interface/src/project/types.ts for the Web UI // also maps to DeviceValueUOM in interface/src/project/types.ts for the Web UI
// must be an int of 4 bytes, 32bit aligned // must be an int of 4 bytes, 32bit aligned
const char * DeviceValue::DeviceValueUOM_s[] = { const char * DeviceValue::DeviceValueUOM_s[] = {
F_(uom_blank), F_(uom_blank), //
F_(uom_degrees), F_(uom_degrees), //
F_(uom_degrees), F_(uom_degrees), //
F_(uom_percent), F_(uom_percent), //
F_(uom_lmin), F_(uom_lmin), //
F_(uom_kwh), F_(uom_kwh), //
F_(uom_wh), F_(uom_wh), //
FL_(hours)[0], F_(uom_hours), //
FL_(minutes)[0], F_(uom_minutes), //
F_(uom_ua), F_(uom_ua), //
F_(uom_bar), F_(uom_bar), //
F_(uom_kw), F_(uom_kw), //
F_(uom_w), F_(uom_w), //
F_(uom_kb), F_(uom_kb), //
FL_(seconds)[0], F_(uom_seconds), //
F_(uom_dbm), F_(uom_dbm), //
F_(uom_fahrenheit), F_(uom_fahrenheit), //
F_(uom_mv), F_(uom_mv), //
F_(uom_sqm), F_(uom_sqm), //
F_(uom_m3), F_(uom_m3),
F_(uom_l) F_(uom_l),
F_(uom_blank) // connectivity
}; };

View File

@@ -44,7 +44,7 @@ class DeviceValue {
CMD // special for commands only CMD // special for commands only
}; };
// Unit Of Measurement mapping - maps to DeviceValueUOM_s in emsdevice.cpp. Sequence is important!! // Unit Of Measurement mapping - maps to DeviceValueUOM_s in emsdevicevalue.cpp. Sequence is important!!
// also used with HA as uom // also used with HA as uom
enum DeviceValueUOM : uint8_t { enum DeviceValueUOM : uint8_t {
NONE = 0, // 0 NONE = 0, // 0
@@ -67,7 +67,8 @@ class DeviceValue {
MV, // 17 MV, // 17
SQM, // 18 square meter SQM, // 18 square meter
M3, // 19 cubic meter M3, // 19 cubic meter
L // 20 L, // 20
CONNECTIVITY // 21 - used in HA
}; };
// TAG mapping - maps to DeviceValueTAG_s in emsdevice.cpp // TAG mapping - maps to DeviceValueTAG_s in emsdevice.cpp

View File

@@ -472,7 +472,7 @@ void Mqtt::start() {
} }
}); });
// create will_topic with the base prefixed. It has to be static because asyncmqttclient destroys the reference // create last will topic with the base prefixed. It has to be static because asyncmqttclient destroys the reference
static char will_topic[MQTT_TOPIC_MAX_SIZE]; static char will_topic[MQTT_TOPIC_MAX_SIZE];
snprintf(will_topic, MQTT_TOPIC_MAX_SIZE, "%s/status", mqtt_base_.c_str()); snprintf(will_topic, MQTT_TOPIC_MAX_SIZE, "%s/status", mqtt_base_.c_str());
mqttClient_->setWill(will_topic, 1, true, "offline"); // with qos 1, retain true mqttClient_->setWill(will_topic, 1, true, "offline"); // with qos 1, retain true
@@ -570,7 +570,8 @@ void Mqtt::on_connect() {
// re-subscribe to all custom registered MQTT topics // re-subscribe to all custom registered MQTT topics
resubscribe(); resubscribe();
publish_retain("status", "online", true); // say we're alive to the Last Will topic, with retain on // publish to the last will topic (see Mqtt::start() function) to say we're alive
publish_retain("status", "online", true); // with retain on
mqtt_publish_fails_ = 0; // reset fail count to 0 mqtt_publish_fails_ = 0; // reset fail count to 0
@@ -594,11 +595,13 @@ void Mqtt::ha_status() {
doc["~"] = mqtt_base_; // default ems-esp doc["~"] = mqtt_base_; // default ems-esp
// doc["avty_t"] = "~/status"; // commented out, as it causes errors in HA sometimes // doc["avty_t"] = "~/status"; // commented out, as it causes errors in HA sometimes
// doc["json_attr_t"] = "~/heartbeat"; // store also as HA attributes // doc["json_attr_t"] = "~/heartbeat"; // store also as HA attributes
doc["stat_t"] = "~/heartbeat"; doc["stat_t"] = "~/status";
doc["object_id"] = "ems_esp_status"; doc["object_id"] = "ems_esp_status";
doc["name"] = "EMS-ESP status"; doc["name"] = "EMS-ESP status";
doc["ic"] = F_(icondevice); doc["payload_on"] = "online";
doc["val_tpl"] = "{{value_json['bus_status']}}"; doc["payload_off"] = "offline";
doc["state_class"] = "measurement";
doc["device_class"] = "connectivity";
JsonObject dev = doc.createNestedObject("dev"); JsonObject dev = doc.createNestedObject("dev");
dev["name"] = "EMS-ESP"; dev["name"] = "EMS-ESP";
@@ -609,25 +612,27 @@ void Mqtt::ha_status() {
ids.add("ems-esp"); ids.add("ems-esp");
char topic[MQTT_TOPIC_MAX_SIZE]; char topic[MQTT_TOPIC_MAX_SIZE];
snprintf(topic, sizeof(topic), "sensor/%s/system/config", mqtt_basename_.c_str()); snprintf(topic, sizeof(topic), "binary_sensor/%s/system/config", mqtt_basename_.c_str());
Mqtt::publish_ha(topic, doc.as<JsonObject>()); // publish the config payload with retain flag Mqtt::publish_ha(topic, doc.as<JsonObject>()); // publish the config payload with retain flag
// create the sensors - must match the MQTT payload keys // create the sensors - must match the MQTT payload keys
// these are all from the heartbeat MQTT topic
if (!EMSESP::system_.ethernet_connected()) { if (!EMSESP::system_.ethernet_connected()) {
publish_system_ha_sensor_config(DeviceValueType::INT, ("WiFi RSSI"), ("rssi"), DeviceValueUOM::DBM); publish_system_ha_sensor_config(DeviceValueType::INT, "WiFi RSSI", "rssi", DeviceValueUOM::DBM);
publish_system_ha_sensor_config(DeviceValueType::INT, ("WiFi strength"), ("wifistrength"), DeviceValueUOM::PERCENT); publish_system_ha_sensor_config(DeviceValueType::INT, "WiFi strength", "wifistrength", DeviceValueUOM::PERCENT);
} }
publish_system_ha_sensor_config(DeviceValueType::INT, ("Uptime"), ("uptime"), DeviceValueUOM::NONE); publish_system_ha_sensor_config(DeviceValueType::STRING, "EMS Bus", "bus_status", DeviceValueUOM::NONE);
publish_system_ha_sensor_config(DeviceValueType::INT, ("Uptime (sec)"), ("uptime_sec"), DeviceValueUOM::SECONDS); publish_system_ha_sensor_config(DeviceValueType::INT, "Uptime", "uptime", DeviceValueUOM::NONE);
publish_system_ha_sensor_config(DeviceValueType::BOOL, ("NTP status"), ("ntp_status"), DeviceValueUOM::NONE); publish_system_ha_sensor_config(DeviceValueType::INT, "Uptime (sec)", "uptime_sec", DeviceValueUOM::SECONDS);
publish_system_ha_sensor_config(DeviceValueType::INT, ("Free memory"), ("freemem"), DeviceValueUOM::KB); publish_system_ha_sensor_config(DeviceValueType::BOOL, "NTP status", "ntp_status", DeviceValueUOM::CONNECTIVITY);
publish_system_ha_sensor_config(DeviceValueType::INT, ("MQTT fails"), ("mqttfails"), DeviceValueUOM::NONE); publish_system_ha_sensor_config(DeviceValueType::INT, "Free memory", "freemem", DeviceValueUOM::KB);
publish_system_ha_sensor_config(DeviceValueType::INT, ("Rx received"), ("rxreceived"), DeviceValueUOM::NONE); publish_system_ha_sensor_config(DeviceValueType::INT, "MQTT fails", "mqttfails", DeviceValueUOM::NONE);
publish_system_ha_sensor_config(DeviceValueType::INT, ("Rx fails"), ("rxfails"), DeviceValueUOM::NONE); publish_system_ha_sensor_config(DeviceValueType::INT, "Rx received", "rxreceived", DeviceValueUOM::NONE);
publish_system_ha_sensor_config(DeviceValueType::INT, ("Tx reads"), ("txreads"), DeviceValueUOM::NONE); publish_system_ha_sensor_config(DeviceValueType::INT, "Rx fails", "rxfails", DeviceValueUOM::NONE);
publish_system_ha_sensor_config(DeviceValueType::INT, ("Tx writes"), ("txwrites"), DeviceValueUOM::NONE); publish_system_ha_sensor_config(DeviceValueType::INT, "Tx reads", "txreads", DeviceValueUOM::NONE);
publish_system_ha_sensor_config(DeviceValueType::INT, ("Tx fails"), ("txfails"), DeviceValueUOM::NONE); publish_system_ha_sensor_config(DeviceValueType::INT, "Tx writes", "txwrites", DeviceValueUOM::NONE);
publish_system_ha_sensor_config(DeviceValueType::INT, "Tx fails", "txfails", DeviceValueUOM::NONE);
} }
// add sub or pub task to the queue. // add sub or pub task to the queue.
@@ -929,7 +934,7 @@ void Mqtt::publish_system_ha_sensor_config(uint8_t type, const char * name, cons
void Mqtt::publish_ha_sensor_config(uint8_t type, // EMSdevice::DeviceValueType void Mqtt::publish_ha_sensor_config(uint8_t type, // EMSdevice::DeviceValueType
uint8_t tag, // EMSdevice::DeviceValueTAG uint8_t tag, // EMSdevice::DeviceValueTAG
const char * const fullname, // fullname, already translated const char * const fullname, // fullname, already translated
const char * const en_name, const char * const en_name, // original name
const uint8_t device_type, // EMSdevice::DeviceType const uint8_t device_type, // EMSdevice::DeviceType
const char * const entity, // same as shortname const char * const entity, // same as shortname
const uint8_t uom, // EMSdevice::DeviceValueUOM (0=NONE) const uint8_t uom, // EMSdevice::DeviceValueUOM (0=NONE)
@@ -961,8 +966,7 @@ void Mqtt::publish_ha_sensor_config(uint8_t type, // EMSdevice
snprintf(uniq, sizeof(uniq), "%s_%s", device_name, new_entity); snprintf(uniq, sizeof(uniq), "%s_%s", device_name, new_entity);
Helpers::replace_char(uniq, '.', '_'); Helpers::replace_char(uniq, '.', '_');
// use_ha_sensor is true if we're using the Sensor Entity https://developers.home-assistant.io/docs/core/entity/sensor bool set_ha_classes = false; // set to true if we want to set the state class and device class
bool use_ha_sensor = false;
// create the topic, depending on the type and whether the device entity is writable (a command) // create the topic, depending on the type and whether the device entity is writable (a command)
// https://developers.home-assistant.io/docs/core/entity // https://developers.home-assistant.io/docs/core/entity
@@ -993,12 +997,13 @@ void Mqtt::publish_ha_sensor_config(uint8_t type, // EMSdevice
break; break;
} }
} else { } else {
// these are Read only sensors. We can set the device class and state class
set_ha_classes = true;
// plain old read only device entity // plain old read only device entity
if (type == DeviceValueType::BOOL) { if (type == DeviceValueType::BOOL) {
snprintf(topic, sizeof(topic), "binary_sensor/%s/%s/config", mqtt_basename_.c_str(), uniq); // binary sensor snprintf(topic, sizeof(topic), "binary_sensor/%s/%s/config", mqtt_basename_.c_str(), uniq); // binary sensor (for booleans)
} else { } else {
use_ha_sensor = true; snprintf(topic, sizeof(topic), "sensor/%s/%s/config", mqtt_basename_.c_str(), uniq); // normal HA sensor
snprintf(topic, sizeof(topic), "sensor/%s/%s/config", mqtt_basename_.c_str(), uniq); // normal HA sensor, not a boolean one
} }
} }
@@ -1123,12 +1128,9 @@ void Mqtt::publish_ha_sensor_config(uint8_t type, // EMSdevice
} }
} }
// this next section is building using the Sensor Entity // this next section is adding the state class, device class and sometimes the icon
// https://developers.home-assistant.io/docs/core/entity/sensor // used for Sensor and Binary Sensor Entities in HA
// for read only sensors. It uses a device class to determine icon if (set_ha_classes) {
// and state class
if (use_ha_sensor) {
const char * dc_ha = "device_class"; // device class const char * dc_ha = "device_class"; // device class
switch (uom) { switch (uom) {
@@ -1187,6 +1189,10 @@ void Mqtt::publish_ha_sensor_config(uint8_t type, // EMSdevice
doc[sc_ha] = F_(measurement); doc[sc_ha] = F_(measurement);
doc[dc_ha] = "signal_strength"; doc[dc_ha] = "signal_strength";
break; break;
case DeviceValueUOM::CONNECTIVITY:
doc[sc_ha] = F_(measurement);
doc[dc_ha] = "connectivity";
break;
case DeviceValueUOM::NONE: case DeviceValueUOM::NONE:
// for device entities which have numerical values, with no UOM // for device entities which have numerical values, with no UOM
if ((type != DeviceValueType::STRING) if ((type != DeviceValueType::STRING)

View File

@@ -1,4 +1,4 @@
#define EMSESP_APP_VERSION "3.5.0b9" #define EMSESP_APP_VERSION "3.5.0b10"
#if CONFIG_IDF_TARGET_ESP32C3 #if CONFIG_IDF_TARGET_ESP32C3
#define EMSESP_PLATFORM "ESP32-C3"; #define EMSESP_PLATFORM "ESP32-C3";

View File

@@ -110,10 +110,12 @@ WebLogService::QueuedLogMessage::QueuedLogMessage(unsigned long id, std::shared_
} }
void WebLogService::operator<<(std::shared_ptr<uuid::log::Message> message) { void WebLogService::operator<<(std::shared_ptr<uuid::log::Message> message) {
#ifndef EMSESP_STANDALONE
if (ESP.getMaxAllocHeap() < 20480) { if (ESP.getMaxAllocHeap() < 20480) {
maximum_log_messages(maximum_log_messages_ > 25 ? maximum_log_messages_ - 25 : 10); maximum_log_messages(maximum_log_messages_ > 25 ? maximum_log_messages_ - 25 : 10);
// EMSESP::logger().warning("Low memory: WebLog buffer reduced to %d entries", maximum_log_messages_); // EMSESP::logger().warning("Low memory: WebLog buffer reduced to %d entries", maximum_log_messages_);
} }
#endif
if (log_messages_.size() >= maximum_log_messages_) { if (log_messages_.size() >= maximum_log_messages_) {
log_messages_.pop_front(); log_messages_.pop_front();
} }