genieacs: alterar senha WiFi

Signed-off-by: Rodrigo Bertoldo de Sousa Martins <rodrigo.sousa.577@gmail.com>
This commit is contained in:
rodrigo committed 2026-04-02 21:34:40 -03:00
1 parent 6e0ad2b42d
commit c4e35028f6
2 files changed
+18

No files matched your search

+14
View File
@@ -1169,8 +1169,10 @@ Digite /help para ver todos os comandos disponíveis!
msgCPE += ` 🔧 SW: ${esc(d.softwareVersion)}\n`;
if (tagLabel) msgCPE += ` 🏷️ TAG: \`${tagLabel}\`\n`;
if (d.ssid24) msgCPE += ` 📶 SSID 2.4GHz: ${esc(d.ssid24)} (Canal ${esc(d.channel24)}, Auto: ${esc(d.autoChannel24)})\n`;
if (d.senha24) msgCPE += ` 🔑 Senha 2.4GHz: \`${esc(d.senha24)}\`\n`;
if (d.clients24 !== null && d.clients24 !== undefined) msgCPE += ` 👥 Clientes 2.4GHz: ${esc(d.clients24)}\n`;
if (d.ssid5) msgCPE += ` 📶 SSID 5GHz: ${esc(d.ssid5)} (Canal ${esc(d.channel5)}, Auto: ${esc(d.autoChannel5)})\n`;
if (d.senha5) msgCPE += ` 🔑 Senha 5GHz: \`${esc(d.senha5)}\`\n`;
if (d.clients5 !== null && d.clients5 !== undefined) msgCPE += ` 👥 Clientes 5GHz: ${esc(d.clients5)}\n`;
// PPPoE WAN
@@ -7450,11 +7452,13 @@ Digite /help para ver todos os comandos disponíveis!
`└ SW: ${esc(d.softwareVersion)}\n\n` +
`📶 *Wi-Fi 2.4 GHz*\n` +
`├ SSID: ${esc(d.ssid24)}\n` +
`├ Senha: \`${esc(d.senha24)}\`\n` +
`├ Canal: ${esc(d.channel24)}\n` +
`├ Auto-Canal: ${esc(d.autoChannel24)}\n` +
`└ Clientes: ${d.clients24 !== null && d.clients24 !== undefined ? esc(d.clients24) : 'N/A'}\n\n` +
`📶 *Wi-Fi 5 GHz*\n` +
`├ SSID: ${esc(d.ssid5)}\n` +
`├ Senha: \`${esc(d.senha5)}\`\n` +
`├ Canal: ${esc(d.channel5)}\n` +
`├ Auto-Canal: ${esc(d.autoChannel5)}\n` +
`└ Clientes: ${d.clients5 !== null && d.clients5 !== undefined ? esc(d.clients5) : 'N/A'}`;
@@ -7500,6 +7504,8 @@ Digite /help para ver todos os comandos disponíveis!
return {
ssid24: { label: 'SSID 2.4GHz', param: 'InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.SSID', type: 'xsd:string', toggle: false },
ssid5: { label: 'SSID 5GHz', param: 'InternetGatewayDevice.LANDevice.1.WLANConfiguration.2.SSID', type: 'xsd:string', toggle: false },
senha24: { label: 'Senha Wi-Fi 2.4', param: 'InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.PreSharedKey.1.KeyPassphrase', type: 'xsd:string', toggle: false },
senha5: { label: 'Senha Wi-Fi 5', param: 'InternetGatewayDevice.LANDevice.1.WLANConfiguration.2.PreSharedKey.1.KeyPassphrase', type: 'xsd:string', toggle: false },
ch24: { label: 'Canal 2.4GHz', param: 'InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.Channel', type: 'xsd:unsignedInt', toggle: false },
ch5: { label: 'Canal 5GHz', param: 'InternetGatewayDevice.LANDevice.1.WLANConfiguration.2.Channel', type: 'xsd:unsignedInt', toggle: false },
auto24: { label: 'Auto-Canal 2.4', param: 'InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.AutoChannelEnable', type: 'xsd:boolean', toggle: true },
@@ -7574,9 +7580,11 @@ Digite /help para ver todos os comandos disponíveis!
`📌 ${esc(instance)} — \`${esc(device.serial)}\`\n\n` +
`📶 *Wi-Fi 2.4 GHz*\n` +
`├ SSID: ${esc(device.ssid24)}\n` +
`├ Senha: \`${esc(device.senha24)}\`\n` +
`├ Canal: ${esc(device.channel24)} (Auto: ${esc(device.autoChannel24)})\n\n` +
`📶 *Wi-Fi 5 GHz*\n` +
`├ SSID: ${esc(device.ssid5)}\n` +
`├ Senha: \`${esc(device.senha5)}\`\n` +
`├ Canal: ${esc(device.channel5)} (Auto: ${esc(device.autoChannel5)})\n\n` +
`🌐 *WAN/PPPoE*\n` +
`├ DNS WAN: ${esc(device.dnsWAN)}\n\n` +
@@ -7594,6 +7602,10 @@ Digite /help para ver todos os comandos disponíveis!
{ text: '📶 SSID 2.4GHz', callback_data: 'router_cfg_ssid24' },
{ text: '📶 SSID 5GHz', callback_data: 'router_cfg_ssid5' },
],
[
{ text: '🔑 Senha 2.4GHz', callback_data: 'router_cfg_senha24' },
{ text: '🔑 Senha 5GHz', callback_data: 'router_cfg_senha5' },
],
[
{ text: `${auto24On ? '✅' : '⬜'} Auto-Canal 2.4`, callback_data: 'router_cfg_auto24' },
{ text: `${auto5On ? '✅' : '⬜'} Auto-Canal 5`, callback_data: 'router_cfg_auto5' },
@@ -7752,6 +7764,7 @@ Digite /help para ver todos os comandos disponíveis!
// Valor atual para mostrar ao usuário
const fieldToCurrent = {
ssid24: 'ssid24', ssid5: 'ssid5',
senha24: 'senha24', senha5: 'senha5',
dnswan: 'dnsWAN', dnslan: 'dnsLAN',
dhcpstart: 'dhcpInicio', dhcpend: 'dhcpFim',
iplan: 'ipLAN', mascaralan: 'mascaraLAN',
@@ -7839,6 +7852,7 @@ Digite /help para ver todos os comandos disponíveis!
// Atualiza o device local com o novo valor para o menu refletir
const fieldToDeviceKey = {
ssid24: 'ssid24', ssid5: 'ssid5',
senha24: 'senha24', senha5: 'senha5',
ch24: 'channel24', ch5: 'channel5',
dnswan: 'dnsWAN', dnslan: 'dnsLAN',
dhcpstart: 'dhcpInicio', dhcpend: 'dhcpFim',