This commit is contained in:
Mateusz Gruszczyński
2026-09-18 12:26:48 +02:00
parent 8d96ad2d38
commit 00cbe975bb
21 changed files with 231 additions and 106 deletions
+2 -2
View File
@@ -1263,7 +1263,7 @@
<h2 data-i18n="discovery.title">Discover GREE devices</h2><button type="button" data-close
data-ui-icon="close"></button>
</div>
<p class="field-note" data-i18n="discovery.help">Auto accepts both AES-ECB and AES-GCM devices. Selecting V1 or V2 accepts and binds only that protocol. Multiple passes improve discovery when several Wi-Fi modules answer the same broadcast.</p>
<p class="field-note" data-i18n="discovery.help">Auto accepts both AES-ECB and AES-GCM devices, uses discovery metadata only as a protocol hint and verifies the actual protocol during binding. Selecting V1 or V2 keeps discovery and binding locked to that protocol. Multiple passes improve discovery when several Wi-Fi modules answer the same broadcast.</p>
<label><span data-i18n="discovery.protocol">Discovery protocol</span><select name="protocol_version">
<option value="0" data-i18n="devices.protocolAuto">Auto (V1 + V2)</option>
<option value="1">V1 AES-ECB</option>
@@ -1284,7 +1284,7 @@
<h2 data-i18n="discovery.nameDevices">Discovered local devices</h2><button type="button" data-close
data-ui-icon="close"></button>
</div>
<p class="field-note" data-i18n="discovery.nameDevicesHelp">Select the units you want to add. MAC address, IP address and detected protocol are shown for every result.</p>
<p class="field-note" data-i18n="discovery.nameDevicesHelp">Select the units you want to add. MAC address, IP address and the discovery protocol hint are shown for every result; Auto is resolved during binding.</p>
<div id="discoveryNamesList" class="discovery-name-list"></div>
<div class="form-actions"><button type="button" class="secondary" data-close
data-i18n="actions.cancel">Cancel</button><button class="primary" type="submit"
+2 -1
View File
@@ -476,7 +476,8 @@ function showDiscoveryNames(devices) {
if (!list) return;
list.innerHTML = items.length ? items.map((device, index) => {
const alreadyAdded = device.already_added === true;
const protocol = Number(device.protocol_version) === 2 ? 'V2 AES-GCM' : 'V1 AES-ECB';
const protocolVersion = Number(device.protocol_version);
const protocol = protocolVersion === 2 ? 'V2 AES-GCM' : protocolVersion === 1 ? 'V1 AES-ECB' : tr('devices.protocolAuto');
const selectorId = `local-discovery-${index}`;
return `<div class="discovery-name-row local-discovery-row">
<div class="local-discovery-head">