genieacs: alterar senha WiFi
Signed-off-by: Rodrigo Bertoldo de Sousa Martins <rodrigo.sousa.577@gmail.com>
This commit is contained in:
1 parent
6e0ad2b42d
commit
c4e35028f6
2 files changed
+18
No files matched your search
@@ -1169,8 +1169,10 @@ Digite /help para ver todos os comandos disponíveis!
|
|||||||
msgCPE += ` 🔧 SW: ${esc(d.softwareVersion)}\n`;
|
msgCPE += ` 🔧 SW: ${esc(d.softwareVersion)}\n`;
|
||||||
if (tagLabel) msgCPE += ` 🏷️ TAG: \`${tagLabel}\`\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.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.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.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`;
|
if (d.clients5 !== null && d.clients5 !== undefined) msgCPE += ` 👥 Clientes 5GHz: ${esc(d.clients5)}\n`;
|
||||||
|
|
||||||
// PPPoE WAN
|
// PPPoE WAN
|
||||||
@@ -7450,11 +7452,13 @@ Digite /help para ver todos os comandos disponíveis!
|
|||||||
`└ SW: ${esc(d.softwareVersion)}\n\n` +
|
`└ SW: ${esc(d.softwareVersion)}\n\n` +
|
||||||
`📶 *Wi-Fi 2.4 GHz*\n` +
|
`📶 *Wi-Fi 2.4 GHz*\n` +
|
||||||
`├ SSID: ${esc(d.ssid24)}\n` +
|
`├ SSID: ${esc(d.ssid24)}\n` +
|
||||||
|
`├ Senha: \`${esc(d.senha24)}\`\n` +
|
||||||
`├ Canal: ${esc(d.channel24)}\n` +
|
`├ Canal: ${esc(d.channel24)}\n` +
|
||||||
`├ Auto-Canal: ${esc(d.autoChannel24)}\n` +
|
`├ Auto-Canal: ${esc(d.autoChannel24)}\n` +
|
||||||
`└ Clientes: ${d.clients24 !== null && d.clients24 !== undefined ? esc(d.clients24) : 'N/A'}\n\n` +
|
`└ Clientes: ${d.clients24 !== null && d.clients24 !== undefined ? esc(d.clients24) : 'N/A'}\n\n` +
|
||||||
`📶 *Wi-Fi 5 GHz*\n` +
|
`📶 *Wi-Fi 5 GHz*\n` +
|
||||||
`├ SSID: ${esc(d.ssid5)}\n` +
|
`├ SSID: ${esc(d.ssid5)}\n` +
|
||||||
|
`├ Senha: \`${esc(d.senha5)}\`\n` +
|
||||||
`├ Canal: ${esc(d.channel5)}\n` +
|
`├ Canal: ${esc(d.channel5)}\n` +
|
||||||
`├ Auto-Canal: ${esc(d.autoChannel5)}\n` +
|
`├ Auto-Canal: ${esc(d.autoChannel5)}\n` +
|
||||||
`└ Clientes: ${d.clients5 !== null && d.clients5 !== undefined ? esc(d.clients5) : 'N/A'}`;
|
`└ 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 {
|
return {
|
||||||
ssid24: { label: 'SSID 2.4GHz', param: 'InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.SSID', type: 'xsd:string', toggle: false },
|
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 },
|
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 },
|
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 },
|
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 },
|
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` +
|
`📌 ${esc(instance)} — \`${esc(device.serial)}\`\n\n` +
|
||||||
`📶 *Wi-Fi 2.4 GHz*\n` +
|
`📶 *Wi-Fi 2.4 GHz*\n` +
|
||||||
`├ SSID: ${esc(device.ssid24)}\n` +
|
`├ SSID: ${esc(device.ssid24)}\n` +
|
||||||
|
`├ Senha: \`${esc(device.senha24)}\`\n` +
|
||||||
`├ Canal: ${esc(device.channel24)} (Auto: ${esc(device.autoChannel24)})\n\n` +
|
`├ Canal: ${esc(device.channel24)} (Auto: ${esc(device.autoChannel24)})\n\n` +
|
||||||
`📶 *Wi-Fi 5 GHz*\n` +
|
`📶 *Wi-Fi 5 GHz*\n` +
|
||||||
`├ SSID: ${esc(device.ssid5)}\n` +
|
`├ SSID: ${esc(device.ssid5)}\n` +
|
||||||
|
`├ Senha: \`${esc(device.senha5)}\`\n` +
|
||||||
`├ Canal: ${esc(device.channel5)} (Auto: ${esc(device.autoChannel5)})\n\n` +
|
`├ Canal: ${esc(device.channel5)} (Auto: ${esc(device.autoChannel5)})\n\n` +
|
||||||
`🌐 *WAN/PPPoE*\n` +
|
`🌐 *WAN/PPPoE*\n` +
|
||||||
`├ DNS WAN: ${esc(device.dnsWAN)}\n\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 2.4GHz', callback_data: 'router_cfg_ssid24' },
|
||||||
{ text: '📶 SSID 5GHz', callback_data: 'router_cfg_ssid5' },
|
{ 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: `${auto24On ? '✅' : '⬜'} Auto-Canal 2.4`, callback_data: 'router_cfg_auto24' },
|
||||||
{ text: `${auto5On ? '✅' : '⬜'} Auto-Canal 5`, callback_data: 'router_cfg_auto5' },
|
{ 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
|
// Valor atual para mostrar ao usuário
|
||||||
const fieldToCurrent = {
|
const fieldToCurrent = {
|
||||||
ssid24: 'ssid24', ssid5: 'ssid5',
|
ssid24: 'ssid24', ssid5: 'ssid5',
|
||||||
|
senha24: 'senha24', senha5: 'senha5',
|
||||||
dnswan: 'dnsWAN', dnslan: 'dnsLAN',
|
dnswan: 'dnsWAN', dnslan: 'dnsLAN',
|
||||||
dhcpstart: 'dhcpInicio', dhcpend: 'dhcpFim',
|
dhcpstart: 'dhcpInicio', dhcpend: 'dhcpFim',
|
||||||
iplan: 'ipLAN', mascaralan: 'mascaraLAN',
|
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
|
// Atualiza o device local com o novo valor para o menu refletir
|
||||||
const fieldToDeviceKey = {
|
const fieldToDeviceKey = {
|
||||||
ssid24: 'ssid24', ssid5: 'ssid5',
|
ssid24: 'ssid24', ssid5: 'ssid5',
|
||||||
|
senha24: 'senha24', senha5: 'senha5',
|
||||||
ch24: 'channel24', ch5: 'channel5',
|
ch24: 'channel24', ch5: 'channel5',
|
||||||
dnswan: 'dnsWAN', dnslan: 'dnsLAN',
|
dnswan: 'dnsWAN', dnslan: 'dnsLAN',
|
||||||
dhcpstart: 'dhcpInicio', dhcpend: 'dhcpFim',
|
dhcpstart: 'dhcpInicio', dhcpend: 'dhcpFim',
|
||||||
|
|||||||
@@ -20,10 +20,12 @@ const DEVICE_PROJECTION = [
|
|||||||
'InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.AutoChannelEnable',
|
'InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.AutoChannelEnable',
|
||||||
'InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.Channel',
|
'InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.Channel',
|
||||||
'InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.TotalAssociations',
|
'InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.TotalAssociations',
|
||||||
|
'InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.PreSharedKey.1.KeyPassphrase',
|
||||||
'InternetGatewayDevice.LANDevice.1.WLANConfiguration.2.SSID',
|
'InternetGatewayDevice.LANDevice.1.WLANConfiguration.2.SSID',
|
||||||
'InternetGatewayDevice.LANDevice.1.WLANConfiguration.2.AutoChannelEnable',
|
'InternetGatewayDevice.LANDevice.1.WLANConfiguration.2.AutoChannelEnable',
|
||||||
'InternetGatewayDevice.LANDevice.1.WLANConfiguration.2.Channel',
|
'InternetGatewayDevice.LANDevice.1.WLANConfiguration.2.Channel',
|
||||||
'InternetGatewayDevice.LANDevice.1.WLANConfiguration.2.TotalAssociations',
|
'InternetGatewayDevice.LANDevice.1.WLANConfiguration.2.TotalAssociations',
|
||||||
|
'InternetGatewayDevice.LANDevice.1.WLANConfiguration.2.PreSharedKey.1.KeyPassphrase',
|
||||||
// PPPoE WAN
|
// PPPoE WAN
|
||||||
'InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Username',
|
'InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Username',
|
||||||
'InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.ConnectionStatus',
|
'InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.ConnectionStatus',
|
||||||
@@ -285,10 +287,12 @@ class GenieACSApi {
|
|||||||
autoChannel24 : autoChannel24 === true || autoChannel24 === 'true' || autoChannel24 === '1' ? 'Sim' : 'Não',
|
autoChannel24 : autoChannel24 === true || autoChannel24 === 'true' || autoChannel24 === '1' ? 'Sim' : 'Não',
|
||||||
channel24 : get('InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.Channel'),
|
channel24 : get('InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.Channel'),
|
||||||
clients24 : get('InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.TotalAssociations'),
|
clients24 : get('InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.TotalAssociations'),
|
||||||
|
senha24 : get('InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.PreSharedKey.1.KeyPassphrase'),
|
||||||
ssid5 : get('InternetGatewayDevice.LANDevice.1.WLANConfiguration.2.SSID'),
|
ssid5 : get('InternetGatewayDevice.LANDevice.1.WLANConfiguration.2.SSID'),
|
||||||
autoChannel5 : autoChannel5 === true || autoChannel5 === 'true' || autoChannel5 === '1' ? 'Sim' : 'Não',
|
autoChannel5 : autoChannel5 === true || autoChannel5 === 'true' || autoChannel5 === '1' ? 'Sim' : 'Não',
|
||||||
channel5 : get('InternetGatewayDevice.LANDevice.1.WLANConfiguration.2.Channel'),
|
channel5 : get('InternetGatewayDevice.LANDevice.1.WLANConfiguration.2.Channel'),
|
||||||
clients5 : get('InternetGatewayDevice.LANDevice.1.WLANConfiguration.2.TotalAssociations'),
|
clients5 : get('InternetGatewayDevice.LANDevice.1.WLANConfiguration.2.TotalAssociations'),
|
||||||
|
senha5 : get('InternetGatewayDevice.LANDevice.1.WLANConfiguration.2.PreSharedKey.1.KeyPassphrase'),
|
||||||
// PPPoE WAN
|
// PPPoE WAN
|
||||||
pppoeUsername : get('InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Username'),
|
pppoeUsername : get('InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Username'),
|
||||||
pppoeStatus : get('InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.ConnectionStatus'),
|
pppoeStatus : get('InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.ConnectionStatus'),
|
||||||
|
|||||||
Reference in new issue
Block a user