mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-10-28 11:14:58 +00:00
Compare commits
4
Commits
b333b2871c
...
421060f69d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
421060f69d | ||
|
|
7a338f465d | ||
|
|
307ae9247f | ||
|
|
323fdc8e4c |
@@ -27,6 +27,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)
|
||||
|
||||
@@ -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",
|
||||
|
||||
Generated
+86
-86
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
</>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
Generated
+15
-15
@@ -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: {}
|
||||
|
||||
@@ -580,7 +580,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 +612,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 +624,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
|
||||
};
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
+20
-14
@@ -1723,17 +1723,23 @@ void EMSESP::start() {
|
||||
|
||||
// start the file system
|
||||
#ifndef EMSESP_STANDALONE
|
||||
#if defined(EMSESP_DEBUG)
|
||||
// don't format the filesystem in debug mode
|
||||
if (!LittleFS.begin(false)) {
|
||||
LOG_ERROR("LittleFS Mount Failed. Attempting to convert...");
|
||||
return;
|
||||
} else {
|
||||
// it mounted, show the contents of the root directory
|
||||
LOG_DEBUG("Listing root directory before:");
|
||||
system_.listDir("/", 3);
|
||||
}
|
||||
#else
|
||||
// format filesystem if there isn't one
|
||||
if (!LittleFS.begin(true)) {
|
||||
LOG_ERROR("LittleFS Mount Failed");
|
||||
return;
|
||||
}
|
||||
// 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
|
||||
// }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// do a quick scan of the filesystem to see if we a settings file in the /config folder
|
||||
@@ -1746,7 +1752,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 +1772,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 +1824,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.");
|
||||
|
||||
+119
-28
@@ -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
@@ -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()
|
||||
|
||||
+51
-31
@@ -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
|
||||
|
||||
@@ -893,18 +928,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 +1296,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 +1326,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 @@
|
||||
#define EMSESP_APP_VERSION "3.9.0-dev.11"
|
||||
#define EMSESP_APP_VERSION "3.9.0-dev.12"
|
||||
|
||||
Reference in New Issue
Block a user