mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -38,6 +38,7 @@ stats.html
|
|||||||
!.yarn/versions
|
!.yarn/versions
|
||||||
yarn.lock
|
yarn.lock
|
||||||
interface/analyse.html
|
interface/analyse.html
|
||||||
|
interface/vite.config.ts.timestamp*
|
||||||
|
|
||||||
# scripts
|
# scripts
|
||||||
test.sh
|
test.sh
|
||||||
|
|||||||
@@ -41,3 +41,4 @@
|
|||||||
- small changes to the API for analog and temperature sensors
|
- small changes to the API for analog and temperature sensors
|
||||||
- Length of mqtt Broker adress [#1619](https://github.com/emsesp/EMS-ESP32/issues/1619)
|
- Length of mqtt Broker adress [#1619](https://github.com/emsesp/EMS-ESP32/issues/1619)
|
||||||
- C++ optimizations - see <https://github.com/emsesp/EMS-ESP32/pull/1615>
|
- C++ optimizations - see <https://github.com/emsesp/EMS-ESP32/pull/1615>
|
||||||
|
- Send MQTT heartbeat immediately after connection [#1628](https://github.com/emsesp/EMS-ESP32/issues/1628)
|
||||||
|
|||||||
@@ -31,8 +31,8 @@
|
|||||||
"@table-library/react-table-library": "4.1.7",
|
"@table-library/react-table-library": "4.1.7",
|
||||||
"@types/imagemin": "^8.0.5",
|
"@types/imagemin": "^8.0.5",
|
||||||
"@types/lodash-es": "^4.17.12",
|
"@types/lodash-es": "^4.17.12",
|
||||||
"@types/node": "^20.11.17",
|
"@types/node": "^20.11.20",
|
||||||
"@types/react": "^18.2.55",
|
"@types/react": "^18.2.57",
|
||||||
"@types/react-dom": "^18.2.19",
|
"@types/react-dom": "^18.2.19",
|
||||||
"@types/react-router-dom": "^5.3.3",
|
"@types/react-router-dom": "^5.3.3",
|
||||||
"alova": "^2.17.0",
|
"alova": "^2.17.0",
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
"react-dom": "latest",
|
"react-dom": "latest",
|
||||||
"react-dropzone": "^14.2.3",
|
"react-dropzone": "^14.2.3",
|
||||||
"react-icons": "^5.0.1",
|
"react-icons": "^5.0.1",
|
||||||
"react-router-dom": "^6.22.0",
|
"react-router-dom": "^6.22.1",
|
||||||
"react-toastify": "^10.0.4",
|
"react-toastify": "^10.0.4",
|
||||||
"sockette": "^2.0.6",
|
"sockette": "^2.0.6",
|
||||||
"typesafe-i18n": "^5.26.2",
|
"typesafe-i18n": "^5.26.2",
|
||||||
@@ -54,8 +54,8 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@preact/compat": "^17.1.2",
|
"@preact/compat": "^17.1.2",
|
||||||
"@preact/preset-vite": "^2.8.1",
|
"@preact/preset-vite": "^2.8.1",
|
||||||
"@typescript-eslint/eslint-plugin": "^7.0.1",
|
"@typescript-eslint/eslint-plugin": "^7.0.2",
|
||||||
"@typescript-eslint/parser": "^7.0.1",
|
"@typescript-eslint/parser": "^7.0.2",
|
||||||
"concurrently": "^8.2.2",
|
"concurrently": "^8.2.2",
|
||||||
"eslint": "^8.56.0",
|
"eslint": "^8.56.0",
|
||||||
"eslint-config-prettier": "^9.1.0",
|
"eslint-config-prettier": "^9.1.0",
|
||||||
@@ -66,11 +66,11 @@
|
|||||||
"eslint-plugin-prettier": "alpha",
|
"eslint-plugin-prettier": "alpha",
|
||||||
"eslint-plugin-react": "^7.33.2",
|
"eslint-plugin-react": "^7.33.2",
|
||||||
"eslint-plugin-react-hooks": "^4.6.0",
|
"eslint-plugin-react-hooks": "^4.6.0",
|
||||||
"preact": "^10.19.4",
|
"preact": "^10.19.6",
|
||||||
"prettier": "^3.2.5",
|
"prettier": "^3.2.5",
|
||||||
"rollup-plugin-visualizer": "^5.12.0",
|
"rollup-plugin-visualizer": "^5.12.0",
|
||||||
"terser": "^5.27.0",
|
"terser": "^5.27.2",
|
||||||
"vite": "^5.1.1",
|
"vite": "^5.1.4",
|
||||||
"vite-plugin-imagemin": "^0.6.1",
|
"vite-plugin-imagemin": "^0.6.1",
|
||||||
"vite-tsconfig-paths": "^4.3.1"
|
"vite-tsconfig-paths": "^4.3.1"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1299,10 +1299,10 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@remix-run/router@npm:1.15.0":
|
"@remix-run/router@npm:1.15.1":
|
||||||
version: 1.15.0
|
version: 1.15.1
|
||||||
resolution: "@remix-run/router@npm:1.15.0"
|
resolution: "@remix-run/router@npm:1.15.1"
|
||||||
checksum: 10/5cadae0c90874966ebd6b1b202284a337da32a68fc95af502859cd6158d3c254fbb4f76fa1844c837205dbc8a8120223360b9287a3d6aa0c747d02767c4c072c
|
checksum: 10/d262285d155f80779894ee1d9ef07e35421986ba2546378dfe0e3b09397ce71becb6a4677e9efcd4155e2bd3f9f7f7ecbc110cd99bacee6dd7d3e5ce51b7caa8
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@@ -1590,12 +1590,12 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@types/node@npm:^20.11.17":
|
"@types/node@npm:^20.11.20":
|
||||||
version: 20.11.17
|
version: 20.11.20
|
||||||
resolution: "@types/node@npm:20.11.17"
|
resolution: "@types/node@npm:20.11.20"
|
||||||
dependencies:
|
dependencies:
|
||||||
undici-types: "npm:~5.26.4"
|
undici-types: "npm:~5.26.4"
|
||||||
checksum: 10/3342df87258d1c56154bcd4b85180f48675427b235971e6e6e2e037353f5a2ae9aaa05ba5df0fe1e2d2f1022c8d856fd39056b9d7f50ea30c0ca3214137cae1d
|
checksum: 10/ff449bdc94810dadb54e0f77dd587c6505ef79ffa5a208c16eb29b223365b188f4c935a3abaf0906a01d05257c3da1f72465594a841d35bcf7b6deac7a6938fb
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@@ -1670,14 +1670,14 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@types/react@npm:^18.2.55":
|
"@types/react@npm:^18.2.57":
|
||||||
version: 18.2.55
|
version: 18.2.57
|
||||||
resolution: "@types/react@npm:18.2.55"
|
resolution: "@types/react@npm:18.2.57"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/prop-types": "npm:*"
|
"@types/prop-types": "npm:*"
|
||||||
"@types/scheduler": "npm:*"
|
"@types/scheduler": "npm:*"
|
||||||
csstype: "npm:^3.0.2"
|
csstype: "npm:^3.0.2"
|
||||||
checksum: 10/bf8fe19e73575489e63c0726355f164157cd69e75f2a862436ad2c0586e732cb953a7255a6bc73145e8f9506ee7a723f9a569ca9a39c53984e5b12b84e1c718a
|
checksum: 10/beee45a8ee48862fb5101f6ebdd89ccc20c5a6df29dcd2315560bc3b57ea3af8d09a8e9bb1c58063a70f9010e0d2c7bd300819438e2ca62810285c3d7275ab5a
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@@ -1713,15 +1713,15 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@typescript-eslint/eslint-plugin@npm:^7.0.1":
|
"@typescript-eslint/eslint-plugin@npm:^7.0.2":
|
||||||
version: 7.0.1
|
version: 7.0.2
|
||||||
resolution: "@typescript-eslint/eslint-plugin@npm:7.0.1"
|
resolution: "@typescript-eslint/eslint-plugin@npm:7.0.2"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@eslint-community/regexpp": "npm:^4.5.1"
|
"@eslint-community/regexpp": "npm:^4.5.1"
|
||||||
"@typescript-eslint/scope-manager": "npm:7.0.1"
|
"@typescript-eslint/scope-manager": "npm:7.0.2"
|
||||||
"@typescript-eslint/type-utils": "npm:7.0.1"
|
"@typescript-eslint/type-utils": "npm:7.0.2"
|
||||||
"@typescript-eslint/utils": "npm:7.0.1"
|
"@typescript-eslint/utils": "npm:7.0.2"
|
||||||
"@typescript-eslint/visitor-keys": "npm:7.0.1"
|
"@typescript-eslint/visitor-keys": "npm:7.0.2"
|
||||||
debug: "npm:^4.3.4"
|
debug: "npm:^4.3.4"
|
||||||
graphemer: "npm:^1.4.0"
|
graphemer: "npm:^1.4.0"
|
||||||
ignore: "npm:^5.2.4"
|
ignore: "npm:^5.2.4"
|
||||||
@@ -1734,44 +1734,44 @@ __metadata:
|
|||||||
peerDependenciesMeta:
|
peerDependenciesMeta:
|
||||||
typescript:
|
typescript:
|
||||||
optional: true
|
optional: true
|
||||||
checksum: 10/0862e8ec8677fcea794394fc9eab8dba11043c08452722790e0d296d4ee84713180676e1e3135be4203ace7bb73933c94159255cb9190c7bc13bf7f03a361915
|
checksum: 10/430b2f7ca36ee73dc75c1d677088709f3c9d5bbb4fffa3cfbe1b7d63979ee397f7a4a2a1386e05a04991500fa0ab0dd5272e8603a2b20f42e4bf590603500858
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@typescript-eslint/parser@npm:^7.0.1":
|
"@typescript-eslint/parser@npm:^7.0.2":
|
||||||
version: 7.0.1
|
version: 7.0.2
|
||||||
resolution: "@typescript-eslint/parser@npm:7.0.1"
|
resolution: "@typescript-eslint/parser@npm:7.0.2"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@typescript-eslint/scope-manager": "npm:7.0.1"
|
"@typescript-eslint/scope-manager": "npm:7.0.2"
|
||||||
"@typescript-eslint/types": "npm:7.0.1"
|
"@typescript-eslint/types": "npm:7.0.2"
|
||||||
"@typescript-eslint/typescript-estree": "npm:7.0.1"
|
"@typescript-eslint/typescript-estree": "npm:7.0.2"
|
||||||
"@typescript-eslint/visitor-keys": "npm:7.0.1"
|
"@typescript-eslint/visitor-keys": "npm:7.0.2"
|
||||||
debug: "npm:^4.3.4"
|
debug: "npm:^4.3.4"
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
eslint: ^8.56.0
|
eslint: ^8.56.0
|
||||||
peerDependenciesMeta:
|
peerDependenciesMeta:
|
||||||
typescript:
|
typescript:
|
||||||
optional: true
|
optional: true
|
||||||
checksum: 10/b4ba1743ab730268a1924139f072e4a0a56959526fb6377e1b3964518b6c6851733ae446a44d29fed1cb96669e2913cca524895ce77a6205aaed8bda00e8cd5d
|
checksum: 10/18d6e1bda64013f7d66164164c57a10390f7979db55b265062ae9337e11e0921bffca10870e252cd0bd198f79ffa2e87a652e57110e5b1b4cc738453154c205c
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@typescript-eslint/scope-manager@npm:7.0.1":
|
"@typescript-eslint/scope-manager@npm:7.0.2":
|
||||||
version: 7.0.1
|
version: 7.0.2
|
||||||
resolution: "@typescript-eslint/scope-manager@npm:7.0.1"
|
resolution: "@typescript-eslint/scope-manager@npm:7.0.2"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@typescript-eslint/types": "npm:7.0.1"
|
"@typescript-eslint/types": "npm:7.0.2"
|
||||||
"@typescript-eslint/visitor-keys": "npm:7.0.1"
|
"@typescript-eslint/visitor-keys": "npm:7.0.2"
|
||||||
checksum: 10/dade6055bb853adb54de795cc3da5ab8550236d4186f108573fdb02e636ab7fc4300a55b506698ced4087ca43b143a5593931cb3195ab4790470b456d9ff8846
|
checksum: 10/773ea6e61f741777e69a469641f3db0d3c2301c0102667825fb235ed5a65c95f6d6b31b19e734b9a215acc0c7c576c65497635b8d5928eeddb58653ceb13d2d5
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@typescript-eslint/type-utils@npm:7.0.1":
|
"@typescript-eslint/type-utils@npm:7.0.2":
|
||||||
version: 7.0.1
|
version: 7.0.2
|
||||||
resolution: "@typescript-eslint/type-utils@npm:7.0.1"
|
resolution: "@typescript-eslint/type-utils@npm:7.0.2"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@typescript-eslint/typescript-estree": "npm:7.0.1"
|
"@typescript-eslint/typescript-estree": "npm:7.0.2"
|
||||||
"@typescript-eslint/utils": "npm:7.0.1"
|
"@typescript-eslint/utils": "npm:7.0.2"
|
||||||
debug: "npm:^4.3.4"
|
debug: "npm:^4.3.4"
|
||||||
ts-api-utils: "npm:^1.0.1"
|
ts-api-utils: "npm:^1.0.1"
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@@ -1779,23 +1779,23 @@ __metadata:
|
|||||||
peerDependenciesMeta:
|
peerDependenciesMeta:
|
||||||
typescript:
|
typescript:
|
||||||
optional: true
|
optional: true
|
||||||
checksum: 10/cf20a3c0e56121ac62467e48121e135798db6d2999bd4f96ed44edc39f2597812d12b1bd6a378adec54d6c5e7db75fa5f98a27ce399792a2c8a5bbd3649952f7
|
checksum: 10/63bf19c9f5bbcb0f3e127f509d85dc49be4e5e51781d78f58c96786089e7c909b25d35d0248a6a758e2f7d5b5223d2262c2d597ab71f226af6beb499ae950645
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@typescript-eslint/types@npm:7.0.1":
|
"@typescript-eslint/types@npm:7.0.2":
|
||||||
version: 7.0.1
|
version: 7.0.2
|
||||||
resolution: "@typescript-eslint/types@npm:7.0.1"
|
resolution: "@typescript-eslint/types@npm:7.0.2"
|
||||||
checksum: 10/c08b2d34bab2a877a45a1e4c2923f50d03022b682b7aaba929ae2a9a5ad32db0e46265544a6616ccb98654b434250621be0e282fc5b21b8ccaf6b78741d68f67
|
checksum: 10/2cba8a0355cc7357db142fa597d02cf39e1d1cb0ec87c80e91daaa2b87f2a794d2649def9d7b2aa435691c3810d2cbd4cdc21668b19b991863f0d54d4a22da82
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@typescript-eslint/typescript-estree@npm:7.0.1":
|
"@typescript-eslint/typescript-estree@npm:7.0.2":
|
||||||
version: 7.0.1
|
version: 7.0.2
|
||||||
resolution: "@typescript-eslint/typescript-estree@npm:7.0.1"
|
resolution: "@typescript-eslint/typescript-estree@npm:7.0.2"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@typescript-eslint/types": "npm:7.0.1"
|
"@typescript-eslint/types": "npm:7.0.2"
|
||||||
"@typescript-eslint/visitor-keys": "npm:7.0.1"
|
"@typescript-eslint/visitor-keys": "npm:7.0.2"
|
||||||
debug: "npm:^4.3.4"
|
debug: "npm:^4.3.4"
|
||||||
globby: "npm:^11.1.0"
|
globby: "npm:^11.1.0"
|
||||||
is-glob: "npm:^4.0.3"
|
is-glob: "npm:^4.0.3"
|
||||||
@@ -1805,34 +1805,34 @@ __metadata:
|
|||||||
peerDependenciesMeta:
|
peerDependenciesMeta:
|
||||||
typescript:
|
typescript:
|
||||||
optional: true
|
optional: true
|
||||||
checksum: 10/b0b0adc84502d1ffcf3a0024179e0f2780be5f8b0a18328db46d430efc4e38a7965656b4392dd47d6176bbb1ee200aec6dd8581c39b606e260750574358cde9f
|
checksum: 10/307080e29c22fc69f0ce7ab7101e1629e05f45a9e541c250e03d06b61336ab0ccb5f0a7354ee3da4e38d5cade4dd2fb7bb396cd7cbe74c2c4b3e29706a70abcc
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@typescript-eslint/utils@npm:7.0.1":
|
"@typescript-eslint/utils@npm:7.0.2":
|
||||||
version: 7.0.1
|
version: 7.0.2
|
||||||
resolution: "@typescript-eslint/utils@npm:7.0.1"
|
resolution: "@typescript-eslint/utils@npm:7.0.2"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@eslint-community/eslint-utils": "npm:^4.4.0"
|
"@eslint-community/eslint-utils": "npm:^4.4.0"
|
||||||
"@types/json-schema": "npm:^7.0.12"
|
"@types/json-schema": "npm:^7.0.12"
|
||||||
"@types/semver": "npm:^7.5.0"
|
"@types/semver": "npm:^7.5.0"
|
||||||
"@typescript-eslint/scope-manager": "npm:7.0.1"
|
"@typescript-eslint/scope-manager": "npm:7.0.2"
|
||||||
"@typescript-eslint/types": "npm:7.0.1"
|
"@typescript-eslint/types": "npm:7.0.2"
|
||||||
"@typescript-eslint/typescript-estree": "npm:7.0.1"
|
"@typescript-eslint/typescript-estree": "npm:7.0.2"
|
||||||
semver: "npm:^7.5.4"
|
semver: "npm:^7.5.4"
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
eslint: ^8.56.0
|
eslint: ^8.56.0
|
||||||
checksum: 10/b7e0cb2994f73b3f416684dc175d4e1da5f8306d6c81abbad2f219fa3e4f29154063a3c9568e4a1f879a38b79c62250e596e4ed7265f7bd1ed9b3db806cb92b7
|
checksum: 10/e68bac777419cd529371f7f29f534efaeca130c90ed9723bfc7aac451d61ca3fc4ebd310e2c015e29e8dc7be4734ae46258ca8755897d7f5e3bb502660d5372f
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@typescript-eslint/visitor-keys@npm:7.0.1":
|
"@typescript-eslint/visitor-keys@npm:7.0.2":
|
||||||
version: 7.0.1
|
version: 7.0.2
|
||||||
resolution: "@typescript-eslint/visitor-keys@npm:7.0.1"
|
resolution: "@typescript-eslint/visitor-keys@npm:7.0.2"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@typescript-eslint/types": "npm:7.0.1"
|
"@typescript-eslint/types": "npm:7.0.2"
|
||||||
eslint-visitor-keys: "npm:^3.4.1"
|
eslint-visitor-keys: "npm:^3.4.1"
|
||||||
checksum: 10/915c5b19302a4c76e843cd2d04a9a2b11907e658d7018c8b55c338b090d9115d3719809aa05b8af130cc1b216c77626d210c20f705b732e83d04ceae0c112f6b
|
checksum: 10/da6c1b0729af99216cde3a65d4e91584a81fc6c9dff7ba291089f01bf7262de375f58c4c4246e5fbc29f51258db7725d9c830f82ccbd1cda812fd13c51480cda
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@@ -1858,12 +1858,12 @@ __metadata:
|
|||||||
"@table-library/react-table-library": "npm:4.1.7"
|
"@table-library/react-table-library": "npm:4.1.7"
|
||||||
"@types/imagemin": "npm:^8.0.5"
|
"@types/imagemin": "npm:^8.0.5"
|
||||||
"@types/lodash-es": "npm:^4.17.12"
|
"@types/lodash-es": "npm:^4.17.12"
|
||||||
"@types/node": "npm:^20.11.17"
|
"@types/node": "npm:^20.11.20"
|
||||||
"@types/react": "npm:^18.2.55"
|
"@types/react": "npm:^18.2.57"
|
||||||
"@types/react-dom": "npm:^18.2.19"
|
"@types/react-dom": "npm:^18.2.19"
|
||||||
"@types/react-router-dom": "npm:^5.3.3"
|
"@types/react-router-dom": "npm:^5.3.3"
|
||||||
"@typescript-eslint/eslint-plugin": "npm:^7.0.1"
|
"@typescript-eslint/eslint-plugin": "npm:^7.0.2"
|
||||||
"@typescript-eslint/parser": "npm:^7.0.1"
|
"@typescript-eslint/parser": "npm:^7.0.2"
|
||||||
alova: "npm:^2.17.0"
|
alova: "npm:^2.17.0"
|
||||||
async-validator: "npm:^4.2.5"
|
async-validator: "npm:^4.2.5"
|
||||||
concurrently: "npm:^8.2.2"
|
concurrently: "npm:^8.2.2"
|
||||||
@@ -1880,20 +1880,20 @@ __metadata:
|
|||||||
jwt-decode: "npm:^4.0.0"
|
jwt-decode: "npm:^4.0.0"
|
||||||
lodash-es: "npm:^4.17.21"
|
lodash-es: "npm:^4.17.21"
|
||||||
mime-types: "npm:^2.1.35"
|
mime-types: "npm:^2.1.35"
|
||||||
preact: "npm:^10.19.4"
|
preact: "npm:^10.19.6"
|
||||||
prettier: "npm:^3.2.5"
|
prettier: "npm:^3.2.5"
|
||||||
react: "npm:latest"
|
react: "npm:latest"
|
||||||
react-dom: "npm:latest"
|
react-dom: "npm:latest"
|
||||||
react-dropzone: "npm:^14.2.3"
|
react-dropzone: "npm:^14.2.3"
|
||||||
react-icons: "npm:^5.0.1"
|
react-icons: "npm:^5.0.1"
|
||||||
react-router-dom: "npm:^6.22.0"
|
react-router-dom: "npm:^6.22.1"
|
||||||
react-toastify: "npm:^10.0.4"
|
react-toastify: "npm:^10.0.4"
|
||||||
rollup-plugin-visualizer: "npm:^5.12.0"
|
rollup-plugin-visualizer: "npm:^5.12.0"
|
||||||
sockette: "npm:^2.0.6"
|
sockette: "npm:^2.0.6"
|
||||||
terser: "npm:^5.27.0"
|
terser: "npm:^5.27.2"
|
||||||
typesafe-i18n: "npm:^5.26.2"
|
typesafe-i18n: "npm:^5.26.2"
|
||||||
typescript: "npm:^5.3.3"
|
typescript: "npm:^5.3.3"
|
||||||
vite: "npm:^5.1.1"
|
vite: "npm:^5.1.4"
|
||||||
vite-plugin-imagemin: "npm:^0.6.1"
|
vite-plugin-imagemin: "npm:^0.6.1"
|
||||||
vite-tsconfig-paths: "npm:^4.3.1"
|
vite-tsconfig-paths: "npm:^4.3.1"
|
||||||
languageName: unknown
|
languageName: unknown
|
||||||
@@ -7021,10 +7021,10 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"preact@npm:^10.19.4":
|
"preact@npm:^10.19.6":
|
||||||
version: 10.19.4
|
version: 10.19.6
|
||||||
resolution: "preact@npm:10.19.4"
|
resolution: "preact@npm:10.19.6"
|
||||||
checksum: 10/e79051c08d61c6723a4535606c9136ea752f8bae984ae8056039e2a56f6d58d6200aa941850478dc822dca38c16469d23368e9f75d7a7e57f9ca4df70a305d0f
|
checksum: 10/851c7d91e6899a40fdeae0ef9a792bf3217ed8365ce96f4c5630048c82b44c637fd4c0d8a4b0c3e1c8e74e243600dd9c5787520da07552d33a06c957779b4167
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@@ -7192,27 +7192,27 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"react-router-dom@npm:^6.22.0":
|
"react-router-dom@npm:^6.22.1":
|
||||||
version: 6.22.0
|
version: 6.22.1
|
||||||
resolution: "react-router-dom@npm:6.22.0"
|
resolution: "react-router-dom@npm:6.22.1"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@remix-run/router": "npm:1.15.0"
|
"@remix-run/router": "npm:1.15.1"
|
||||||
react-router: "npm:6.22.0"
|
react-router: "npm:6.22.1"
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
react: ">=16.8"
|
react: ">=16.8"
|
||||||
react-dom: ">=16.8"
|
react-dom: ">=16.8"
|
||||||
checksum: 10/32ba0386d400354094116fa7dd98f1d23bc7cf683b0f4509694be5f730d4957fcb8cc73e35946576fc3f48b4d36743422f1b9bcdc37ad77f04bde0bde5d9102e
|
checksum: 10/73ab964083bb407773a5c4ca61249ed6b0a1b47fa58c39afca08a361eb25b349be2bcbaf6d89e112b020f6e55e40e62689c9fe2beae524030ce5ccede3c7d9e3
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"react-router@npm:6.22.0":
|
"react-router@npm:6.22.1":
|
||||||
version: 6.22.0
|
version: 6.22.1
|
||||||
resolution: "react-router@npm:6.22.0"
|
resolution: "react-router@npm:6.22.1"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@remix-run/router": "npm:1.15.0"
|
"@remix-run/router": "npm:1.15.1"
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
react: ">=16.8"
|
react: ">=16.8"
|
||||||
checksum: 10/627c25533667da0c8008587208e0d5633409173969fd579de706cde355465f6d1245e2b1a7ca2adeb96201f2858932b59ce3402482786cd20c4bf278562976dd
|
checksum: 10/f6e814b8e3005f16a5fb0e831f0e4352076cde65ab25448d56dba87a43fd3e102f55f9b366bdf1fbd8136fc1dc141bcec8d6b85d45f309e89180fb50f173744d
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@@ -8312,9 +8312,9 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"terser@npm:^5.27.0":
|
"terser@npm:^5.27.2":
|
||||||
version: 5.27.0
|
version: 5.27.2
|
||||||
resolution: "terser@npm:5.27.0"
|
resolution: "terser@npm:5.27.2"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@jridgewell/source-map": "npm:^0.3.3"
|
"@jridgewell/source-map": "npm:^0.3.3"
|
||||||
acorn: "npm:^8.8.2"
|
acorn: "npm:^8.8.2"
|
||||||
@@ -8322,7 +8322,7 @@ __metadata:
|
|||||||
source-map-support: "npm:~0.5.20"
|
source-map-support: "npm:~0.5.20"
|
||||||
bin:
|
bin:
|
||||||
terser: bin/terser
|
terser: bin/terser
|
||||||
checksum: 10/9b2c5cb00747dea5994034ca064fb3cc7efc1be6b79a35247662d51ab43bdbe9cbf002bbf29170b5f3bd068c811d0212e22d94acd2cf0d8562687b96f1bffc9f
|
checksum: 10/589f1112d6cd7653f6e2d4a38970e97a160de01cddb214dc924aa330c22b8c3635067a47db1233e060e613e380b979ca336c3211b17507ea13b0adff10ecbd40
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@@ -8738,9 +8738,9 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"vite@npm:^5.1.1":
|
"vite@npm:^5.1.4":
|
||||||
version: 5.1.1
|
version: 5.1.4
|
||||||
resolution: "vite@npm:5.1.1"
|
resolution: "vite@npm:5.1.4"
|
||||||
dependencies:
|
dependencies:
|
||||||
esbuild: "npm:^0.19.3"
|
esbuild: "npm:^0.19.3"
|
||||||
fsevents: "npm:~2.3.3"
|
fsevents: "npm:~2.3.3"
|
||||||
@@ -8774,7 +8774,7 @@ __metadata:
|
|||||||
optional: true
|
optional: true
|
||||||
bin:
|
bin:
|
||||||
vite: bin/vite.js
|
vite: bin/vite.js
|
||||||
checksum: 10/bdb8e683caddaa0a9adcbf40144ca8ea3660836b208862b07d43787ea867845919af16e58745365bd13ed3b7f66bbf9788a6869ee22cfaacac01645b59729c34
|
checksum: 10/e9003b853f0784260f4fe7ce0190124b347fd8fd6bf889a07080facd0d9a9667eaff4022eddb1ba3f0283ef69d15d77f84bca832082e48874a7a62e7f6d66b08
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
; override any settings with your own local ones in pio_local.ini
|
; override any settings with your own local ones in pio_local.ini
|
||||||
|
|
||||||
[platformio]
|
[platformio]
|
||||||
; default_envs = esp32_4M
|
default_envs = esp32_4M
|
||||||
default_envs = lolin_s3
|
; default_envs = lolin_s3
|
||||||
; default_envs = esp32_16M
|
; default_envs = esp32_16M
|
||||||
; default_envs = standalone
|
; default_envs = standalone
|
||||||
|
|
||||||
@@ -48,12 +48,11 @@ extra_scripts =
|
|||||||
scripts/rename_fw.py
|
scripts/rename_fw.py
|
||||||
|
|
||||||
[espressi32_base_tasmota]
|
[espressi32_base_tasmota]
|
||||||
; use Tasmota's library which removes some libs (like mbedtsl) and increases available heap
|
; use Tasmota's library which removes some unused libs (like mbedtsl, so no WiFi_secure.h) and increases available heap
|
||||||
; platform = https://github.com/tasmota/platform-espressif32.git ; latest development
|
; Tasmota Arduino Core 2.0.14 with IPv6 support, based on IDF 4.4.6
|
||||||
; latest release with WiFi_secure.h, Arduino 2.0.14
|
platform = https://github.com/tasmota/platform-espressif32/releases/download/2024.01.01/platform-espressif32.zip
|
||||||
platform = https://github.com/tasmota/platform-espressif32/releases/download/2024.01.00/platform-espressif32.zip
|
; Tasmota Arduino Core 3.0.0-alpha based on IDF v5.1.2
|
||||||
; latest Arduino 3.0/IDF 5.1.(alpha 3):
|
; platform = https://github.com/tasmota/platform-espressif32/releases/download/2024.02.10/platform-espressif32.zip
|
||||||
; platform = https://github.com/tasmota/platform-espressif32/releases/download/2023.12.10/platform-espressif32.zip
|
|
||||||
framework = arduino
|
framework = arduino
|
||||||
board_build.filesystem = littlefs
|
board_build.filesystem = littlefs
|
||||||
build_flags =
|
build_flags =
|
||||||
|
|||||||
@@ -1561,7 +1561,7 @@ void EMSdevice::publish_all_values() {
|
|||||||
|
|
||||||
// For each value in the device create the json object pair and add it to given json
|
// For each value in the device create the json object pair and add it to given json
|
||||||
// return false if empty
|
// return false if empty
|
||||||
// this is used to create the MQTT payloads, Console messages and Web API calls
|
// this is used to create the MQTT payloads, Console messages and Web API call responses
|
||||||
bool EMSdevice::generate_values(JsonObject output, const uint8_t tag_filter, const bool nested, const uint8_t output_target) {
|
bool EMSdevice::generate_values(JsonObject output, const uint8_t tag_filter, const bool nested, const uint8_t output_target) {
|
||||||
bool has_values = false; // to see if we've added a value. it's faster than doing a json.size() at the end
|
bool has_values = false; // to see if we've added a value. it's faster than doing a json.size() at the end
|
||||||
uint8_t old_tag = 255; // NAN
|
uint8_t old_tag = 255; // NAN
|
||||||
@@ -1697,8 +1697,8 @@ bool EMSdevice::generate_values(JsonObject output, const uint8_t tag_filter, con
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// commenting out - we don't want Commands in MQTT or Console
|
// commenting out as we don't want Commands in Console ('show values')
|
||||||
// else if (dv.type == DeviceValueType::CMD && output_target != EMSdevice::OUTPUT_TARGET::MQTT) {
|
// else if (dv.type == DeviceValueType::CMD && output_target != EMSdevice::OUTPUT_TARGET::MQTT) {
|
||||||
// json[name] = "";
|
// json[name] = "";
|
||||||
// }
|
// }
|
||||||
|
|
||||||
@@ -1748,7 +1748,7 @@ void EMSdevice::mqtt_ha_entity_config_create() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!dv.has_state(DeviceValueState::DV_HA_CONFIG_CREATED) && (dv.type != DeviceValueType::CMD) && dv.has_state(DeviceValueState::DV_ACTIVE)
|
if (!dv.has_state(DeviceValueState::DV_HA_CONFIG_CREATED) && dv.has_state(DeviceValueState::DV_ACTIVE)
|
||||||
&& !dv.has_state(DeviceValueState::DV_API_MQTT_EXCLUDE)) {
|
&& !dv.has_state(DeviceValueState::DV_API_MQTT_EXCLUDE)) {
|
||||||
// create_device_config is only done once for the EMS device. It can added to any entity, so we take the first
|
// create_device_config is only done once for the EMS device. It can added to any entity, so we take the first
|
||||||
if (Mqtt::publish_ha_sensor_config(dv, name(), brand_to_char(), false, create_device_config)) {
|
if (Mqtt::publish_ha_sensor_config(dv, name(), brand_to_char(), false, create_device_config)) {
|
||||||
|
|||||||
84
src/mqtt.cpp
84
src/mqtt.cpp
@@ -508,7 +508,7 @@ void Mqtt::on_connect() {
|
|||||||
resubscribe();
|
resubscribe();
|
||||||
|
|
||||||
// publish to the last will topic (see Mqtt::start() function) to say we're alive
|
// publish to the last will topic (see Mqtt::start() function) to say we're alive
|
||||||
queue_publish_retain("status", "online", true); // with retain on
|
queue_publish_retain("status", "online", false); // with retain off
|
||||||
|
|
||||||
// mqtt_publish_fails_ = 0; // reset fail count to 0
|
// mqtt_publish_fails_ = 0; // reset fail count to 0
|
||||||
}
|
}
|
||||||
@@ -878,6 +878,7 @@ bool Mqtt::publish_ha_sensor_config(uint8_t type, // EMSdev
|
|||||||
readonly_sensors = false;
|
readonly_sensors = false;
|
||||||
break;
|
break;
|
||||||
case DeviceValueType::ENUM:
|
case DeviceValueType::ENUM:
|
||||||
|
case DeviceValueType::CMD: // hardcoded commands are always ENUMS
|
||||||
// select - https://www.home-assistant.io/integrations/select.mqtt
|
// select - https://www.home-assistant.io/integrations/select.mqtt
|
||||||
snprintf(topic, sizeof(topic), "select/%s", config_topic);
|
snprintf(topic, sizeof(topic), "select/%s", config_topic);
|
||||||
readonly_sensors = false;
|
readonly_sensors = false;
|
||||||
@@ -927,8 +928,8 @@ bool Mqtt::publish_ha_sensor_config(uint8_t type, // EMSdev
|
|||||||
}
|
}
|
||||||
doc["cmd_t"] = command_topic;
|
doc["cmd_t"] = command_topic;
|
||||||
|
|
||||||
// extend for enums, add options
|
// extend for enums and also commands, add options
|
||||||
if (type == DeviceValueType::ENUM) {
|
if ((type == DeviceValueType::ENUM) || (type == DeviceValueType::CMD)) {
|
||||||
JsonArray option_list = doc["ops"].to<JsonArray>();
|
JsonArray option_list = doc["ops"].to<JsonArray>();
|
||||||
if (EMSESP::system_.enum_format() == ENUM_FORMAT_INDEX) {
|
if (EMSESP::system_.enum_format() == ENUM_FORMAT_INDEX) {
|
||||||
// use index numbers
|
// use index numbers
|
||||||
@@ -943,7 +944,6 @@ bool Mqtt::publish_ha_sensor_config(uint8_t type, // EMSdev
|
|||||||
}
|
}
|
||||||
snprintf(sample_val, sizeof(sample_val), "'%s'", Helpers::translated_word(options[0]));
|
snprintf(sample_val, sizeof(sample_val), "'%s'", Helpers::translated_word(options[0]));
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (type != DeviceValueType::STRING && type != DeviceValueType::BOOL) {
|
} else if (type != DeviceValueType::STRING && type != DeviceValueType::BOOL) {
|
||||||
// For numeric's add the range
|
// For numeric's add the range
|
||||||
doc["mode"] = "box"; // auto, slider or box
|
doc["mode"] = "box"; // auto, slider or box
|
||||||
@@ -979,11 +979,6 @@ bool Mqtt::publish_ha_sensor_config(uint8_t type, // EMSdev
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// state topic
|
|
||||||
char stat_t[MQTT_TOPIC_MAX_SIZE];
|
|
||||||
snprintf(stat_t, sizeof(stat_t), "%s/%s", Mqtt::base().c_str(), tag_to_topic(device_type, tag).c_str());
|
|
||||||
doc["stat_t"] = stat_t;
|
|
||||||
|
|
||||||
// friendly name = <tag> <name>
|
// friendly name = <tag> <name>
|
||||||
char ha_name[70];
|
char ha_name[70];
|
||||||
char * F_name = strdup(fullname);
|
char * F_name = strdup(fullname);
|
||||||
@@ -997,38 +992,49 @@ bool Mqtt::publish_ha_sensor_config(uint8_t type, // EMSdev
|
|||||||
free(F_name); // very important!
|
free(F_name); // very important!
|
||||||
doc["name"] = ha_name;
|
doc["name"] = ha_name;
|
||||||
|
|
||||||
// value template
|
|
||||||
// if its nested mqtt format then use the appended entity name, otherwise take the original name
|
|
||||||
char val_obj[100];
|
|
||||||
char val_cond[200];
|
|
||||||
if (is_nested() && tag >= DeviceValueTAG::TAG_HC1) {
|
|
||||||
snprintf(val_obj, sizeof(val_obj), "value_json.%s.%s", EMSdevice::tag_to_mqtt(tag), entity);
|
|
||||||
snprintf(val_cond, sizeof(val_cond), "value_json.%s is defined and %s is defined", EMSdevice::tag_to_mqtt(tag), val_obj);
|
|
||||||
} else {
|
|
||||||
snprintf(val_obj, sizeof(val_obj), "value_json.%s", entity);
|
|
||||||
snprintf(val_cond, sizeof(val_cond), "%s is defined", val_obj);
|
|
||||||
}
|
|
||||||
|
|
||||||
// special case to handle booleans
|
// not needed for commands
|
||||||
// applies to both Binary Sensor (read only) and a Switch (for a command)
|
if (type != DeviceValueType::CMD) {
|
||||||
// has no unit of measure or icon
|
// state topic, except for commands
|
||||||
if (type == DeviceValueType::BOOL) {
|
char stat_t[MQTT_TOPIC_MAX_SIZE];
|
||||||
if (EMSESP::system_.bool_format() == BOOL_FORMAT_TRUEFALSE) {
|
snprintf(stat_t, sizeof(stat_t), "%s/%s", Mqtt::base().c_str(), tag_to_topic(device_type, tag).c_str());
|
||||||
doc["pl_on"] = true;
|
doc["stat_t"] = stat_t;
|
||||||
doc["pl_off"] = false;
|
|
||||||
snprintf(sample_val, sizeof(sample_val), "false");
|
// value template
|
||||||
} else if (EMSESP::system_.bool_format() == BOOL_FORMAT_10) {
|
// if its nested mqtt format then use the appended entity name, otherwise take the original name
|
||||||
doc["pl_on"] = 1;
|
char val_obj[100];
|
||||||
doc["pl_off"] = 0;
|
char val_cond[200];
|
||||||
|
if (is_nested() && tag >= DeviceValueTAG::TAG_HC1) {
|
||||||
|
snprintf(val_obj, sizeof(val_obj), "value_json.%s.%s", EMSdevice::tag_to_mqtt(tag), entity);
|
||||||
|
snprintf(val_cond, sizeof(val_cond), "value_json.%s is defined and %s is defined", EMSdevice::tag_to_mqtt(tag), val_obj);
|
||||||
} else {
|
} else {
|
||||||
char result[12];
|
snprintf(val_obj, sizeof(val_obj), "value_json.%s", entity);
|
||||||
doc["pl_on"] = Helpers::render_boolean(result, true);
|
snprintf(val_cond, sizeof(val_cond), "%s is defined", val_obj);
|
||||||
doc["pl_off"] = Helpers::render_boolean(result, false);
|
|
||||||
snprintf(sample_val, sizeof(sample_val), "'%s'", Helpers::render_boolean(result, false));
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
doc["val_tpl"] = (std::string) "{{" + val_obj + " if " + val_cond + " else " + sample_val + "}}";
|
// special case to handle booleans
|
||||||
|
// applies to both Binary Sensor (read only) and a Switch (for a command)
|
||||||
|
// has no unit of measure or icon
|
||||||
|
if (type == DeviceValueType::BOOL) {
|
||||||
|
if (EMSESP::system_.bool_format() == BOOL_FORMAT_TRUEFALSE) {
|
||||||
|
doc["pl_on"] = true;
|
||||||
|
doc["pl_off"] = false;
|
||||||
|
snprintf(sample_val, sizeof(sample_val), "false");
|
||||||
|
} else if (EMSESP::system_.bool_format() == BOOL_FORMAT_10) {
|
||||||
|
doc["pl_on"] = 1;
|
||||||
|
doc["pl_off"] = 0;
|
||||||
|
} else {
|
||||||
|
char result[12];
|
||||||
|
doc["pl_on"] = Helpers::render_boolean(result, true);
|
||||||
|
doc["pl_off"] = Helpers::render_boolean(result, false);
|
||||||
|
snprintf(sample_val, sizeof(sample_val), "'%s'", Helpers::render_boolean(result, false));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
doc["val_tpl"] = (std::string) "{{" + val_obj + " if " + val_cond + " else " + sample_val + "}}";
|
||||||
|
|
||||||
|
// add the dev json object to the end, not for commands
|
||||||
|
add_ha_sections_to_doc(nullptr, stat_t, doc, false, val_cond); // no name, since the "dev" has already been adde
|
||||||
|
}
|
||||||
|
|
||||||
// Add the state class, device class and sometimes the icon. Used only for read-only sensors like Sensor and Binary Sensor
|
// Add the state class, device class and sometimes the icon. Used only for read-only sensors like Sensor and Binary Sensor
|
||||||
if (readonly_sensors) {
|
if (readonly_sensors) {
|
||||||
@@ -1037,12 +1043,10 @@ bool Mqtt::publish_ha_sensor_config(uint8_t type, // EMSdev
|
|||||||
if (device_type == EMSdevice::DeviceType::SYSTEM) {
|
if (device_type == EMSdevice::DeviceType::SYSTEM) {
|
||||||
doc["ent_cat"] = "diagnostic";
|
doc["ent_cat"] = "diagnostic";
|
||||||
}
|
}
|
||||||
|
|
||||||
add_ha_uom(doc.as<JsonObject>(), type, uom, entity); // add the UoM, device and state class
|
add_ha_uom(doc.as<JsonObject>(), type, uom, entity); // add the UoM, device and state class
|
||||||
}
|
}
|
||||||
|
|
||||||
doc["dev"] = dev_json; // add the dev json object to the end
|
doc["dev"] = dev_json;
|
||||||
add_ha_sections_to_doc(nullptr, stat_t, doc, false, val_cond); // no name, since the "dev" has already been added
|
|
||||||
|
|
||||||
return queue_ha(topic, doc.as<JsonObject>());
|
return queue_ha(topic, doc.as<JsonObject>());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -587,7 +587,6 @@ void System::send_info_mqtt() {
|
|||||||
doc["hostname"] = WiFi.getHostname();
|
doc["hostname"] = WiFi.getHostname();
|
||||||
doc["SSID"] = WiFi.SSID();
|
doc["SSID"] = WiFi.SSID();
|
||||||
doc["BSSID"] = WiFi.BSSIDstr();
|
doc["BSSID"] = WiFi.BSSIDstr();
|
||||||
doc["RSSI"] = WiFi.RSSI();
|
|
||||||
doc["MAC"] = WiFi.macAddress();
|
doc["MAC"] = WiFi.macAddress();
|
||||||
doc["IPv4 address"] = uuid::printable_to_string(WiFi.localIP()) + "/" + uuid::printable_to_string(WiFi.subnetMask());
|
doc["IPv4 address"] = uuid::printable_to_string(WiFi.localIP()) + "/" + uuid::printable_to_string(WiFi.subnetMask());
|
||||||
doc["IPv4 gateway"] = uuid::printable_to_string(WiFi.gatewayIP());
|
doc["IPv4 gateway"] = uuid::printable_to_string(WiFi.gatewayIP());
|
||||||
@@ -602,13 +601,19 @@ void System::send_info_mqtt() {
|
|||||||
|
|
||||||
// create the json for heartbeat
|
// create the json for heartbeat
|
||||||
void System::heartbeat_json(JsonObject output) {
|
void System::heartbeat_json(JsonObject output) {
|
||||||
uint8_t bus_status = EMSESP::bus_status();
|
switch (EMSESP::bus_status()) {
|
||||||
if (bus_status == EMSESP::BUS_STATUS_TX_ERRORS) {
|
case EMSESP::BUS_STATUS_OFFLINE:
|
||||||
|
output["bus_status"] = "connecting"; // EMS-ESP is booting...
|
||||||
|
break;
|
||||||
|
case EMSESP::BUS_STATUS_TX_ERRORS:
|
||||||
output["bus_status"] = "txerror";
|
output["bus_status"] = "txerror";
|
||||||
} else if (bus_status == EMSESP::BUS_STATUS_CONNECTED) {
|
break;
|
||||||
|
case EMSESP::BUS_STATUS_CONNECTED:
|
||||||
output["bus_status"] = "connected";
|
output["bus_status"] = "connected";
|
||||||
} else {
|
break;
|
||||||
|
default:
|
||||||
output["bus_status"] = "disconnected";
|
output["bus_status"] = "disconnected";
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
output["uptime"] = uuid::log::format_timestamp_ms(uuid::get_uptime_ms(), 3);
|
output["uptime"] = uuid::log::format_timestamp_ms(uuid::get_uptime_ms(), 3);
|
||||||
@@ -732,6 +737,9 @@ void System::system_check() {
|
|||||||
static uint8_t last_healthcheck_ = 0;
|
static uint8_t last_healthcheck_ = 0;
|
||||||
if (healthcheck_ != last_healthcheck_) {
|
if (healthcheck_ != last_healthcheck_) {
|
||||||
last_healthcheck_ = healthcheck_;
|
last_healthcheck_ = healthcheck_;
|
||||||
|
|
||||||
|
EMSESP::system_.send_heartbeat(); // send MQTT heartbeat immediately when connected
|
||||||
|
|
||||||
// see if we're better now
|
// see if we're better now
|
||||||
if (healthcheck_ == 0) {
|
if (healthcheck_ == 0) {
|
||||||
// everything is healthy, show LED permanently on or off depending on setting
|
// everything is healthy, show LED permanently on or off depending on setting
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
#define EMSESP_APP_VERSION "3.6.5-dev.14"
|
#define EMSESP_APP_VERSION "3.6.5-dev.15"
|
||||||
|
|||||||
Reference in New Issue
Block a user