Compare commits

..
6 Commits
Author SHA1 Message Date
Proddy 4eae732801 Merge pull request #3248 from proddy/littlefs-migrate
Littlefs migrate
2026-09-20 22:38:39 +02:00
Proddy 421060f69d Merge pull request #3247 from proddy/dev
fixes #3246 - Inconsistent display of IPv4/IPv6 addresses in web UI
2026-09-20 22:36:26 +02:00
proddy 7a338f465d add gateway ipv6 (#3246) 2026-09-20 12:28:25 +02:00
proddyandCursor 15ece2030e auto-convert older 3.8.x filesystem to the 3.9.0 format
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-20 11:20:37 +02:00
proddy 307ae9247f fixes #3246 2026-09-19 15:24:23 +02:00
proddy 323fdc8e4c package update 2026-09-19 15:17:23 +02:00
36 changed files with 850 additions and 336 deletions
+6
View File
@@ -18,6 +18,7 @@ This release is based on the latest Espressif/Arduino core version 3. It brings
- remove HA config for excluded entities [#3229](https://github.com/emsesp/EMS-ESP32/issues/3229)
- `show system` reports the Ethernet status on boards with a PHY, so a failed initialisation or a link that never came up is visible instead of Ethernet being omitted completely. Also shows the loop task's lowest free stack, to help diagnose reboots
- new Application Setting "Automatically check for firmware updates", off by default. When enabled EMS-ESP asks emsesp.org for the latest version once a day on its own, otherwise it only asks when the WebUI wants to show it, so an unattended system never contacts emsesp.org
- Automatically check and convert older 3.8.x filesystem to the new 3.9.0 format
## Fixed
@@ -27,6 +28,11 @@ This release is based on the latest Espressif/Arduino core version 3. It brings
- LED stayed off on a healthy system when "Disable LED" was unchecked
- Ethernet MAC address changed with the new SDK, breaking DHCP reservations (currently disabled)
- "IPv4 nameserver" showed an IPv6 address when IPv6 was in use
- the Network status page showed at most one IPv6 address and could hide the IPv4 DNS server entirely. It only read the link-local address, so a dual-stack host's ULA and global addresses were never reported, and it only read two of the three DNS slots, which are shared between IPv4 and IPv6. It now lists every address the interface holds, each labelled with its IPv6 scope, and every configured DNS server [#3246](https://github.com/emsesp/EMS-ESP32/issues/3246)
- the Gateway was only ever reported for IPv4, so on a dual-stack network the IPv6 default router was missing from the Network status page, `show system` and the MQTT `info` topic. Routers are learnt from router advertisements rather than configured, so all of them are now listed [#3246](https://github.com/emsesp/EMS-ESP32/issues/3246)
- `show system` had the same gaps, reporting a link-local IPv6 address only and a single IPv4 DNS server. The WiFi and Ethernet sections now list every IPv6 address with its scope, and every DNS server labelled with its own family [#3246](https://github.com/emsesp/EMS-ESP32/issues/3246)
- the Access Point status page reported whichever interface happened to be active, so with the AP down it showed the station's IP and MAC address under an "Inactive" heading. It now always reports the soft-AP's own details, and shows `none` when the AP isn't running
- the MQTT `info` topic published no addresses at all when connected over Ethernet, and over WiFi only an IPv4 address plus a link-local IPv6 one. Both interfaces now report their MAC, IPv4 address and gateway, every IPv6 address and every DNS server. Note that `IPv6 address` is now an array, and `IPv4 DNS Server` is replaced by a `DNS Server` array that covers both families [#3246](https://github.com/emsesp/EMS-ESP32/issues/3246)
- HA Discovery warning on Uptime after EMS-ESP boot due to NTP not ready
- hc/control setting for UI800 thermostats [#3181](https://github.com/emsesp/EMS-ESP32/discussions/3181)
- solar module switches [#3223](https://github.com/emsesp/EMS-ESP32/issues/3223)
+3 -3
View File
@@ -42,15 +42,15 @@
"@eslint/js": "^10.0.1",
"@preact/preset-vite": "^2.10.6",
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
"@types/node": "^26.6.1",
"@types/node": "^26.6.2",
"@types/react": "^19.3.0",
"@types/react-dom": "^19.3.0",
"concurrently": "^10.0.5",
"eslint": "^10.10.0",
"eslint": "^10.11.0",
"eslint-config-prettier": "^10.1.8",
"etag": "^1.8.1",
"mime-types": "^3.0.2",
"prettier": "^3.9.7",
"prettier": "^3.9.8",
"rollup-plugin-visualizer": "^7.1.1",
"terser": "^5.51.2",
"typescript": "^6.0.3",
+86 -86
View File
@@ -211,16 +211,16 @@ importers:
devDependencies:
'@eslint/js':
specifier: ^10.0.1
version: 10.0.1(eslint@10.10.0(supports-color@10.2.2))
version: 10.0.1(eslint@10.11.0(supports-color@10.2.2))
'@preact/preset-vite':
specifier: ^2.10.6
version: 2.10.6(@babel/core@7.29.7(supports-color@10.2.2))(preact@10.29.8)(supports-color@10.2.2)(vite@8.3.0(@types/node@26.6.1)(terser@5.51.2))
version: 2.10.6(@babel/core@7.29.7(supports-color@10.2.2))(preact@10.29.8)(supports-color@10.2.2)(vite@8.3.0(@types/node@26.6.2)(terser@5.51.2))
'@trivago/prettier-plugin-sort-imports':
specifier: ^6.0.2
version: 6.0.2(prettier@3.9.7)(supports-color@10.2.2)
version: 6.0.2(prettier@3.9.8)(supports-color@10.2.2)
'@types/node':
specifier: ^26.6.1
version: 26.6.1
specifier: ^26.6.2
version: 26.6.2
'@types/react':
specifier: ^19.3.0
version: 19.3.0
@@ -231,11 +231,11 @@ importers:
specifier: ^10.0.5
version: 10.0.5
eslint:
specifier: ^10.10.0
version: 10.10.0(supports-color@10.2.2)
specifier: ^10.11.0
version: 10.11.0(supports-color@10.2.2)
eslint-config-prettier:
specifier: ^10.1.8
version: 10.1.8(eslint@10.10.0(supports-color@10.2.2))
version: 10.1.8(eslint@10.11.0(supports-color@10.2.2))
etag:
specifier: ^1.8.1
version: 1.8.1
@@ -243,8 +243,8 @@ importers:
specifier: ^3.0.2
version: 3.0.2
prettier:
specifier: ^3.9.7
version: 3.9.7
specifier: ^3.9.8
version: 3.9.8
rollup-plugin-visualizer:
specifier: ^7.1.1
version: 7.1.1(rolldown@1.2.9)
@@ -256,13 +256,13 @@ importers:
version: 6.0.3
typescript-eslint:
specifier: ^8.70.0
version: 8.70.0(eslint@10.10.0(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3)
version: 8.70.0(eslint@10.11.0(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3)
vite:
specifier: ^8.3.0
version: 8.3.0(@types/node@26.6.1)(terser@5.51.2)
version: 8.3.0(@types/node@26.6.2)(terser@5.51.2)
vite-plugin-imagemin:
specifier: ^0.6.1
version: 0.6.1(supports-color@10.2.2)(vite@8.3.0(@types/node@26.6.1)(terser@5.51.2))
version: 0.6.1(supports-color@10.2.2)(vite@8.3.0(@types/node@26.6.2)(terser@5.51.2))
packages:
@@ -332,8 +332,8 @@ packages:
resolution: {integrity: sha512-1k2lAGRMfHTcwuNYcCNUmaUffmQv8KWMfh2iJUUeRlwlwH4FdNG7mfPI10NPfLHJFThE4Tyr4mv7kTNZOiPuBg==}
engines: {node: '>=6.9.0'}
'@babel/parser@7.29.8':
resolution: {integrity: sha512-E8lTAYNB1KW+FH+VGJuZM1ioAx2E6oVlvQFRrf5P8ZZmsiJXYAD9vTFV7yyEURNzgh1dFqMZuO6tUwcARbqFCA==}
'@babel/parser@7.29.9':
resolution: {integrity: sha512-CjXrNHTnvqBVqHgdBysY3vk2T8tpJHb5/RMeHJBTyVa9xgugCB0CJTx/3oO8RV2QRQP391RWpB7D6hLjm8V9uA==}
engines: {node: '>=6.0.0'}
hasBin: true
@@ -843,8 +843,8 @@ packages:
resolution: {integrity: sha512-zmPitbQ8+6zNutpwgcQuLcsEpn/Cj54Kbn7L5pX0Os5kdWplB7xPgEh/g+SWOB/qmows2gpuCaPyduq8ZZRnxA==}
deprecated: This is a stub types definition. minimatch provides its own type definitions, so you do not need this installed.
'@types/node@26.6.1':
resolution: {integrity: sha512-VqGJBMCtdhqkBUCcBLvywI0NJ+KLuVzgNnlBUNFOQjqVxzo2lxLUNg1DSey8+u2u6ktswSAxg+s68QLzWHNOuA==}
'@types/node@26.6.2':
resolution: {integrity: sha512-X1P21scMv4zGKLYqjdGjaKa7COa0RKVYYZZN/NfvLQ1JegxFhdhpZG/Lyn8AXx6CDUavKAd11v6BvfpkDByK8g==}
'@types/parse-json@4.0.2':
resolution: {integrity: sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==}
@@ -1005,8 +1005,8 @@ packages:
base64-js@1.5.1:
resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==}
baseline-browser-mapping@2.11.24:
resolution: {integrity: sha512-hYrgxie335U08WqICoGqKRzV1HFXv6zdxwJE4ekCb80CM9a0SVVsN4QPwT67RraRo+9h8IATk6uxHJw7QSkdOg==}
baseline-browser-mapping@2.11.25:
resolution: {integrity: sha512-gMmEShwwq7FJqMwvfRwvCl00v4kN+KOfJqXn+f4nrufak5gNHJOksd/60Dvjuz7sI8Y5WiSFBa8FEYr+zoyqCw==}
engines: {node: '>=6.0.0'}
hasBin: true
@@ -1339,8 +1339,8 @@ packages:
duplexer3@0.1.5:
resolution: {integrity: sha512-1A8za6ws41LQgv9HrE/66jyC5yuSjQ3L/KOpFtoBilsAK2iA2wuS5rTt1OCzIvtS2V7nVmedsUU+DGRcjBmOYA==}
electron-to-chromium@1.5.430:
resolution: {integrity: sha512-e1QEj72Y4zd8RlNZVmoTg+iCOSVwpk05IOiiQwdrkwCSVlZfPthevErhE+nckGd2YbsXfp1SkisznhGVIXP2NQ==}
electron-to-chromium@1.5.433:
resolution: {integrity: sha512-5lCAbyZBjtmUt/RAGHRqrL2q0oEFRThDAsZHHDn9XHa89Qw7gMYOeSicBTy+AHfvo0r6vwsZvqNJTQIQy1BLzA==}
emoji-regex@10.6.0:
resolution: {integrity: sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==}
@@ -1525,8 +1525,8 @@ packages:
resolution: {integrity: sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==}
engines: {node: ^20.19.0 || ^22.13.0 || >=24}
eslint@10.10.0:
resolution: {integrity: sha512-NPXn6r5zl4uET1DAVPaOwzX3rut4c0wcmw3dWJAfOsTM5+TogXo0DDjz8pwm/hL8cyVNpHqeK4JpN0NjnyFFNw==}
eslint@10.11.0:
resolution: {integrity: sha512-P7a6UEEqb9G95MYAtqkmsTbVXIYyzIfl6NGOIJk162PaahFxFyeGcrlXYFSiagECg4sEm8IseJdZBKR3rx6MsQ==}
engines: {node: ^20.19.0 || ^22.13.0 || >=24}
hasBin: true
peerDependencies:
@@ -2556,8 +2556,8 @@ packages:
resolution: {integrity: sha512-ravE6m9Atw9Z/jjttRUZ+clIXogdghyZAuWJ3qEzjT+jI/dL1ifAqhZeC5VHzQp1MSt1+jxKkFNemj/iO7tVUA==}
engines: {node: '>=4'}
prettier@3.9.7:
resolution: {integrity: sha512-T3mF5P7HFzZVLDQuCUNtJj6WK1pcpLMweMNUVwGb01bLNkH9AkKxtZvmInw8K6bnn2O3d6/5RHl6zSHiBAD0Og==}
prettier@3.9.8:
resolution: {integrity: sha512-WRFq3Wn3WId7LLROfMLdH7xaFr2jR62wU8nLO6rQUOLOxNZUviyJQs1M0iIhLexSFy+L+w0ch66wtoO2jRjG0A==}
engines: {node: '>=14'}
hasBin: true
@@ -3105,8 +3105,8 @@ packages:
yaml:
optional: true
which-typed-array@1.1.23:
resolution: {integrity: sha512-JMh8aK+1B/0bk/YNupICmH5MgCq6yNLKYQUfsZtSDLLCCmxUkHjUY+oOlIa90lO7lHN1woAfpenLdlKpXy9o+A==}
which-typed-array@1.1.24:
resolution: {integrity: sha512-wk4Mf4pR5mRP7eYuuTBCIQ9d0ud2Fv2jRLQpfgnRjbOxAFHmjKFValgTpitVKzJJS8ajnYQV2Du1SZ8j6b/EUQ==}
engines: {node: '>= 0.4'}
which@1.3.1:
@@ -3197,7 +3197,7 @@ snapshots:
'@babel/helper-compilation-targets': 7.29.7
'@babel/helper-module-transforms': 7.29.7(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2)
'@babel/helpers': 7.29.7
'@babel/parser': 7.29.8
'@babel/parser': 7.29.9
'@babel/template': 7.29.7
'@babel/traverse': 7.29.8(supports-color@10.2.2)
'@babel/types': 7.29.8
@@ -3212,7 +3212,7 @@ snapshots:
'@babel/generator@7.29.8':
dependencies:
'@babel/parser': 7.29.8
'@babel/parser': 7.29.9
'@babel/types': 7.29.8
'@jridgewell/gen-mapping': 0.3.13
'@jridgewell/trace-mapping': 0.3.31
@@ -3261,7 +3261,7 @@ snapshots:
'@babel/template': 7.29.7
'@babel/types': 7.29.8
'@babel/parser@7.29.8':
'@babel/parser@7.29.9':
dependencies:
'@babel/types': 7.29.8
@@ -3293,7 +3293,7 @@ snapshots:
'@babel/template@7.29.7':
dependencies:
'@babel/code-frame': 7.29.7
'@babel/parser': 7.29.8
'@babel/parser': 7.29.9
'@babel/types': 7.29.8
'@babel/traverse@7.29.8(supports-color@10.2.2)':
@@ -3301,7 +3301,7 @@ snapshots:
'@babel/code-frame': 7.29.7
'@babel/generator': 7.29.8
'@babel/helper-globals': 7.29.7
'@babel/parser': 7.29.8
'@babel/parser': 7.29.9
'@babel/template': 7.29.7
'@babel/types': 7.29.8
debug: 4.4.3(supports-color@10.2.2)
@@ -3411,9 +3411,9 @@ snapshots:
'@esbuild/linux-loong64@0.14.54':
optional: true
'@eslint-community/eslint-utils@4.10.1(eslint@10.10.0(supports-color@10.2.2))':
'@eslint-community/eslint-utils@4.10.1(eslint@10.11.0(supports-color@10.2.2))':
dependencies:
eslint: 10.10.0(supports-color@10.2.2)
eslint: 10.11.0(supports-color@10.2.2)
eslint-visitor-keys: 3.4.3
'@eslint-community/regexpp@4.12.2': {}
@@ -3434,9 +3434,9 @@ snapshots:
dependencies:
'@types/json-schema': 7.0.15
'@eslint/js@10.0.1(eslint@10.10.0(supports-color@10.2.2))':
'@eslint/js@10.0.1(eslint@10.11.0(supports-color@10.2.2))':
optionalDependencies:
eslint: 10.10.0(supports-color@10.2.2)
eslint: 10.11.0(supports-color@10.2.2)
'@eslint/object-schema@3.0.5': {}
@@ -3596,19 +3596,19 @@ snapshots:
'@popperjs/core@2.11.8': {}
'@preact/preset-vite@2.10.6(@babel/core@7.29.7(supports-color@10.2.2))(preact@10.29.8)(supports-color@10.2.2)(vite@8.3.0(@types/node@26.6.1)(terser@5.51.2))':
'@preact/preset-vite@2.10.6(@babel/core@7.29.7(supports-color@10.2.2))(preact@10.29.8)(supports-color@10.2.2)(vite@8.3.0(@types/node@26.6.2)(terser@5.51.2))':
dependencies:
'@babel/core': 7.29.7(supports-color@10.2.2)
'@babel/plugin-transform-react-jsx': 7.29.7(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2)
'@babel/plugin-transform-react-jsx-development': 7.29.7(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2)
'@prefresh/vite': 2.4.12(preact@10.29.8)(supports-color@10.2.2)(vite@8.3.0(@types/node@26.6.1)(terser@5.51.2))
'@prefresh/vite': 2.4.12(preact@10.29.8)(supports-color@10.2.2)(vite@8.3.0(@types/node@26.6.2)(terser@5.51.2))
'@rollup/pluginutils': 5.4.0
babel-plugin-transform-hook-names: 1.0.2(@babel/core@7.29.7(supports-color@10.2.2))
debug: 4.4.3(supports-color@10.2.2)
magic-string: 0.30.21
picocolors: 1.1.1
vite: 8.3.0(@types/node@26.6.1)(terser@5.51.2)
vite-prerender-plugin: 0.5.13(vite@8.3.0(@types/node@26.6.1)(terser@5.51.2))
vite: 8.3.0(@types/node@26.6.2)(terser@5.51.2)
vite-prerender-plugin: 0.5.13(vite@8.3.0(@types/node@26.6.2)(terser@5.51.2))
zimmerframe: 1.1.5
transitivePeerDependencies:
- preact
@@ -3625,7 +3625,7 @@ snapshots:
'@prefresh/utils@1.2.1': {}
'@prefresh/vite@2.4.12(preact@10.29.8)(supports-color@10.2.2)(vite@8.3.0(@types/node@26.6.1)(terser@5.51.2))':
'@prefresh/vite@2.4.12(preact@10.29.8)(supports-color@10.2.2)(vite@8.3.0(@types/node@26.6.2)(terser@5.51.2))':
dependencies:
'@babel/core': 7.29.7(supports-color@10.2.2)
'@prefresh/babel-plugin': 0.5.4(@babel/core@7.29.7(supports-color@10.2.2))
@@ -3633,7 +3633,7 @@ snapshots:
'@prefresh/utils': 1.2.1
'@rollup/pluginutils': 4.2.1
preact: 10.29.8
vite: 8.3.0(@types/node@26.6.1)(terser@5.51.2)
vite: 8.3.0(@types/node@26.6.2)(terser@5.51.2)
transitivePeerDependencies:
- supports-color
@@ -3708,17 +3708,17 @@ snapshots:
react-virtualized-auto-sizer: 1.0.26(react-dom@19.3.0(react@19.3.0))(react@19.3.0)
react-window: 1.8.11(react-dom@19.3.0(react@19.3.0))(react@19.3.0)
'@trivago/prettier-plugin-sort-imports@6.0.2(prettier@3.9.7)(supports-color@10.2.2)':
'@trivago/prettier-plugin-sort-imports@6.0.2(prettier@3.9.8)(supports-color@10.2.2)':
dependencies:
'@babel/generator': 7.29.8
'@babel/parser': 7.29.8
'@babel/parser': 7.29.9
'@babel/traverse': 7.29.8(supports-color@10.2.2)
'@babel/types': 7.29.8
javascript-natural-sort: 0.7.1
lodash-es: 4.18.1
minimatch: 9.0.9
parse-imports-exports: 0.2.4
prettier: 3.9.7
prettier: 3.9.8
transitivePeerDependencies:
- supports-color
@@ -3729,7 +3729,7 @@ snapshots:
'@types/glob@7.2.0':
dependencies:
'@types/minimatch': 6.0.0
'@types/node': 26.6.1
'@types/node': 26.6.2
'@types/imagemin-gifsicle@7.0.4':
dependencies:
@@ -3758,19 +3758,19 @@ snapshots:
'@types/imagemin@7.0.1':
dependencies:
'@types/node': 26.6.1
'@types/node': 26.6.2
'@types/json-schema@7.0.15': {}
'@types/keyv@3.1.4':
dependencies:
'@types/node': 26.6.1
'@types/node': 26.6.2
'@types/minimatch@6.0.0':
dependencies:
minimatch: 10.2.6
'@types/node@26.6.1':
'@types/node@26.6.2':
dependencies:
undici-types: 8.9.0
@@ -3792,21 +3792,21 @@ snapshots:
'@types/responselike@1.0.3':
dependencies:
'@types/node': 26.6.1
'@types/node': 26.6.2
'@types/svgo@2.6.4':
dependencies:
'@types/node': 26.6.1
'@types/node': 26.6.2
'@typescript-eslint/eslint-plugin@8.70.0(@typescript-eslint/parser@8.70.0(eslint@10.10.0(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3))(eslint@10.10.0(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3)':
'@typescript-eslint/eslint-plugin@8.70.0(@typescript-eslint/parser@8.70.0(eslint@10.11.0(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3))(eslint@10.11.0(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3)':
dependencies:
'@eslint-community/regexpp': 4.12.2
'@typescript-eslint/parser': 8.70.0(eslint@10.10.0(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3)
'@typescript-eslint/parser': 8.70.0(eslint@10.11.0(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3)
'@typescript-eslint/scope-manager': 8.70.0
'@typescript-eslint/type-utils': 8.70.0(eslint@10.10.0(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3)
'@typescript-eslint/utils': 8.70.0(eslint@10.10.0(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3)
'@typescript-eslint/type-utils': 8.70.0(eslint@10.11.0(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3)
'@typescript-eslint/utils': 8.70.0(eslint@10.11.0(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3)
'@typescript-eslint/visitor-keys': 8.70.0
eslint: 10.10.0(supports-color@10.2.2)
eslint: 10.11.0(supports-color@10.2.2)
ignore: 7.0.9
natural-compare: 1.4.0
ts-api-utils: 2.5.0(typescript@6.0.3)
@@ -3814,14 +3814,14 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@typescript-eslint/parser@8.70.0(eslint@10.10.0(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3)':
'@typescript-eslint/parser@8.70.0(eslint@10.11.0(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3)':
dependencies:
'@typescript-eslint/scope-manager': 8.70.0
'@typescript-eslint/types': 8.70.0
'@typescript-eslint/typescript-estree': 8.70.0(supports-color@10.2.2)(typescript@6.0.3)
'@typescript-eslint/visitor-keys': 8.70.0
debug: 4.4.3(supports-color@10.2.2)
eslint: 10.10.0(supports-color@10.2.2)
eslint: 10.11.0(supports-color@10.2.2)
typescript: 6.0.3
transitivePeerDependencies:
- supports-color
@@ -3844,13 +3844,13 @@ snapshots:
dependencies:
typescript: 6.0.3
'@typescript-eslint/type-utils@8.70.0(eslint@10.10.0(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3)':
'@typescript-eslint/type-utils@8.70.0(eslint@10.11.0(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3)':
dependencies:
'@typescript-eslint/types': 8.70.0
'@typescript-eslint/typescript-estree': 8.70.0(supports-color@10.2.2)(typescript@6.0.3)
'@typescript-eslint/utils': 8.70.0(eslint@10.10.0(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3)
'@typescript-eslint/utils': 8.70.0(eslint@10.11.0(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3)
debug: 4.4.3(supports-color@10.2.2)
eslint: 10.10.0(supports-color@10.2.2)
eslint: 10.11.0(supports-color@10.2.2)
ts-api-utils: 2.5.0(typescript@6.0.3)
typescript: 6.0.3
transitivePeerDependencies:
@@ -3873,13 +3873,13 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@typescript-eslint/utils@8.70.0(eslint@10.10.0(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3)':
'@typescript-eslint/utils@8.70.0(eslint@10.11.0(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3)':
dependencies:
'@eslint-community/eslint-utils': 4.10.1(eslint@10.10.0(supports-color@10.2.2))
'@eslint-community/eslint-utils': 4.10.1(eslint@10.11.0(supports-color@10.2.2))
'@typescript-eslint/scope-manager': 8.70.0
'@typescript-eslint/types': 8.70.0
'@typescript-eslint/typescript-estree': 8.70.0(supports-color@10.2.2)(typescript@6.0.3)
eslint: 10.10.0(supports-color@10.2.2)
eslint: 10.11.0(supports-color@10.2.2)
typescript: 6.0.3
transitivePeerDependencies:
- supports-color
@@ -3949,7 +3949,7 @@ snapshots:
base64-js@1.5.1: {}
baseline-browser-mapping@2.11.24: {}
baseline-browser-mapping@2.11.25: {}
bin-build@3.0.0:
dependencies:
@@ -4010,9 +4010,9 @@ snapshots:
browserslist@4.29.0:
dependencies:
baseline-browser-mapping: 2.11.24
baseline-browser-mapping: 2.11.25
caniuse-lite: 1.0.30001810
electron-to-chromium: 1.5.430
electron-to-chromium: 1.5.433
node-releases: 2.0.56
update-browserslist-db: 1.3.3(browserslist@4.29.0)
@@ -4377,7 +4377,7 @@ snapshots:
duplexer3@0.1.5: {}
electron-to-chromium@1.5.430: {}
electron-to-chromium@1.5.433: {}
emoji-regex@10.6.0: {}
@@ -4491,9 +4491,9 @@ snapshots:
escape-string-regexp@4.0.0: {}
eslint-config-prettier@10.1.8(eslint@10.10.0(supports-color@10.2.2)):
eslint-config-prettier@10.1.8(eslint@10.11.0(supports-color@10.2.2)):
dependencies:
eslint: 10.10.0(supports-color@10.2.2)
eslint: 10.11.0(supports-color@10.2.2)
eslint-scope@9.1.2:
dependencies:
@@ -4506,9 +4506,9 @@ snapshots:
eslint-visitor-keys@5.0.1: {}
eslint@10.10.0(supports-color@10.2.2):
eslint@10.11.0(supports-color@10.2.2):
dependencies:
'@eslint-community/eslint-utils': 4.10.1(eslint@10.10.0(supports-color@10.2.2))
'@eslint-community/eslint-utils': 4.10.1(eslint@10.11.0(supports-color@10.2.2))
'@eslint-community/regexpp': 4.12.2
'@eslint/config-array': 0.23.5(supports-color@10.2.2)
'@eslint/config-helpers': 0.7.0
@@ -5058,7 +5058,7 @@ snapshots:
is-typed-array@1.1.15:
dependencies:
which-typed-array: 1.1.23
which-typed-array: 1.1.24
is-utf8@0.2.1: {}
@@ -5518,7 +5518,7 @@ snapshots:
prepend-http@2.0.0: {}
prettier@3.9.7: {}
prettier@3.9.8: {}
process-nextick-args@2.0.1: {}
@@ -5940,13 +5940,13 @@ snapshots:
dependencies:
typescript: 6.0.3
typescript-eslint@8.70.0(eslint@10.10.0(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3):
typescript-eslint@8.70.0(eslint@10.11.0(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3):
dependencies:
'@typescript-eslint/eslint-plugin': 8.70.0(@typescript-eslint/parser@8.70.0(eslint@10.10.0(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3))(eslint@10.10.0(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3)
'@typescript-eslint/parser': 8.70.0(eslint@10.10.0(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3)
'@typescript-eslint/eslint-plugin': 8.70.0(@typescript-eslint/parser@8.70.0(eslint@10.11.0(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3))(eslint@10.11.0(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3)
'@typescript-eslint/parser': 8.70.0(eslint@10.11.0(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3)
'@typescript-eslint/typescript-estree': 8.70.0(supports-color@10.2.2)(typescript@6.0.3)
'@typescript-eslint/utils': 8.70.0(eslint@10.10.0(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3)
eslint: 10.10.0(supports-color@10.2.2)
'@typescript-eslint/utils': 8.70.0(eslint@10.11.0(supports-color@10.2.2))(supports-color@10.2.2)(typescript@6.0.3)
eslint: 10.11.0(supports-color@10.2.2)
typescript: 6.0.3
transitivePeerDependencies:
- supports-color
@@ -5991,7 +5991,7 @@ snapshots:
spdx-correct: 3.2.0
spdx-expression-parse: 3.0.1
vite-plugin-imagemin@0.6.1(supports-color@10.2.2)(vite@8.3.0(@types/node@26.6.1)(terser@5.51.2)):
vite-plugin-imagemin@0.6.1(supports-color@10.2.2)(vite@8.3.0(@types/node@26.6.2)(terser@5.51.2)):
dependencies:
'@types/imagemin': 7.0.1
'@types/imagemin-gifsicle': 7.0.4
@@ -6016,11 +6016,11 @@ snapshots:
imagemin-webp: 6.1.0
jpegtran-bin: 6.0.1
pathe: 0.2.0
vite: 8.3.0(@types/node@26.6.1)(terser@5.51.2)
vite: 8.3.0(@types/node@26.6.2)(terser@5.51.2)
transitivePeerDependencies:
- supports-color
vite-prerender-plugin@0.5.13(vite@8.3.0(@types/node@26.6.1)(terser@5.51.2)):
vite-prerender-plugin@0.5.13(vite@8.3.0(@types/node@26.6.2)(terser@5.51.2)):
dependencies:
kolorist: 1.8.0
magic-string: 0.30.21
@@ -6028,9 +6028,9 @@ snapshots:
simple-code-frame: 1.3.0
source-map: 0.7.6
stack-trace: 1.0.0
vite: 8.3.0(@types/node@26.6.1)(terser@5.51.2)
vite: 8.3.0(@types/node@26.6.2)(terser@5.51.2)
vite@8.3.0(@types/node@26.6.1)(terser@5.51.2):
vite@8.3.0(@types/node@26.6.2)(terser@5.51.2):
dependencies:
lightningcss: 1.33.0
picomatch: 4.0.7
@@ -6038,11 +6038,11 @@ snapshots:
rolldown: 1.2.9
tinyglobby: 0.2.17
optionalDependencies:
'@types/node': 26.6.1
'@types/node': 26.6.2
fsevents: 2.3.3
terser: 5.51.2
which-typed-array@1.1.23:
which-typed-array@1.1.24:
dependencies:
available-typed-arrays: 1.0.7
call-bind: 1.0.9
+6 -10
View File
@@ -297,16 +297,12 @@ const InstallDialog = memo(
)}
</Typography>
{upgradeImportantMessageType === 2 && LL.UPGRADE_IMPORTANT_MESSAGES_2()}
{upgradeImportantMessageType === 1 && (
<>
{LL.UPGRADE_IMPORTANT_MESSAGES_1()}
<Typography sx={{ mt: 2 }}>
<Link to="/settings/downloadUpload" style={{ color: 'lightblue' }}>
{LL.DOWNLOAD_SYSTEM_BACKUP()}
</Link>
</Typography>
</>
)}
{upgradeImportantMessageType === 1 && LL.UPGRADE_IMPORTANT_MESSAGES_1()}
<Typography sx={{ mt: 2 }}>
<Link to="/settings/downloadUpload" style={{ color: 'lightblue' }}>
{LL.DOWNLOAD_SYSTEM_BACKUP()}
</Link>
</Typography>
<Typography sx={{ mt: 2 }}>
<Link
to="https://docs.emsesp.org/FAQ#upgrading-the-firmware"
+5 -2
View File
@@ -90,7 +90,10 @@ const APStatus = () => {
<ListItemAvatar>
<Avatar sx={{ bgcolor: 'primary.main' }}>IP</Avatar>
</ListItemAvatar>
<ListItemText primary={LL.ADDRESS_OF('IP')} secondary={data.ip_address} />
<ListItemText
primary={LL.ADDRESS_OF('IP')}
secondary={data.ip_address || 'none'}
/>
</ListItem>
<Divider variant="inset" component="li" />
@@ -103,7 +106,7 @@ const APStatus = () => {
</ListItemAvatar>
<ListItemText
primary={LL.ADDRESS_OF('MAC')}
secondary={data.mac_address}
secondary={data.mac_address || 'none'}
/>
</ListItem>
+43 -19
View File
@@ -7,11 +7,13 @@ import SettingsInputComponentIcon from '@mui/icons-material/SettingsInputCompone
import WifiIcon from '@mui/icons-material/Wifi';
import {
Avatar,
Box,
Divider,
List,
ListItem,
ListItemAvatar,
ListItemText,
Typography,
useTheme
} from '@mui/material';
import type { Theme } from '@mui/material';
@@ -62,26 +64,45 @@ const networkQualityHighlight = ({ rssi }: NetworkStatusType, theme: Theme) => {
return theme.palette.success.main;
};
const dnsServers = ({ dns_ip_1, dns_ip_2 }: NetworkStatusType) => {
if (!dns_ip_1) {
// one address per line, with an optional dimmed note such as the IPv6 scope
const AddressList = ({
addresses
}: {
addresses: { value: string; note?: string }[];
}) => {
if (addresses.length === 0) {
return 'none';
}
return dns_ip_1 + (!dns_ip_2 || dns_ip_2 === '0.0.0.0' ? '' : ', ' + dns_ip_2);
return addresses.map(({ value, note }) => (
<Box component="span" sx={{ display: 'block' }} key={value}>
{value}
{note && (
<Typography
component="span"
variant="body2"
sx={{ color: 'grey.600', ml: 1 }} // dimmer than the grey[500] secondary text
>
({note})
</Typography>
)}
</Box>
));
};
const IPs = (status: NetworkStatusType) => {
if (
!status.local_ipv6 ||
status.local_ipv6 === '0000:0000:0000:0000:0000:0000:0000:0000' ||
status.local_ipv6 === '::'
) {
return status.local_ip;
}
if (!status.local_ip || status.local_ip === '0.0.0.0') {
return status.local_ipv6;
}
return status.local_ip + ', ' + status.local_ipv6;
};
const isSet = (ip?: string): ip is string => !!ip && ip !== '0.0.0.0' && ip !== '::';
const ipAddresses = ({ local_ip, ipv6 }: NetworkStatusType) => [
...(isSet(local_ip) ? [{ value: local_ip }] : []),
...(ipv6 ?? []).map(({ address, scope }) => ({ value: address, note: scope }))
];
const gateways = ({ gateway_ip, gateway_ipv6 }: NetworkStatusType) => [
...(isSet(gateway_ip) ? [{ value: gateway_ip }] : []),
...(gateway_ipv6 ?? []).filter(isSet).map((value) => ({ value }))
];
const dnsServers = ({ dns }: NetworkStatusType) =>
(dns ?? []).filter(isSet).map((value) => ({ value }));
const getNetworkStatusText = (
status: NetworkConnectionStatus,
@@ -178,7 +199,10 @@ const NetworkStatus = () => {
<ListItemAvatar>
<Avatar>IP</Avatar>
</ListItemAvatar>
<ListItemText primary={LL.ADDRESS_OF('IP')} secondary={IPs(data)} />
<ListItemText
primary={LL.ADDRESS_OF('IP')}
secondary={<AddressList addresses={ipAddresses(data)} />}
/>
</ListItem>
<Divider variant="inset" component="li" />
<ListItem>
@@ -211,7 +235,7 @@ const NetworkStatus = () => {
</ListItemAvatar>
<ListItemText
primary={LL.NETWORK_GATEWAY()}
secondary={data.gateway_ip || 'none'}
secondary={<AddressList addresses={gateways(data)} />}
/>
</ListItem>
<Divider variant="inset" component="li" />
@@ -223,7 +247,7 @@ const NetworkStatus = () => {
</ListItemAvatar>
<ListItemText
primary={LL.NETWORK_DNS()}
secondary={dnsServers(data)}
secondary={<AddressList addresses={dnsServers(data)} />}
/>
</ListItem>
</>
+2 -2
View File
@@ -311,7 +311,7 @@ const cs: Translation = {
ALLVALUES: 'Všechny hodnoty',
SPECIAL_FUNCTIONS: 'Speciální funkce',
WAIT_FIRMWARE: 'Firmware se nahrává a instaluje',
INSTALL_VERSION: 'Tímto se {0} verze {1}. Jste si jistí?',
INSTALL_VERSION: 'Tímto se {0} verze {1}',
UPDATE_AVAILABLE: 'aktualizace dostupná',
LATEST_VERSION: 'Používáte nejnovější verzi {0}firmwaru',
PLEASE_WAIT: 'Prosím čekejte',
@@ -340,7 +340,7 @@ const cs: Translation = {
ONLINE_HELP: 'online nápověda',
UPGRADE_IMPORTANT_MESSAGES: 'Aktualizovat důležité zprávy',
UPGRADE_IMPORTANT_MESSAGES_1: 'Tato aktualizace vyžaduje obnovení továrního nastavení. Ujistěte se, že nejprve stáhnete systémovou zálohu před pokračováním a poté nahrajte tento soubor po instalaci nové verze.',
UPGRADE_IMPORTANT_MESSAGES_2: 'Aktualizujete se na novou hlavní verzi. Ujistěte se, že jste přečetli ChangeLog pro jakékoliv závažné změny.',
UPGRADE_IMPORTANT_MESSAGES_2: 'Aktualizujete se na novou major verzi. Je vhodné nejprve vytvořit systémovou zálohu. Také zkontrolujte online nápovědu pro jakékoliv závažné změny.',
WARNING_SYSTEM_BACKUP: 'Toto vytvoří zálohu vašich celých systémových konfigurací a nastavení. Všechna hesla budou v zálohovém souboru čitelná. Buďte opatrní při sdílení! Opravdu chcete pokračovat?',
TEST_EMAIL_SUCCESSFUL: 'Test email byl úspěšně odeslán',
SYSTEM_NAME: 'Název systému',
+2 -2
View File
@@ -311,7 +311,7 @@ const de: Translation = {
ALLVALUES: 'Alle Werte',
SPECIAL_FUNCTIONS: 'Sonderfunktionen',
WAIT_FIRMWARE: 'Die Firmware wird hochgeladen und installiert.',
INSTALL_VERSION: 'Dadurch wird die Version {1} {0}. Sind Sie sicher?',
INSTALL_VERSION: 'Dadurch wird die Version {1} {0}',
UPDATE_AVAILABLE: 'Firmware-Update verfügbar',
LATEST_VERSION: 'Sie verwenden die neueste {0} Firmware-Version',
PLEASE_WAIT: 'Bitte warten',
@@ -340,7 +340,7 @@ const de: Translation = {
ONLINE_HELP: 'Online-Hilfe',
UPGRADE_IMPORTANT_MESSAGES: 'Wichtige Nachrichten aktualisieren',
UPGRADE_IMPORTANT_MESSAGES_1: 'Für diese Aktualisierung ist ein Werksreset erforderlich. Stellen Sie sicher, dass Sie zuerst eine Systemsicherung herunterladen, bevor Sie fortfahren, und laden Sie diese Datei dann nach der Installation der neuen Version hoch.',
UPGRADE_IMPORTANT_MESSAGES_2: 'Sie aktualisieren auf eine neue Hauptversion. Stellen Sie sicher, dass Sie den ChangeLog für alle wichtigen Änderungen gelesen haben.',
UPGRADE_IMPORTANT_MESSAGES_2: 'Sie aktualisieren auf eine neue major Version. Es ist ratsam, zuerst eine Systemsicherung zu erstellen. Überprüfen Sie auch die Online-Hilfe für eventuelle wichtige Änderungen.',
WARNING_SYSTEM_BACKUP: 'Dies wird eine Sicherung Ihrer vollständigen Systemkonfiguration und Einstellungen erstellen. Alle Passwörter werden in dieser Sicherungsdatei lesbar sein. Seien Sie vorsichtig beim Teilen! Möchten Sie fortfahren?',
TEST_EMAIL_SUCCESSFUL: 'Test email erfolgreich gesendet',
SYSTEM_NAME: 'Systemname',
+2 -2
View File
@@ -311,7 +311,7 @@ const en: Translation = {
ALLVALUES: 'All Values',
SPECIAL_FUNCTIONS: 'Special Functions',
WAIT_FIRMWARE: 'Firmware is uploading and installing',
INSTALL_VERSION: 'This will {0} version {1}. Are you sure?',
INSTALL_VERSION: 'This will {0} version {1}',
UPDATE_AVAILABLE: 'update available',
LATEST_VERSION: 'You are using the latest {0} firmware version',
PLEASE_WAIT: 'Please wait',
@@ -340,7 +340,7 @@ const en: Translation = {
ONLINE_HELP: 'online help',
UPGRADE_IMPORTANT_MESSAGES: 'Upgrade Important Messages',
UPGRADE_IMPORTANT_MESSAGES_1: 'This upgrade requires a factory reset. Make sure you first download a System Backup before continuing, and then upload this file after the new version is installed.',
UPGRADE_IMPORTANT_MESSAGES_2: 'You are upgrading to a new major version. Make sure you have read the ChangeLog for any breaking changes.',
UPGRADE_IMPORTANT_MESSAGES_2: 'You are upgrading to a new major version. It is advisable to make a system backup first. Also check the online help for any breaking changes.',
WARNING_SYSTEM_BACKUP: 'This will create a backup of your full system configuration and settings. All passwords will be readable in the backup file. Be careful with sharing! Do you want to continue?',
TEST_EMAIL_SUCCESSFUL: 'Test email sent successfully',
SYSTEM_NAME: 'System Name',
+2 -2
View File
@@ -311,7 +311,7 @@ const fr: Translation = {
ALLVALUES: 'Toutes les valeurs',
SPECIAL_FUNCTIONS: 'Fonctions spéciales',
WAIT_FIRMWARE: 'Firmware en cours de téléchargement et d\'installation',
INSTALL_VERSION: 'Cela va {0} la version {1}. Êtes-vous sûr ?',
INSTALL_VERSION: 'Cela va {0} la version {1}',
UPDATE_AVAILABLE: 'mise à jour disponible',
LATEST_VERSION: 'Vous utilisez la dernière version {0} du firmware',
PLEASE_WAIT: 'Veuillez patienter',
@@ -340,7 +340,7 @@ const fr: Translation = {
ONLINE_HELP: 'aide en ligne',
UPGRADE_IMPORTANT_MESSAGES: 'Mettre à jour les messages importants',
UPGRADE_IMPORTANT_MESSAGES_1: 'Cette mise à jour nécessite une réinitialisation de fabrique. Assurez-vous de télécharger une sauvegarde système avant de continuer, et de la charger après l\'installation de la nouvelle version.',
UPGRADE_IMPORTANT_MESSAGES_2: 'Vous mettez à jour vers une nouvelle version majeure. Assurez-vous de lire le ChangeLog pour tout changement important.',
UPGRADE_IMPORTANT_MESSAGES_2: 'Vous mettez à jour vers une nouvelle version majeure. Il est recommandé de créer d\'abord une sauvegarde système. Vérifiez également l\'aide en ligne pour les éventuelles modifications importantes.',
WARNING_SYSTEM_BACKUP: 'Cela créera une sauvegarde de votre configuration et paramètres complets. Tous les mots de passe seront lisibles dans le fichier de sauvegarde. Soyez prudent avec le partage ! Voulez-vous continuer ?',
TEST_EMAIL_SUCCESSFUL: 'Test email envoyé avec succès',
SYSTEM_NAME: 'Nom du système',
+2 -2
View File
@@ -311,7 +311,7 @@ const it: Translation = {
ALLVALUES: 'Tutti i valori',
SPECIAL_FUNCTIONS: 'Funzioni speciali',
WAIT_FIRMWARE: 'Firmware è in upload e installazione',
INSTALL_VERSION: 'Questo installerà la versione {1} {0}. Sei sicuro?',
INSTALL_VERSION: 'Questo installerà la versione {1} {0}',
UPDATE_AVAILABLE: 'aggiornamento disponibile',
LATEST_VERSION: 'Stai usando la versione più recente del firmware {0}',
PLEASE_WAIT: 'Attendere',
@@ -340,7 +340,7 @@ const it: Translation = {
ONLINE_HELP: 'aiuto online',
UPGRADE_IMPORTANT_MESSAGES: 'Aggiorna Messaggi Importanti',
UPGRADE_IMPORTANT_MESSAGES_1: 'Questa aggiornamento richiede un ripristino di fabbrica. Assicurati di prima scaricare un backup del sistema prima di continuare, e poi caricare questo file dopo l\'installazione della nuova versione.',
UPGRADE_IMPORTANT_MESSAGES_2: 'Stai aggiornando a una nuova versione principale. Assicurati di aver letto il ChangeLog per qualsiasi cambiamento importante.',
UPGRADE_IMPORTANT_MESSAGES_2: 'Stai aggiornando a una nuova versione major. È consigliabile prima creare un backup del sistema. Controlla anche l\'aiuto online per eventuali modifiche importanti.',
WARNING_SYSTEM_BACKUP: 'Questo creerà un backup delle tue configurazioni e impostazioni complete. Tutte le password saranno leggibili nel file di backup. Sei sicuro di voler continuare?',
TEST_EMAIL_SUCCESSFUL: 'Test email inviata con successo',
SYSTEM_NAME: 'Nome del sistema',
+2 -2
View File
@@ -311,7 +311,7 @@ const nl: Translation = {
ALLVALUES: 'All waarden',
SPECIAL_FUNCTIONS: 'Speciale functies',
WAIT_FIRMWARE: 'Firmware wordt geüpload en geïnstalleerd',
INSTALL_VERSION: 'Hiermee wordt versie {1} {0}. Weet je het zeker?',
INSTALL_VERSION: 'Hiermee wordt versie {1} {0}',
UPDATE_AVAILABLE: 'update beschikbaar',
LATEST_VERSION: 'U gebruikt de nieuwste {0} firmwareversie',
PLEASE_WAIT: 'Een ogenblik geduld',
@@ -340,7 +340,7 @@ const nl: Translation = {
ONLINE_HELP: 'online help',
UPGRADE_IMPORTANT_MESSAGES: 'Upgrade Belangrijke Berichten',
UPGRADE_IMPORTANT_MESSAGES_1: 'Deze upgrade vereist een fabrieksinstelling. Zorg ervoor dat u eerst een Systeem Backup download voordat u doorgaat, en upload deze file na de installatie van de nieuwe versie.',
UPGRADE_IMPORTANT_MESSAGES_2: 'U updatet naar een nieuwe grote versie. Zorg ervoor dat u de ChangeLog hebt gelezen voor alle brekende wijzigingen.',
UPGRADE_IMPORTANT_MESSAGES_2: 'U updatet naar een nieuwe major versie. Het is raadzaam om eerst een systeem backup te maken. Controleer ook de online help voor eventuele brekende wijzigingen.',
WARNING_SYSTEM_BACKUP: 'Dit zal een back-up van uw volledige systeemconfiguratie en instellingen maken. Alle wachtwoorden zijn leesbaar in het back-upbestand. Wees voorzichtig bij delen! Wilt u doorgaan?',
TEST_EMAIL_SUCCESSFUL: 'Test email verzonden succesvol',
SYSTEM_NAME: 'Systeemnaam',
+2 -2
View File
@@ -311,7 +311,7 @@ const no: Translation = {
ALLVALUES: 'Alle verdier',
SPECIAL_FUNCTIONS: 'Spesielle funksjoner',
WAIT_FIRMWARE: 'Firmware er i opplasting og installasjon',
INSTALL_VERSION: 'Dette vil {0} versjon {1}. Er du sikker?',
INSTALL_VERSION: 'Dette vil {0} versjon {1}',
UPDATE_AVAILABLE: 'oppdatering tilgjengelig',
LATEST_VERSION: 'Du bruker den nyeste {0} firmware versjonen',
PLEASE_WAIT: 'Vennligst vent',
@@ -340,7 +340,7 @@ const no: Translation = {
ONLINE_HELP: 'online hjelp',
UPGRADE_IMPORTANT_MESSAGES: 'Oppdater viktige meldinger',
UPGRADE_IMPORTANT_MESSAGES_1: 'Denne oppdateringen krever en fabriksinstilling. Sørg for at du først lastet ned en System Backup før du fortsetter, og last denne filen etter at den nye versjonen er installert.',
UPGRADE_IMPORTANT_MESSAGES_2: 'Du oppdaterer til en ny hovedversjon. Sørg for at du har lest ChangeLog for eventuelle bruddende endringer.',
UPGRADE_IMPORTANT_MESSAGES_2: 'Du oppdaterer til en ny major versjon. Det er anbefalt å først lage en systembackup. Kontroller også onlinehjelp for eventuelle viktige endringer.',
WARNING_SYSTEM_BACKUP: 'Dette vil lage en sikkerhetskopi av din fullstendige systemkonfigurasjon og innstillinger. Alle passord vil være lesbare i sikkerhetskopien. Vær forsiktig med deling! Vil du fortsette?',
TEST_EMAIL_SUCCESSFUL: 'Test email sendt suksessfullt',
SYSTEM_NAME: 'Systemnavn',
+2 -2
View File
@@ -311,7 +311,7 @@ const pl: BaseTranslation = {
ALLVALUES: 'Wszystkie wartości',
SPECIAL_FUNCTIONS: 'Specjalne funkcje',
WAIT_FIRMWARE: 'Firmware ściąga się i instaluje',
INSTALL_VERSION: 'To zainstaluje wersję {1} {0}. Jesteś pewny?',
INSTALL_VERSION: 'To zainstaluje wersję {1} {0}',
UPDATE_AVAILABLE: 'aktualizacja dostępna',
LATEST_VERSION: 'Jesteś używając najnowszej wersji firmware {0}',
PLEASE_WAIT: 'Proszę czekać',
@@ -340,7 +340,7 @@ const pl: BaseTranslation = {
ONLINE_HELP: 'pomoc online',
UPGRADE_IMPORTANT_MESSAGES: 'Aktualizuj ważne wiadomości',
UPGRADE_IMPORTANT_MESSAGES_1: 'Ta aktualizacja wymaga resetu fabrycznego. Upewnij się, że najpierw pobierzesz kopię zapasową systemu przed kontynuowaniem, a następnie przesuń tę plik po zainstalowaniu nowej wersji.',
UPGRADE_IMPORTANT_MESSAGES_2: 'Aktualizujesz się do nowej głównej wersji. Upewnij się, że przeczytałeś ChangeLog dla wszelkich istotnych zmian.',
UPGRADE_IMPORTANT_MESSAGES_2: 'Aktualizujesz się na nową major wersję. Jest to zalecane, aby najpierw utworzyć kopię zapasową systemu. Sprawdź również online pomoc dla ewentualnych istotnych zmian.',
WARNING_SYSTEM_BACKUP: 'To spowoduje utworzenie kopii zapasowej całej konfiguracji i ustawień systemu. Wszystkie hasła będą widoczne w pliku kopii zapasowej. Bądź ostrożny przy udostępnianiu! Chcesz kontynuować?',
TEST_EMAIL_SUCCESSFUL: 'Test email wysłany pomyślnie',
SYSTEM_NAME: 'Nazwa systemu',
+2 -2
View File
@@ -311,7 +311,7 @@ const sk: Translation = {
ALLVALUES: 'Všetky hodnoty',
SPECIAL_FUNCTIONS: 'Špeciálne funkcie',
WAIT_FIRMWARE: 'Firmvér sa nahráva a inštaluje',
INSTALL_VERSION: 'Týmto sa {0} verzia {1}. Si si istý?',
INSTALL_VERSION: 'Týmto sa {0} verzia {1}',
UPDATE_AVAILABLE: 'dostupná aktualizácia',
LATEST_VERSION: 'Používate poslednú {0} verziu firmvéru',
PLEASE_WAIT: 'Čakajte prosím',
@@ -340,7 +340,7 @@ const sk: Translation = {
ONLINE_HELP: 'online pomoc',
UPGRADE_IMPORTANT_MESSAGES: 'Aktualizovať dôležité správy',
UPGRADE_IMPORTANT_MESSAGES_1: 'Táto aktualizácia vyžaduje reštart základných nastavení. Uistite sa, že najprv stiahnete systémovú zálohu pred pokračovaním, a potom nahrajte tento súbor po instalácii novej verzie.',
UPGRADE_IMPORTANT_MESSAGES_2: 'Aktualizujete sa na novú hlavnú verziu. Uistite sa, že ste prečítali ChangeLog pre akékoľvek dôležité zmeny.',
UPGRADE_IMPORTANT_MESSAGES_2: 'Aktualizujete sa na novú major verziu. Je vhodné najprv vytvoriť systémovú zálohu. Taktiež skontrolujte online nápovľu pre akékoľvek dôležité zmeny.',
WARNING_SYSTEM_BACKUP: 'Toto vytvorí zálohu všetkých vašich celých systémových konfigurácií a nastavení. Všetky hesla budú čitateľné v zálohovom súbore. Buďte opatrní pri zdieľaní! Chcete pokračovať?',
TEST_EMAIL_SUCCESSFUL: 'Test email bol úspešne odoslaný',
SYSTEM_NAME: 'Názov systému',
+2 -2
View File
@@ -311,7 +311,7 @@ const sv: Translation = {
ALLVALUES: 'Alla värden',
SPECIAL_FUNCTIONS: 'Specialfunktioner',
WAIT_FIRMWARE: 'Firmware laddas upp och installeras',
INSTALL_VERSION: 'Det här kommer {0} version {1}. Är du säker?',
INSTALL_VERSION: 'Det här kommer {0} version {1}',
UPDATE_AVAILABLE: 'uppdatering tillgänglig',
LATEST_VERSION: 'Du använder den senaste {0} firmwareversionen.',
PLEASE_WAIT: 'Var god vänta',
@@ -340,7 +340,7 @@ const sv: Translation = {
ONLINE_HELP: 'online hjälp',
UPGRADE_IMPORTANT_MESSAGES: 'Uppdatera viktiga meddelanden',
UPGRADE_IMPORTANT_MESSAGES_1: 'Denna uppdatering kräver en fabriksåterställning. Se till att du först laddar ned en System Backup innan du fortsätter, och ladda upp denna fil efter att den nya versionen är installerad.',
UPGRADE_IMPORTANT_MESSAGES_2: 'Du uppdaterar till en ny huvudversion. Se till att du har läst ChangeLog för eventuella brkande ändringar.',
UPGRADE_IMPORTANT_MESSAGES_2: 'Du uppdaterar till en ny major version. Det är rekommenderat att först skapa en systembackup. Kontrollera också onlinehjälpen för eventuella viktiga ändringar.',
WARNING_SYSTEM_BACKUP: 'Detta kommer att skapa en säkerhetskopia av din fullständiga systemkonfiguration och inställningar. Alla lösenord kommer att vara läsbara i säkerhetskopien. Var försiktig med att dela! Vill du fortsätta?',
TEST_EMAIL_SUCCESSFUL: 'Test email skickad lyckades',
SYSTEM_NAME: 'Systemnamn',
+2 -2
View File
@@ -311,7 +311,7 @@ const tr: Translation = {
ALLVALUES: 'Tüm Değerler',
SPECIAL_FUNCTIONS: 'Özel Fonksiyonlar',
WAIT_FIRMWARE: 'Firmware yükleniyor ve yükleniyor',
INSTALL_VERSION: 'Bu {0} sürümü {1} yükleyecek. Emin misiniz?',
INSTALL_VERSION: 'Bu {0} sürümü {1} yükleyecek',
UPDATE_AVAILABLE: 'güncellendi!',
LATEST_VERSION: 'En son {0} firmware sürümünü kullanıyorsunuz.',
PLEASE_WAIT: 'Lütfen bekleyin',
@@ -340,7 +340,7 @@ const tr: Translation = {
ONLINE_HELP: 'online yardım',
UPGRADE_IMPORTANT_MESSAGES: 'Önemli Mesajları Güncelle',
UPGRADE_IMPORTANT_MESSAGES_1: 'Bu güncelleme továrnı ayarlarını gerektirir. Yapılandırmanızı ve ayarlarınızı önce yedekleyin ve ardından yeni sürüm yüklendikten sonra yükleyin.',
UPGRADE_IMPORTANT_MESSAGES_2: 'Yeni bir büyük sürüme yükselteceksiniz. Değişiklikleri ChangeLogı okuduğunuzdan emin olun.',
UPGRADE_IMPORTANT_MESSAGES_2: 'Yeni bir major sürüme güncelleme yapıyorsunuz. Sistem yedeklemesi yapmanız önerilir. Ayrıca online yardımı kontrol ederek önemli değişiklikleri gözden geçirin.',
WARNING_SYSTEM_BACKUP: 'Bu, sistem yapılandırmanızı ve ayarlarınızın bir yedeklemesi oluşturacaktır. Tüm şifreler yedekleme dosyasında okunabilir olacaktır. Paylaşırken dikkatli olun! Devam etmek istediğinize emin misiniz?',
TEST_EMAIL_SUCCESSFUL: 'Test email başarıyla gönderildi',
SYSTEM_NAME: 'Sistem Adı',
+9 -4
View File
@@ -20,19 +20,24 @@ export enum WiFiEncryptionType {
WIFI_AUTH_WPA2_WPA3_PSK = 7
}
export interface IPv6AddressType {
address: string;
scope: string; // global, unique local, site local or link local
}
export interface NetworkStatusType {
status: NetworkConnectionStatus;
local_ip: string;
local_ipv6: string;
ipv6?: IPv6AddressType[];
mac_address: string;
rssi: number;
ssid: string;
bssid: string;
channel: number;
subnet_mask: string;
gateway_ip: string;
dns_ip_1: string;
dns_ip_2: string;
gateway_ip?: string;
gateway_ipv6?: string[];
dns?: string[];
hostname: string;
reconnect_count: number;
}
+1 -1
View File
@@ -15,7 +15,7 @@
},
"devDependencies": {
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
"prettier": "^3.9.7"
"prettier": "^3.9.8"
},
"packageManager": "pnpm@12.4.2"
}
+15 -15
View File
@@ -175,10 +175,10 @@ importers:
devDependencies:
'@trivago/prettier-plugin-sort-imports':
specifier: ^6.0.2
version: 6.0.2(prettier@3.9.7)
version: 6.0.2(prettier@3.9.8)
prettier:
specifier: ^3.9.7
version: 3.9.7
specifier: ^3.9.8
version: 3.9.8
packages:
@@ -202,8 +202,8 @@ packages:
resolution: {integrity: sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==}
engines: {node: '>=6.9.0'}
'@babel/parser@7.29.8':
resolution: {integrity: sha512-E8lTAYNB1KW+FH+VGJuZM1ioAx2E6oVlvQFRrf5P8ZZmsiJXYAD9vTFV7yyEURNzgh1dFqMZuO6tUwcARbqFCA==}
'@babel/parser@7.29.9':
resolution: {integrity: sha512-CjXrNHTnvqBVqHgdBysY3vk2T8tpJHb5/RMeHJBTyVa9xgugCB0CJTx/3oO8RV2QRQP391RWpB7D6hLjm8V9uA==}
engines: {node: '>=6.0.0'}
hasBin: true
@@ -303,8 +303,8 @@ packages:
picocolors@1.1.1:
resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==}
prettier@3.9.7:
resolution: {integrity: sha512-T3mF5P7HFzZVLDQuCUNtJj6WK1pcpLMweMNUVwGb01bLNkH9AkKxtZvmInw8K6bnn2O3d6/5RHl6zSHiBAD0Og==}
prettier@3.9.8:
resolution: {integrity: sha512-WRFq3Wn3WId7LLROfMLdH7xaFr2jR62wU8nLO6rQUOLOxNZUviyJQs1M0iIhLexSFy+L+w0ch66wtoO2jRjG0A==}
engines: {node: '>=14'}
hasBin: true
@@ -318,7 +318,7 @@ snapshots:
'@babel/generator@7.29.8':
dependencies:
'@babel/parser': 7.29.8
'@babel/parser': 7.29.9
'@babel/types': 7.29.8
'@jridgewell/gen-mapping': 0.3.13
'@jridgewell/trace-mapping': 0.3.31
@@ -330,14 +330,14 @@ snapshots:
'@babel/helper-validator-identifier@7.29.7': {}
'@babel/parser@7.29.8':
'@babel/parser@7.29.9':
dependencies:
'@babel/types': 7.29.8
'@babel/template@7.29.7':
dependencies:
'@babel/code-frame': 7.29.7
'@babel/parser': 7.29.8
'@babel/parser': 7.29.9
'@babel/types': 7.29.8
'@babel/traverse@7.29.8':
@@ -345,7 +345,7 @@ snapshots:
'@babel/code-frame': 7.29.7
'@babel/generator': 7.29.8
'@babel/helper-globals': 7.29.7
'@babel/parser': 7.29.8
'@babel/parser': 7.29.9
'@babel/template': 7.29.7
'@babel/types': 7.29.8
debug: 4.4.3
@@ -373,17 +373,17 @@ snapshots:
'@msgpack/msgpack@3.1.3': {}
'@trivago/prettier-plugin-sort-imports@6.0.2(prettier@3.9.7)':
'@trivago/prettier-plugin-sort-imports@6.0.2(prettier@3.9.8)':
dependencies:
'@babel/generator': 7.29.8
'@babel/parser': 7.29.8
'@babel/parser': 7.29.9
'@babel/traverse': 7.29.8
'@babel/types': 7.29.8
javascript-natural-sort: 0.7.1
lodash-es: 4.18.1
minimatch: 9.0.9
parse-imports-exports: 0.2.4
prettier: 3.9.7
prettier: 3.9.8
transitivePeerDependencies:
- supports-color
@@ -421,4 +421,4 @@ snapshots:
picocolors@1.1.1: {}
prettier@3.9.7: {}
prettier@3.9.8: {}
+28 -26
View File
@@ -98,13 +98,13 @@ let system_status = {
wifi_rssi: -41,
esp_platform: 'ESP32',
build_flags: 'DEMO',
cpu_type: 'ESP32',
cpu_type: 'ESP32-D0WD-V3',
cpu_rev: 0,
cpu_cores: 2,
cpu_freq_mhz: 240,
max_alloc_heap: 191,
arduino_version: 'ESP32 Arduino v2.0.17',
sdk_version: 'v4.4.7',
arduino_version: 'Tasmota Arduino v3.3.8',
sdk_version: '5.5.4.260407',
partition: 'app0',
flash_chip_size: 16384,
flash_chip_speed: 80000000,
@@ -127,13 +127,13 @@ let system_status = {
},
{
partition: 'app1',
version: '3.8.1-dev.40',
version: '3.8.3',
install_date: '2025-03-01T13:29:13.999Z',
size: 4672
},
{
partition: 'factory',
version: '3.8.1-dev.39',
version: '3.8.4',
install_date: '2025-03-01T13:29:13.999Z',
size: 4672
}
@@ -141,24 +141,22 @@ let system_status = {
// partitions: [],
developer_mode: settings.developer_mode,
disable_reset: settings.disable_reset,
model: '',
board: '',
// model: 'BBQKees Electronics EMS Gateway E32 V2 (E32 V2.0 P3/2024011)',
// board: 'E32V2',
// status: 0,
status: 3
model: 'BBQKees Electronics E32V2.2 rev.2.2/2024074',
board: 'E32V2_2',
status: 0
// status: 3
};
// Test Versioning
// Test the versioning
let DEV_VERSION_IS_UPGRADEABLE: boolean;
let STABLE_VERSION_IS_UPGRADEABLE: boolean;
let THIS_VERSION: string;
let LATEST_STABLE_VERSION = '3.8.3';
let LATEST_STABLE_VERSION = '3.8.4';
let LATEST_DEV_VERSION = '3.9.0-dev.1';
// scenarios for testing versioning
// let version_test = 0; // on latest stable, or switch to dev
let version_test = 1; // on latest dev, or switch back to stable
let version_test = 0; // on latest stable, or switch to dev
// let version_test = 1; // on latest dev, or switch back to stable
// let version_test = 2; // upgrade an older stable to latest stable or switch to latest dev
// let version_test = 3; // upgrade dev to latest, or switch to stable
// let version_test = 4; // downgrade to an older dev, or switch back to stable
@@ -446,25 +444,24 @@ function executeCommand(name: string) {
}
// called by Action endpoint upgradeImportantMessages
// 0 is do nothing
// 1 is a special upgrade and needs an export->factory reset->import
// 2 is a major upgrade
function upgradeImportantMessages(version: string) {
// 0 is do nothing
// 1 means 3.9 and factory reset required
// 2 means a major version upgrade
let upgradeImportantMessageType_n = 0;
// check file extensions
// check file extensions first
if (version.endsWith('.md5') || version.endsWith('.json')) {
upgradeImportantMessageType_n = 0; // digest / backup restore: no upgrade warning
} else if (version.endsWith('.bin')) {
// extract the version number from the filename and if its going from 3.8.x to 3.9.x, then set upgradeImportantMessageType_n to 1
const versionNumber = version.split('.');
if (versionNumber[0] === '3' && versionNumber[1] === '8') {
upgradeImportantMessageType_n = 1; // make it 1, factory reset required
upgradeImportantMessageType_n = 2; // major upgrade
}
} else {
// this is a version string like "3.9.0"
upgradeImportantMessageType_n = 1; // make it 1, for testing, meaning a factory reset is required
// the parameter is a version string like "3.9.0"
upgradeImportantMessageType_n = 2; // major upgrade
}
console.log(
@@ -580,7 +577,7 @@ let ap_settings = {
max_clients: 4
};
const ap_status = {
status: 1,
status: 0, // active - an inactive AP reports no address at all
ip_address: '192.168.4.1',
mac_address: '3C:61:05:03:AB:2D',
station_num: 0
@@ -612,6 +609,11 @@ let network_settings = {
const network_status = {
status: 3,
local_ip: '10.10.10.101',
ipv6: [
{ address: '2001:db8:1234:5678::a1b2', scope: 'global' },
{ address: 'fd00:1234:5678::a1b2', scope: 'unique local' },
{ address: 'fe80::3e61:5ff:fe03:ab2c', scope: 'link local' }
],
mac_address: '3C:61:05:03:AB:2C',
rssi: -41,
ssid: 'home',
@@ -619,8 +621,8 @@ const network_status = {
channel: 11,
subnet_mask: '255.255.255.0',
gateway_ip: '10.10.10.1',
dns_ip_1: '10.10.10.1',
dns_ip_2: '0.0.0.0',
gateway_ipv6: ['fe80::1', 'fe80::2'],
dns: ['10.10.10.1', 'fd00:1234:5678::1'],
hostname: 'ems-esp',
reconnect_count: 1
};
+2 -1
View File
@@ -41,7 +41,8 @@ custom_password = admin
; ** upload settings **
; for direct USB, which is the default you can set an optional port for example:
; upload_port = /dev/ttyUSB0 or COM3
;
; upload_speed = 921600
; for direct via HTTP (OTA) set:
; upload_protocol = custom
; custom_emsesp_ip = <ip address> or ems-esp.local
+29 -28
View File
@@ -6,9 +6,9 @@ abluftqualität
abluftqualitätsfühler
abrt
absburnpow
ACAC
ACAH
ACAO
acac
acah
acao
accomodate
aceotrope
activehigh
@@ -48,6 +48,7 @@ appused
apssid
apsta
arduhal
arduinoespressif
arduinojson
arduinoota
arjan
@@ -70,6 +71,7 @@ ausreichend
authmode
autodst
automode
autonegotiation
autoscroll
auxelecheatnrgcons
auxelecheatnrgconsheating
@@ -139,6 +141,7 @@ bytetime
calinttemp
catagory
cbuf
ccrc
cerapur
cfamily
changeloglevel
@@ -289,6 +292,7 @@ dewoffset
dewpoint
dewtemp
dewtemperature
dhcpc
dhwmintemp
dhwprio
dhwvalve
@@ -362,6 +366,7 @@ entitypath
enumupdate
enviline
equipt
eraseap
erct
erdwärmetauscher
errordisp
@@ -458,6 +463,7 @@ gpoc
greenstar
grokhotkov
haclimate
handshaked
hardwarestatus
harwerth
headersize
@@ -501,7 +507,7 @@ heatsource
heatsources
heatstarts
heattemp
heattransfer
heattransfer
heattransfersystem
heatup
heatvalve
@@ -578,6 +584,7 @@ iconua
idedata
iele
ignwork
iile
iiwi
ijoy
imlhd
@@ -615,6 +622,7 @@ itty
ivtclock
jtag
junkersclock
juststopped
kamin
karlesky
keelbypass
@@ -706,6 +714,7 @@ mbap
mbar
mbed
mbedtsl
mbit
mdio
mdns
melis
@@ -744,7 +753,7 @@ mlongcalls
mmio
mmode
mmplus
mockServer
mockserver
modbus
modee
modetype
@@ -762,6 +771,7 @@ msgstr
msys
mtext
mult
mwdt
mysys
nachheiz
nachheizreg
@@ -780,6 +790,7 @@ neopixel
netcmp
netflowtemp
netif
netifs
newdatetime
newnow
newpcb
@@ -836,6 +847,7 @@ oilpreheat
oldoffset
olimex
olimexpoe
olimexpoew
omea
onchange
onetimekey
@@ -843,6 +855,7 @@ onewire
ooops
operatingstate
opmode
optimisations
optipng
osrc
outdoorhold
@@ -877,7 +890,7 @@ poolsettemp
poolshunt
poolshuntstatus
poolstarts
pooltemp
pooltemp
portx
powerreduction
powervalues
@@ -944,7 +957,7 @@ rawstr
rcplus
readback
readelf
READYCLIENT
readyclient
readymail
recp
recved
@@ -1000,6 +1013,7 @@ roomsettings
roomtemp
roomtempdiff
roomtemperature
roomtempoffset
roomthermostat
roomthermostats
rrts
@@ -1029,6 +1043,7 @@ seltemp
seltemplow
seltempoff
seltempsingle
sendmail
sendtype
sensordata
sensorfails
@@ -1037,6 +1052,7 @@ sensorname
sensorreads
sensortype
seperator
serialises
serverclass
servicecode
servicecodenumber
@@ -1087,11 +1103,13 @@ soll
speicher
spidqs
spiio
spiram
squaremeters
srts
staconnected
stadisconnected
staipassigned
startm
startshp
starttemp
starttemperature
@@ -1112,6 +1130,7 @@ substract
summermode
summersetmode
summertemp
sumr
supchan
suprapur
svenska
@@ -1161,6 +1180,7 @@ tempparmode
temprature
tempsensor
tempstatus
testemail
testtemperature
thermaldisinfect
thermostate
@@ -1271,6 +1291,7 @@ werror
wextra
whenmodeoff
wificlient
wifioff
wifireconnects
wifistrength
winsock
@@ -1281,6 +1302,7 @@ workm
workmin
worktime
wouldblock
wrover
wswitch
wtype
wunused
@@ -1330,24 +1352,3 @@ zyxwvutsrqponmlkjihgfedcba
öffnen
česky
živanović
MWDT
juststopped
handshaked
startm
netifs
testemail
sendmail
serialises
SPIRAM
optimisations
IILE
Sumr
eraseap
roomtempoffset
dhcpc
wifioff
autonegotiation
Mbit
WROVER
OLIMEXPOEW
arduinoespressif
+3 -3
View File
@@ -14,9 +14,9 @@ void APStatus::apStatus(AsyncWebServerRequest * request) {
JsonObject root = response->getRoot();
root["status"] = _apSettingsService->getAPNetworkStatus();
root["ip_address"] = emsesp::EMSESP::network_.getLocalIP();
root["mac_address"] = emsesp::EMSESP::network_.getMacAddress();
root["station_num"] = emsesp::EMSESP::network_.getStationNum();
root["ip_address"] = emsesp::EMSESP::network_.getAPIP();
root["mac_address"] = emsesp::EMSESP::network_.getAPMacAddress();
root["station_num"] = emsesp::EMSESP::network_.getAPStationNum();
response->setLength();
request->send(response);
+44 -23
View File
@@ -2,6 +2,44 @@
#include <emsesp.h>
namespace {
void add_ipv6(JsonObject root, NetworkInterface & netif) {
auto found = emsesp::Network::ipv6_addresses(netif);
if (found.empty()) {
return;
}
JsonArray addresses = root["ipv6"].to<JsonArray>();
for (const auto & ipv6 : found) {
JsonObject entry = addresses.add<JsonObject>();
entry["address"] = ipv6.ip.toString();
entry["scope"] = ipv6.scope;
}
}
void add_dns(JsonObject root, const NetworkInterface & netif) {
JsonArray servers = root["dns"].to<JsonArray>();
for (const auto & ip : emsesp::Network::dns_servers(netif)) {
servers.add(ip.toString());
}
}
void add_gateways(JsonObject root, NetworkInterface & netif) {
if (IPUtils::isSet(netif.gatewayIP())) {
root["gateway_ip"] = netif.gatewayIP().toString();
}
auto found = emsesp::Network::ipv6_gateways(netif);
if (found.empty()) {
return;
}
JsonArray gateways = root["gateway_ipv6"].to<JsonArray>();
for (const auto & ip : found) {
gateways.add(ip.toString());
}
}
} // namespace
NetworkStatus::NetworkStatus(AsyncWebServer * server, SecurityManager * securityManager) {
securityManager->addEndpoint(server, NETWORK_STATUS_SERVICE_PATH, AuthenticationPredicates::IS_AUTHENTICATED, [this](AsyncWebServerRequest * request) {
networkStatus(request);
@@ -27,21 +65,13 @@ void NetworkStatus::networkStatus(AsyncWebServerRequest * request) {
if (emsesp::EMSESP::network_.ethernet_connected()) {
// Ethernet
root["local_ip"] = ETH.localIP().toString();
root["local_ipv6"] = ETH.linkLocalIPv6().toString();
root["mac_address"] = ETH.macAddress();
root["subnet_mask"] = ETH.subnetMask().toString();
root["gateway_ip"] = ETH.gatewayIP().toString();
IPAddress dnsIP1 = ETH.dnsIP(0);
IPAddress dnsIP2 = ETH.dnsIP(1);
if (IPUtils::isSet(dnsIP1)) {
root["dns_ip_1"] = dnsIP1.toString();
}
if (IPUtils::isSet(dnsIP2)) {
root["dns_ip_2"] = dnsIP2.toString();
}
add_gateways(root, ETH);
add_ipv6(root, ETH);
add_dns(root, ETH);
} else if (wifi_status == WL_CONNECTED) {
root["local_ip"] = WiFi.localIP().toString();
root["local_ipv6"] = WiFi.linkLocalIPv6().toString();
root["mac_address"] = WiFi.macAddress();
root["rssi"] = WiFi.RSSI();
root["ssid"] = WiFi.SSID();
@@ -49,18 +79,9 @@ void NetworkStatus::networkStatus(AsyncWebServerRequest * request) {
root["channel"] = WiFi.channel();
root["reconnect_count"] = emsesp::EMSESP::network_.getNetworkReconnects();
root["subnet_mask"] = WiFi.subnetMask().toString();
if (WiFi.gatewayIP() != INADDR_NONE) {
root["gateway_ip"] = WiFi.gatewayIP().toString();
}
IPAddress dnsIP1 = WiFi.dnsIP(0);
IPAddress dnsIP2 = WiFi.dnsIP(1);
if (dnsIP1 != INADDR_NONE) {
root["dns_ip_1"] = dnsIP1.toString();
}
if (dnsIP2 != INADDR_NONE) {
root["dns_ip_2"] = dnsIP2.toString();
}
add_gateways(root, WiFi.STA);
add_ipv6(root, WiFi.STA);
add_dns(root, WiFi.STA);
}
response->setLength();
+1 -1
View File
@@ -319,7 +319,7 @@ static void setup_commands(std::shared_ptr<Commands> const & commands) {
settings.eth_clock_mode = data[8];
return StateUpdateResult::CHANGED;
});
shell.printfln("Loaded board profile %s. Restarting...", board_profile.c_str());
shell.printfln("Set board profile to %s. Restarting...", board_profile.c_str());
EMSESP::system_.system_restart();
});
+28 -17
View File
@@ -21,6 +21,7 @@
#ifndef EMSESP_STANDALONE
#include "esp_ota_ops.h"
#include "rom/rtc.h"
#include "littlefs_compat.h"
#endif
static_assert(uuid::thread_safe, "uuid-common must be thread-safe");
@@ -1723,17 +1724,27 @@ void EMSESP::start() {
// start the file system
#ifndef EMSESP_STANDALONE
if (!LittleFS.begin(true)) {
LOG_ERROR("LittleFS Mount Failed");
return;
if (!LittleFS.begin(false)) {
// A partition written by an Arduino Core 2 build is readable but records limits
// this build refuses to mount. Rewrite the superblock and retry before resorting
// to a format, which would throw away the user's settings.
if (littlefs_migrate() && LittleFS.begin(false)) {
LOG_NOTICE("Converted Filesystem to new format");
} else if (LittleFS.begin(true)) {
LOG_WARNING("Formatted Filesystem, any previous settings have been lost");
} else {
// if we reach here, nothing will ever work so go into a infinite loop
Serial.println("LittleFS Mount Failed. Cannot start EMS-ESP");
while (true) {
delay(1000);
yield();
}
}
}
// else {
// output filesystem folders and files for debugging
// #if defined(EMSESP_DEBUG)
// LOG_DEBUG("Listing root directory before:");
// system_.listDir("/", 3); // show the contents of the root directory
// #endif
// }
#if defined(EMSESP_DEBUG)
LOG_DEBUG("Listing root directory before:");
system_.listDir("/", 3);
#endif
#endif
// do a quick scan of the filesystem to see if we a settings file in the /config folder
@@ -1746,7 +1757,7 @@ void EMSESP::start() {
bool factory_settings = false;
#endif
// start NVS storage
// start NVS storage
#ifndef EMSESP_STANDALONE
if (esp_partition_find(ESP_PARTITION_TYPE_DATA, ESP_PARTITION_SUBTYPE_DATA_NVS, "nvs1")) {
nvs_.begin("ems-esp", false, "nvs1");
@@ -1766,11 +1777,11 @@ void EMSESP::start() {
// loads core system services settings (mqtt, ap, ntp etc)
esp32React.begin();
// output filesystem folders and files for debugging
// #if defined(EMSESP_DEBUG)
// LOG_DEBUG("Listing root directory after:");
// system_.listDir("/", 3); // show the contents of the root directory
// #endif
// output filesystem folders and files for debugging
#if defined(EMSESP_DEBUG)
LOG_DEBUG("Listing root directory after:");
system_.listDir("/", 3); // show the contents of the root directory
#endif
#ifndef EMSESP_STANDALONE
if (factory_settings) {
@@ -1818,7 +1829,7 @@ void EMSESP::start() {
LOG_INFO("Last system reset reason Core0: %s, Core1: %s", system_.reset_reason(0).c_str(), system_.reset_reason(1).c_str());
#endif
// see if we're restoring a settings file
// see if we're restoring a settings file
#ifndef EMSESP_STANDALONE
if (system_.check_restore()) {
LOG_WARNING("EMS-ESP will restart to apply new settings. Please wait.");
+282
View File
@@ -0,0 +1,282 @@
/*
* EMS-ESP - https://github.com/emsesp/EMS-ESP
* Copyright 2020-2025 emsesp.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// A LittleFS partition written by an Arduino Core 2 build will not mount under the
// esp_littlefs that ships with Core 3, even though every byte of it is readable. Two
// fields of the superblock are compatibility gates rather than real format differences,
// and lfs_mount() rejects the filesystem on either one:
//
// name_max Core 2 used the upstream default of 255, while esp_littlefs derives 63 from
// CONFIG_LITTLEFS_OBJ_NAME_LEN and refuses anything larger. Storing 0 means
// "use the library's own limit", which is what a Core 3 format writes.
// version Core 2 recorded v2.1 and this build writes v2.0, and a higher minor is
// refused. The library here understands everything a v2.1 image holds, so
// lowering the field is enough.
//
// Rewriting them means walking the metadata block by hand. A block holds a revision count
// followed by a chain of commits, each one a run of tags terminated by a CCRC tag and a
// CRC covering everything that commit wrote. Tags are stored big endian and XORed with the
// preceding tag, so the chain has to be replayed from the start to find anything. The
// superblock struct is not at a fixed offset either: on a filesystem that has been written
// to, directory entries are committed ahead of it.
#ifndef EMSESP_STANDALONE
#include "littlefs_compat.h"
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <esp_partition.h>
#include <sdkconfig.h>
namespace emsesp {
namespace {
#ifndef CONFIG_LITTLEFS_OBJ_NAME_LEN
#define CONFIG_LITTLEFS_OBJ_NAME_LEN 64
#endif
constexpr uint32_t NAME_MAX_SUPPORTED = CONFIG_LITTLEFS_OBJ_NAME_LEN - 1;
constexpr uint32_t DISK_VERSION_TARGET = 0x00020000;
// littlefs block size on the ESP32, which is the flash sector size
constexpr uint32_t BLOCK_SIZE = 4096;
// byte offsets within lfs_superblock_t, all little endian uint32_t
constexpr uint32_t SB_VERSION = 0;
constexpr uint32_t SB_BLOCK_SIZE = 4;
constexpr uint32_t SB_NAME_MAX = 12;
constexpr uint32_t SB_SIZE = 24;
// tag accessors, mirroring lfs.c
constexpr uint32_t TYPE_INLINESTRUCT = 0x201;
constexpr uint32_t TYPE_CCRC = 0x500;
constexpr bool tag_isvalid(uint32_t t) {
return (t & 0x80000000) == 0;
}
constexpr uint32_t tag_type2(uint32_t t) {
return (t & 0x78000000) >> 20;
}
constexpr uint32_t tag_type3(uint32_t t) {
return (t & 0x7ff00000) >> 20;
}
constexpr uint32_t tag_chunk(uint32_t t) {
return (t & 0x0ff00000) >> 20;
}
constexpr uint32_t tag_id(uint32_t t) {
return (t & 0x000ffc00) >> 10;
}
constexpr uint32_t tag_size(uint32_t t) {
return t & 0x3ff;
}
// a size of 0x3ff marks a delete tag, which carries no payload
constexpr uint32_t tag_dsize(uint32_t t) {
return 4 + (tag_size(t) == 0x3ff ? 0 : tag_size(t));
}
uint32_t rd_be32(const uint8_t * p) {
return (static_cast<uint32_t>(p[0]) << 24) | (static_cast<uint32_t>(p[1]) << 16) | (static_cast<uint32_t>(p[2]) << 8) | p[3];
}
uint32_t rd_le32(const uint8_t * p) {
return (static_cast<uint32_t>(p[3]) << 24) | (static_cast<uint32_t>(p[2]) << 16) | (static_cast<uint32_t>(p[1]) << 8) | p[0];
}
void wr_le32(uint8_t * p, uint32_t v) {
p[0] = static_cast<uint8_t>(v);
p[1] = static_cast<uint8_t>(v >> 8);
p[2] = static_cast<uint8_t>(v >> 16);
p[3] = static_cast<uint8_t>(v >> 24);
}
// the CRC-32 littlefs commits with: reflected 0x04C11DB7, seeded 0xffffffff, no final xor
uint32_t lfs_crc(uint32_t crc, const void * buffer, size_t size) {
static const uint32_t rtable[16] = {
0x00000000,
0x1db71064,
0x3b6e20c8,
0x26d930ac,
0x76dc4190,
0x6b6b51f4,
0x4db26158,
0x5005713c,
0xedb88320,
0xf00f9344,
0xd6d6a3e8,
0xcb61b38c,
0x9b64c2b0,
0x86d3d2d4,
0xa00ae278,
0xbdbdf21c,
};
const uint8_t * data = static_cast<const uint8_t *>(buffer);
for (size_t i = 0; i < size; i++) {
crc = (crc >> 4) ^ rtable[(crc ^ data[i]) & 0xf];
crc = (crc >> 4) ^ rtable[(crc ^ (data[i] >> 4)) & 0xf];
}
return crc;
}
// where the superblock lives, and which bytes the CRC of its commit covers
struct Located {
bool found = false;
uint32_t struct_off = 0; // start of the 24 byte lfs_superblock_t
uint32_t commit_start = 0; // first byte the commit's CRC covers
uint32_t crc_off = 0; // where that CRC is stored
};
// Replays a metadata block's commit chain the same way lfs_dir_fetchmatch() does, keeping
// the last superblock struct that belongs to a commit whose CRC verifies. Reporting
// nothing until a stored CRC matches means a successful scan also proves we are reading
// the tag stream correctly, so we never write back a block we misunderstood.
Located locate_superblock(const uint8_t * buf) {
Located found;
uint32_t off = 0;
uint32_t ptag = 0xffffffff;
uint32_t commit_start = 0;
uint32_t crc = lfs_crc(0xffffffff, buf, 4); // the revision count leads the first commit
bool pending = false;
uint32_t pending_off = 0;
while (true) {
off += tag_dsize(ptag);
if (off + 4 > BLOCK_SIZE) {
break;
}
crc = lfs_crc(crc, &buf[off], 4);
const uint32_t tag = rd_be32(&buf[off]) ^ ptag;
if (!tag_isvalid(tag)) {
break; // nothing committed beyond this point
}
if (off + tag_dsize(tag) > BLOCK_SIZE) {
break;
}
ptag = tag;
if (tag_type2(tag) == TYPE_CCRC) {
if (crc != rd_le32(&buf[off + 4])) {
break; // commit never completed, so the chain ends here
}
if (pending) {
found.found = true;
found.struct_off = pending_off;
found.commit_start = commit_start;
found.crc_off = off + 4;
pending = false;
}
ptag ^= (tag_chunk(tag) & 1u) << 31;
crc = 0xffffffff;
commit_start = off + tag_dsize(tag); // the padding after the CRC is not covered
continue;
}
crc = lfs_crc(crc, &buf[off + 4], tag_dsize(tag) - 4);
if (tag_type3(tag) == TYPE_INLINESTRUCT && tag_id(tag) == 0 && tag_size(tag) == SB_SIZE) {
pending = true;
pending_off = off + 4;
}
}
return found;
}
// resolve the same partition esp_littlefs would pick
const esp_partition_t * find_partition(const char * partition_label) {
if (partition_label != nullptr) {
return esp_partition_find_first(ESP_PARTITION_TYPE_DATA, ESP_PARTITION_SUBTYPE_ANY, partition_label);
}
// 0x83 is the littlefs subtype, 0x82 the spiffs one that older partition tables use
const esp_partition_t * part = esp_partition_find_first(ESP_PARTITION_TYPE_DATA, static_cast<esp_partition_subtype_t>(0x83), nullptr);
if (part != nullptr) {
return part;
}
return esp_partition_find_first(ESP_PARTITION_TYPE_DATA, ESP_PARTITION_SUBTYPE_DATA_SPIFFS, nullptr);
}
bool patch_block(const esp_partition_t * part, uint32_t block, uint8_t * buf) {
const uint32_t addr = block * BLOCK_SIZE;
if (esp_partition_read(part, addr, buf, BLOCK_SIZE) != ESP_OK) {
return false;
}
const Located sb = locate_superblock(buf);
if (!sb.found) {
return false;
}
uint8_t * s = buf + sb.struct_off;
if (rd_le32(s + SB_BLOCK_SIZE) != BLOCK_SIZE) {
return false; // geometry we did not expect means we are not reading a superblock
}
bool changed = false;
if (rd_le32(s + SB_NAME_MAX) > NAME_MAX_SUPPORTED) {
wr_le32(s + SB_NAME_MAX, 0);
changed = true;
}
const uint32_t version = rd_le32(s + SB_VERSION);
if (version > DISK_VERSION_TARGET && (version >> 16) == (DISK_VERSION_TARGET >> 16)) {
wr_le32(s + SB_VERSION, DISK_VERSION_TARGET);
changed = true;
}
if (!changed) {
return false;
}
wr_le32(buf + sb.crc_off, lfs_crc(0xffffffff, buf + sb.commit_start, sb.crc_off - sb.commit_start));
return esp_partition_erase_range(part, addr, BLOCK_SIZE) == ESP_OK && esp_partition_write(part, addr, buf, BLOCK_SIZE) == ESP_OK;
}
} // namespace
bool littlefs_migrate(const char * partition_label) {
const esp_partition_t * part = find_partition(partition_label);
if (part == nullptr) {
return false;
}
uint8_t * buf = static_cast<uint8_t *>(malloc(BLOCK_SIZE));
if (buf == nullptr) {
return false;
}
// Blocks 0 and 1 are the root metadata pair. Rewriting them one at a time keeps one
// readable copy available for littlefs to fall back on if we lose power mid-write.
bool patched = false;
for (uint32_t block = 0; block < 2; block++) {
if (patch_block(part, block, buf)) {
patched = true;
}
}
free(buf);
return patched;
}
} // namespace emsesp
#endif
+31
View File
@@ -0,0 +1,31 @@
/*
* EMS-ESP - https://github.com/emsesp/EMS-ESP
* Copyright 2020-2025 emsesp.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef EMSESP_LITTLEFS_COMPAT_H_
#define EMSESP_LITTLEFS_COMPAT_H_
namespace emsesp {
// Rewrites the superblock of a LittleFS partition created by an Arduino Core 2 build so
// that this build's littlefs will mount it. Only call once a mount has already failed.
// Returns true if flash was changed, meaning another mount attempt is worth making.
bool littlefs_migrate(const char * partition_label = nullptr);
} // namespace emsesp
#endif
+119 -28
View File
@@ -20,6 +20,10 @@
#include "emsesp.h"
#if CONFIG_LWIP_IPV6 && !defined(EMSESP_STANDALONE)
#include <lwip/priv/nd6_priv.h>
#endif
#ifndef NETWORK_FALLBACK_AP_SSID
#define NETWORK_FALLBACK_AP_SSID "ems-esp"
#endif
@@ -154,44 +158,131 @@ bool Network::formatBSSID([[maybe_unused]] const String & bssid, [[maybe_unused]
return true;
}
// get the local IP address of the network interface
std::string Network::getLocalIP() const {
switch (network_iface_) {
// get the soft-AP's own IP address, empty when the AP isn't running
std::string Network::getAPIP() const {
#ifndef EMSESP_STANDALONE
case NetIface::AP:
return WiFi.softAPIP().toString().c_str();
case NetIface::WIFI:
return WiFi.localIP().toString().c_str();
case NetIface::ETHERNET:
return ETH.localIP().toString().c_str();
case NetIface::NONE:
#endif
default:
return "";
const IPAddress ip = WiFi.softAPIP();
if (static_cast<uint32_t>(ip) != 0) {
return ip.toString().c_str();
}
#endif
return "";
}
// get the MAC address of the network interface
std::string Network::getMacAddress() const {
switch (network_iface_) {
#ifndef EMSESP_STANDALONE
case NetIface::AP:
return WiFi.softAPmacAddress().c_str();
case NetIface::WIFI:
return WiFi.macAddress().c_str();
case NetIface::ETHERNET:
return ETH.macAddress().c_str();
case NetIface::NONE:
#endif
default:
return "";
// Every IPv6 address bound to the interface, widest scope first so the address most people need
// comes out on top. linkLocalIPv6() and globalIPv6() each only ever return a single address, so a
// dual-stack host holding both a ULA and a routable GUA would have one of them hidden.
std::vector<Network::IPv6Address> Network::ipv6_addresses([[maybe_unused]] NetworkInterface & netif) {
std::vector<IPv6Address> addresses;
#if CONFIG_LWIP_IPV6
esp_ip6_addr_t raw[CONFIG_LWIP_IPV6_NUM_ADDRESSES];
int found = esp_netif_get_all_ip6(netif.netif(), raw);
if (found <= 0) {
return addresses;
}
struct Scope {
esp_ip6_addr_type_t type;
const char * name;
};
static const Scope scopes[] = {{ESP_IP6_ADDR_IS_GLOBAL, "global"},
{ESP_IP6_ADDR_IS_UNIQUE_LOCAL, "unique local"},
{ESP_IP6_ADDR_IS_SITE_LOCAL, "site local"},
{ESP_IP6_ADDR_IS_LINK_LOCAL, "link local"}};
addresses.reserve(found);
for (const auto & scope : scopes) {
for (int i = 0; i < found; i++) {
IPAddress ip(IPv6, reinterpret_cast<const uint8_t *>(raw[i].addr), raw[i].zone);
if (ip.addr_type() == scope.type) {
addresses.push_back({ip, scope.name});
}
}
}
#endif
return addresses;
}
// Every DNS server configured on the interface. The slots are shared between IPv4 and IPv6, so
// reading only the first couple can hide the IPv4 resolver entirely once IPv6 is in use.
std::vector<IPAddress> Network::dns_servers(const NetworkInterface & netif) {
std::vector<IPAddress> servers;
for (uint8_t i = 0; i < ESP_NETIF_DNS_MAX; i++) {
IPAddress ip = netif.dnsIP(i);
if (ip.type() == IPv4 ? static_cast<uint32_t>(ip) != 0 : ip != IN6ADDR_ANY) {
servers.push_back(ip);
}
}
return servers;
}
#if CONFIG_LWIP_IPV6
namespace {
struct Ipv6GatewayCtx {
int netif_index;
std::vector<IPAddress> * gateways;
};
// runs in the TCP/IP task, where neighbour discovery owns default_router_list
esp_err_t collect_ipv6_gateways(void * ctx) {
auto * args = static_cast<Ipv6GatewayCtx *>(ctx);
for (uint8_t i = 0; i < LWIP_ND6_NUM_ROUTERS; i++) {
const struct nd6_neighbor_cache_entry * router = default_router_list[i].neighbor_entry;
// a null neighbour entry is how nd6_tmr() marks a slot as unused or expired
if (router == nullptr || netif_get_index(router->netif) != args->netif_index) {
continue;
}
const ip6_addr_t * addr = &router->next_hop_address;
args->gateways->push_back(IPAddress(IPv6, reinterpret_cast<const uint8_t *>(addr->addr), ip6_addr_zone(addr)));
}
return ESP_OK;
}
} // namespace
// Every IPv6 default router known on the interface. Routers are learnt from router advertisements
// rather than configured, so there can be more than one and none of them appear in the IPv4-only
// esp_netif_ip_info_t.gw that gatewayIP() returns.
std::vector<IPAddress> Network::ipv6_gateways(NetworkInterface & netif) {
std::vector<IPAddress> gateways;
const int netif_index = esp_netif_get_netif_impl_index(netif.netif());
if (netif_index < 0) {
return gateways;
}
gateways.reserve(LWIP_ND6_NUM_ROUTERS); // allocate before we're inside the TCP/IP task
Ipv6GatewayCtx args = {netif_index, &gateways};
esp_netif_tcpip_exec(collect_ipv6_gateways, &args);
return gateways;
}
#else
std::vector<IPAddress> Network::ipv6_gateways(NetworkInterface &) {
return {};
}
#endif
#endif
// get the soft-AP's own MAC address, empty when the AP isn't running
std::string Network::getAPMacAddress() const {
#ifndef EMSESP_STANDALONE
uint8_t mac[6];
if (WiFi.softAPmacAddress(mac) != nullptr) { // null once the AP netif is gone
return WiFi.softAPmacAddress().c_str();
}
#endif
return "";
}
// get the number of sessions connected to the AP
uint8_t Network::getStationNum() const {
uint8_t Network::getAPStationNum() const {
#ifndef EMSESP_STANDALONE
return network_iface_ == NetIface::AP ? WiFi.softAPgetStationNum() : 0;
return WiFi.softAPgetStationNum();
#else
return 0;
#endif
+19 -3
View File
@@ -21,6 +21,7 @@
#ifndef EMSESP_STANDALONE
#include <esp_mac.h>
#include <esp_netif.h>
#include <esp_wifi.h>
#include <ETH.h>
#include <WiFi.h>
@@ -30,6 +31,7 @@
#endif
#include <cstring>
#include <vector>
#include <esp32-psram.h>
#include <uuid/log.h>
@@ -132,11 +134,25 @@ class Network {
return reconnect_count_;
}
std::string getLocalIP() const;
std::string getMacAddress() const;
uint8_t getStationNum() const;
// the soft-AP's own details, which are what the Access Point status page reports
std::string getAPIP() const;
std::string getAPMacAddress() const;
uint8_t getAPStationNum() const;
const char * ethernet_status() const;
#ifndef EMSESP_STANDALONE
// an IPv6 address together with a readable scope, e.g. "global" or "link local"
struct IPv6Address {
IPAddress ip;
const char * scope;
};
static std::vector<IPv6Address> ipv6_addresses(NetworkInterface & netif);
static std::vector<IPAddress> dns_servers(const NetworkInterface & netif);
static std::vector<IPAddress> ipv6_gateways(NetworkInterface & netif);
#endif
void reconnect();
// ask for a reconnect() to run from the next Network::loop()
+56 -33
View File
@@ -98,16 +98,51 @@ static void sendmail_tls_handshake(bool & success) {
success = sendmail_ssl_client != nullptr && sendmail_ssl_client->connectSSL();
}
// The DNS slots are shared between IPv4 and IPv6, so with IPv6 enabled the first slot can hold an
// IPv6 server. Pick the first IPv4 one so it matches the label we print it under.
static IPAddress dns_ipv4(const NetworkInterface & netif) {
for (uint8_t i = 0; i < ESP_NETIF_DNS_MAX; i++) {
IPAddress ip = netif.dnsIP(i);
if (ip.type() == IPv4 && static_cast<uint32_t>(ip) != 0) {
return ip;
// Print the full set of addresses for an interface. Every DNS server is listed, labelled with its
// own family since the slots are shared, and every IPv6 address with its scope.
static void show_addresses(uuid::console::Shell & shell, NetworkInterface & netif) {
shell.printfln(" IPv4 address: %s/%s", uuid::printable_to_string(netif.localIP()).c_str(), uuid::printable_to_string(netif.subnetMask()).c_str());
shell.printfln(" IPv4 gateway: %s", uuid::printable_to_string(netif.gatewayIP()).c_str());
for (const auto & dns : Network::dns_servers(netif)) {
shell.printfln(" %s DNS Server: %s", dns.type() == IPv4 ? "IPv4" : "IPv6", uuid::printable_to_string(dns).c_str());
}
for (const auto & ipv6 : Network::ipv6_addresses(netif)) {
shell.printfln(" IPv6 address: %s (%s)", uuid::printable_to_string(ipv6.ip).c_str(), ipv6.scope);
}
for (const auto & gateway : Network::ipv6_gateways(netif)) {
shell.printfln(" IPv6 gateway: %s", uuid::printable_to_string(gateway).c_str());
}
}
// Add the full set of addresses for an interface to a JSON document, both families.
static void add_addresses(JsonDocument & doc, NetworkInterface & netif) {
doc["MAC"] = netif.macAddress();
doc["IPv4 address"] = uuid::printable_to_string(netif.localIP()) + "/" + uuid::printable_to_string(netif.subnetMask());
doc["IPv4 gateway"] = uuid::printable_to_string(netif.gatewayIP());
auto servers = Network::dns_servers(netif);
if (!servers.empty()) {
JsonArray dns = doc["DNS Server"].to<JsonArray>();
for (const auto & ip : servers) {
dns.add(uuid::printable_to_string(ip));
}
}
auto found = Network::ipv6_addresses(netif);
if (!found.empty()) {
JsonArray addresses = doc["IPv6 address"].to<JsonArray>();
for (const auto & ipv6 : found) {
addresses.add(uuid::printable_to_string(ipv6.ip));
}
}
auto gateways = Network::ipv6_gateways(netif);
if (!gateways.empty()) {
JsonArray routers = doc["IPv6 gateway"].to<JsonArray>();
for (const auto & ip : gateways) {
routers.add(uuid::printable_to_string(ip));
}
}
return IPAddress();
}
#endif
@@ -452,7 +487,8 @@ void System::get_partition_info() {
auto current_partition = (const char *)esp_ota_get_running_partition()->label;
// update the current version and partition name in NVS if not already set
if (EMSESP::nvs_.getString(current_partition) != EMSESP_APP_VERSION || emsesp::EMSESP::nvs_.getBool(emsesp::EMSESP_NVS_BOOT_NEW_FIRMWARE, true)) {
if (!EMSESP::nvs_.isKey(current_partition) || EMSESP::nvs_.getString(current_partition) != EMSESP_APP_VERSION
|| emsesp::EMSESP::nvs_.getBool(emsesp::EMSESP_NVS_BOOT_NEW_FIRMWARE, true)) {
EMSESP::nvs_.putBool(emsesp::EMSESP_NVS_BOOT_NEW_FIRMWARE, false);
EMSESP::nvs_.putString(current_partition, EMSESP_APP_VERSION);
char c[20];
@@ -484,7 +520,9 @@ void System::get_partition_info() {
if (is_valid) {
PartitionInfo p_info;
// if there is an entry for this partition in NVS, get it's version from NVS
p_info.version = EMSESP::nvs_.getString(part->label, "").c_str();
if (EMSESP::nvs_.isKey(part->label)) {
p_info.version = EMSESP::nvs_.getString(part->label).c_str();
}
char c[20];
snprintf(c, sizeof(c), "d_%s", (const char *)part->label);
time_t d = EMSESP::nvs_.getULong(c, 0);
@@ -893,18 +931,13 @@ void System::send_info_mqtt() {
if (EMSESP::network_.ethernet_connected()) {
doc["network"] = "ethernet";
doc["hostname"] = ETH.getHostname();
add_addresses(doc, ETH);
} else if (EMSESP::network_.wifi_connected()) {
doc["network"] = "wifi";
doc["hostname"] = WiFi.getHostname();
doc["SSID"] = WiFi.SSID();
doc["BSSID"] = WiFi.BSSIDstr();
doc["MAC"] = WiFi.macAddress();
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 DNS Server"] = uuid::printable_to_string(dns_ipv4(WiFi.STA));
if (WiFi.linkLocalIPv6().toString() != "0000:0000:0000:0000:0000:0000:0000:0000" && WiFi.linkLocalIPv6().toString() != "::") {
doc["IPv6 address"] = uuid::printable_to_string(WiFi.linkLocalIPv6());
}
doc["network"] = "wifi";
doc["hostname"] = WiFi.getHostname();
doc["SSID"] = WiFi.SSID();
doc["BSSID"] = WiFi.BSSIDstr();
add_addresses(doc, WiFi.STA);
}
#endif
Mqtt::queue_publish_retain(F_(info), doc.as<JsonObject>()); // topic called "info" and it's Retained
@@ -1266,12 +1299,7 @@ void System::show_system(uuid::console::Shell & shell) {
shell.printfln(" TxPower: %s dBm", Helpers::render_value(result, (double)(WiFi.getTxPower() / 4), 1));
shell.printfln(" MAC address: %s", WiFi.macAddress().c_str());
shell.printfln(" Hostname: %s", WiFi.getHostname());
shell.printfln(" IPv4 address: %s/%s", uuid::printable_to_string(WiFi.localIP()).c_str(), uuid::printable_to_string(WiFi.subnetMask()).c_str());
shell.printfln(" IPv4 gateway: %s", uuid::printable_to_string(WiFi.gatewayIP()).c_str());
shell.printfln(" IPv4 DNS Server: %s", uuid::printable_to_string(dns_ipv4(WiFi.STA)).c_str());
if (WiFi.linkLocalIPv6().toString() != "0000:0000:0000:0000:0000:0000:0000:0000" && WiFi.linkLocalIPv6().toString() != "::") {
shell.printfln(" IPv6 address: %s", uuid::printable_to_string(WiFi.linkLocalIPv6()).c_str());
}
show_addresses(shell, WiFi.STA);
break;
case WL_CONNECT_FAILED:
@@ -1301,12 +1329,7 @@ void System::show_system(uuid::console::Shell & shell) {
if (EMSESP::network_.ethernet_connected()) {
shell.printfln(" Ethernet MAC address: %s", ETH.macAddress().c_str());
shell.printfln(" Hostname: %s", ETH.getHostname());
shell.printfln(" IPv4 address: %s/%s", uuid::printable_to_string(ETH.localIP()).c_str(), uuid::printable_to_string(ETH.subnetMask()).c_str());
shell.printfln(" IPv4 gateway: %s", uuid::printable_to_string(ETH.gatewayIP()).c_str());
shell.printfln(" IPv4 DNS Server: %s", uuid::printable_to_string(dns_ipv4(ETH)).c_str());
if (ETH.linkLocalIPv6().toString() != "0000:0000:0000:0000:0000:0000:0000:0000" && ETH.linkLocalIPv6().toString() != "::") {
shell.printfln(" IPv6 address: %s", uuid::printable_to_string(ETH.linkLocalIPv6()).c_str());
}
show_addresses(shell, ETH);
}
// show AP is connected
+1 -1
View File
@@ -199,7 +199,7 @@ void TemperatureSensor::loop() {
if (firstscan_ > 0 && set_internal_) {
set_internal_ = false;
Sensor * s = &sensors_[0];
if (firstscan_ > 1) {
if (firstscan_ > 1 && EMSESP::nvs_.isKey("intTemp")) {
std::string s_nvs = EMSESP::nvs_.getString("intTemp").c_str();
for (uint8_t i = 0; i < firstscan_; i++) {
if (s_nvs == sensors_[i].id()) {
+1 -1
View File
@@ -1 +1 @@
#define EMSESP_APP_VERSION "3.9.0-dev.11"
#define EMSESP_APP_VERSION "3.9.0-dev.12"
+3 -3
View File
@@ -465,7 +465,7 @@ void WebSettings::set_board_profile(WebSettings & settings) {
String bbq_board = EMSESP::system_.getBBQKeesGatewayDetails(FUSE_VALUE::BOARD);
if (!bbq_board.isEmpty() && settings.board_profile != "CUSTOM") {
#if defined(EMSESP_DEBUG)
EMSESP::logger().info("Overriding board profile with eFuse value %s", bbq_board.c_str());
EMSESP::logger().debug("Overriding board profile with eFuse value %s", bbq_board.c_str());
#endif
settings.board_profile = bbq_board;
}
@@ -532,9 +532,9 @@ void WebSettings::set_board_profile(WebSettings & settings) {
#ifndef EMSESP_STANDALONE
uint32_t psram_size = ESP.getPsramSize() / 1024; // in KB
if (psram_size > 0) {
EMSESP::logger().info("Loaded board profile %s (PSRAM: %lu KB)", settings.board_profile.c_str(), psram_size);
EMSESP::logger().info("Applied board profile %s (PSRAM: %lu KB)", settings.board_profile.c_str(), psram_size);
} else {
EMSESP::logger().info("Loaded board profile %s (PSRAM: not available)", settings.board_profile.c_str());
EMSESP::logger().info("Applied board profile %s (PSRAM: not available)", settings.board_profile.c_str());
}
#endif
+7 -6
View File
@@ -258,9 +258,9 @@ void WebStatusService::action(AsyncWebServerRequest * request, JsonVariant json)
// action = upgradeImportantMessages
// returns the type of upgrade important message to display in the UI
// 0 = no message (if just a minor version upgrade)
// 1 = going from <= 3.8 to 3.9 (has new partition layout)
// 2 = major version upgrade
// 0 = no message (if just a minor version upgrade)
// 1 = special message for upgrades (no longer used)
// 2 = major version upgrade
// version can be like 3.8.2 or a filename like EMS-ESP-3_8_2-dev_13-ESP32-16MB+.bin
uint8_t WebStatusService::upgradeImportantMessages(std::string & version) {
if (version.empty()) {
@@ -307,9 +307,10 @@ uint8_t WebStatusService::upgradeImportantMessages(std::string & version) {
return 0; // no upgrade (same version or downgrade)
}
if (current_version < FirmwareVersion("3.9.0-dev.0") && latest_version.major() == 3 && latest_version.minor() == 9) {
return 1; // upgrading to 3.9.x from anything older - new partition layout warning
}
// case "1" is no longer used
// if (current_version < FirmwareVersion("3.9.0-dev.0") && latest_version.major() == 3 && latest_version.minor() == 9) {
// return 1; // upgrading to 3.9.x from anything older - new partition layout warning
// }
if (current_version.major() < latest_version.major()) {
return 2; // major version upgrade