Ont Pon Rx Power

Hi Guys, I have two type of ONT ,Nokia and Huawei.
I want to display Rx Power of both ONT on Index page.
But both ONT have different method to get Rx power
Nokia ONT: InternetGatewayDevice.X_ALU_OntOpticalParam.RXPower
Huawei ONT : InternetGatewayDevice.WANDevice.1.X_GponInterafceConfig.RXPower

What can I do display Rx Power in "Pon Rx Power " in index page . I have added new column named : "Pon Rx Power

Thanks.

https://docs.genieacs.com/en/latest/virtual-parameters.html

Thanks Dan Morphis
For Quick Reply.

@pankaj231
Have You Solved Display RX Power in “PON RX Power” in index page.Plz share details.

Find ont rx power from Internetgateway
Devices haves different ont rx power values in internetgateway.devices

Add the same to Index page

@akcoder @pankaj231 Plz Hemp and Corrent me I have Huawei Brand ONT.

“Admin>Provisions>Default” Script is like below.

const hourly = Date.now(3600000);

// Refresh basic parameters hourly
declare(“InternetGatewayDevice.DeviceInfo.HardwareVersion”, {path: hourly, value: hourly});
declare(“InternetGatewayDevice.DeviceInfo.SoftwareVersion”, {path: hourly, value: hourly});
declare(“InternetGatewayDevice.WANDevice..WANConnectionDevice..WANIPConnection..MACAddress", {path: hourly, value: hourly});
declare("InternetGatewayDevice.WANDevice.
.WANConnectionDevice..WANIPConnection..ExternalIPAddress”, {path: hourly, value: hourly});
declare(“InternetGatewayDevice.LANDevice..WLANConfiguration..SSID”, {path: hourly, value: hourly});
// Don’t refresh password field periodically because CPEs always report blank passowrds for security reasons
declare(“InternetGatewayDevice.LANDevice..WLANConfiguration..KeyPassphrase”, {path: hourly, value: 1});
declare(“InternetGatewayDevice.LANDevice..WLANConfiguration..PreSharedKey”, {path: hourly, value: 1});
declare(“InternetGatewayDevice.LANDevice..WLANConfiguration..Channel”, {path: hourly, value: hourly});
declare(“InternetGatewayDevice.LANDevice..WLANConfiguration..AutoChannelEnable”, {path: hourly, value: hourly});
declare(“InternetGatewayDevice.LANDevice..Hosts.Host..HostName”, {path: hourly, value: hourly});
declare(“InternetGatewayDevice.LANDevice..Hosts.Host..IPAddress”, {path: hourly, value: hourly});
declare(“InternetGatewayDevice.LANDevice..Hosts.Host..MACAddress”, {path: hourly, value: hourly});
//For Optical RX and Tx Power of Hauwei ont
declare(“InternetGatewayDevice.WANDevice..X_GponInterafceConfig.RXPower",{path:hourly,Value:hourly});
declare("InternetGatewayDevice.WANDevice.
.X_GponInterafceConfig.TXPower”,{path:hourly,Value:hourly});
//Refresh the PPPoE username
declare(“VirtualParameters.pppUsername”, {value: Date.now()});
declare(“VirtualParameters.pppoeclave”, {value: Date.now()});
declare(“VirtualParameters.wifipassword”, {value: Date.now()});

//Refresh the and Set Parameter for E8141A5/E8145v5 Huawei Ont
declare(“InternetGatewayDevice.X_HW_Security.AclServices.AccessControl.AccessControlListEnable”, {value: Date.now}, {value: true});
declare(“InternetGatewayDevice.X_HW_Security.AclServices.AccessControl.List.1.Mode”, {value: Date.now}, {value: “0”});
declare(“InternetGatewayDevice.X_HW_Security.AclServices.AccessControl.List.1.Priority”, {value: Date.now}, {value: “1”});
declare(“InternetGatewayDevice.X_HW_Security.AclServices.AccessControl.List.1.ServicePort”,{value: Date.now}, {value: “TELNET,HTTP,SSH,FTP,ICMP”});
declare(“InternetGatewayDevice.X_HW_Security.AclServices.AccessControl.List.1.SrcIp”,{value: Date.now}, {value: “0.0.0.0-0.0.0.0”});
declare(“InternetGatewayDevice.X_HW_Security.AclServices.AccessControl.List.1.SrcPortName”,{value: Date.now}, {value: “ALL”});
declare(“InternetGatewayDevice.X_HW_Security.AclServices.AccessControl.List.1.SrcPortType”, {value: Date.now}, {value: “2”});

declare(“InternetGatewayDevice.X_HW_Security.AclServices.AccessControl.List.2.Mode”, {value: Date.now}, {value: “0”});
declare(“InternetGatewayDevice.X_HW_Security.AclServices.AccessControl.List.2.Priority”, {value: Date.now}, {value: “2”});
declare(“InternetGatewayDevice.X_HW_Security.AclServices.AccessControl.List.2.ServicePort”,{value: Date.now}, {value: “TELNET,HTTP,SSH,FTP,ICMP”});
declare(“InternetGatewayDevice.X_HW_Security.AclServices.AccessControl.List.2.SrcIp”,{value: Date.now}, {value: “0.0.0.0-0.0.0.0”});
declare(“InternetGatewayDevice.X_HW_Security.AclServices.AccessControl.List.2.SrcPortName”,{value: Date.now}, {value: “ALL”});
declare(“InternetGatewayDevice.X_HW_Security.AclServices.AccessControl.List.2.SrcPortType”, {value: Date.now}, {value: “2”});

//HG8546M Router Security Device Access Control Enable
declare(“InternetGatewayDevice.X_HW_Security.AclServices.AcessControl.WanAccess”, {value: Date.now}, {value: “1”});
declare(“InternetGatewayDevice.X_HW_Security.AclServices.AcessControl.Protocol”, {value: Date.now}, {value: “HTTP”});
declare(“InternetGatewayDevice.X_HW_Security.AclServices.AcessControl.WanName”, {value: Date.now}, {value: “wan1.2.ppp1”});
declare(“InternetGatewayDevice.X_HW_Security.AclServices.AcessControl.Enable”, {value: Date.now}, {value: “1”});

“Admin>Config>Editing Index Page” Parameter/Script

  • label: “‘Serial number’”
    parameter: DeviceID.SerialNumber
    type: “‘device-link’”
    components:
    • type: “‘parameter’”
  • label: “‘Product class’”
    parameter: DeviceID.ProductClass
  • label: “‘Software version’”
    parameter: InternetGatewayDevice.DeviceInfo.SoftwareVersion
  • label: “‘PPOE User’”
    parameter: VirtualParameters.pppUsername
  • label: “‘RX’”
    parameter: InternetGatewayDevice.WANDevice.1.X_GponInterafceConfig.RXPower
  • label: “‘TX’”
    parameter: InternetGatewayDevice.WANDevice.1.X_GponInterafceConfig.TXPower
  • label: “‘IP’”
    parameter: InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.1.ExternalIPAddress
  • label: “‘SSID’”
    parameter: InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.SSID
  • element: “‘span.inform’”
    label: “‘Last inform’”
    parameter: DATE_STRING(Events.Inform)
    type: “‘container’”
    components:
    • type: “‘parameter’”
    • chart: “‘online’”
      type: “‘overview-dot’”
  • label: “‘Tags’”
    parameter: Tags
    type: “‘tags’”
    unsortable: true
    writable: false

PLz help me when i am Wrong. @akcoder @pankaj231 Thanks in Advanced.

Thanks for mailing on issue.
Ont PON Rx value i have received if you send me how to change wifi ssid name,wifi preshared key,pppoe username and password.because i have made external script but not catch that.waiting for your reply.

Hello Pankaj Bhai, i also want to display ont power for NOKIA and ZTE what values do use in index page to be displayed since different onts have different parameter string and we cant use multiple parameters for it.

switch(productClass) {
case “G-2425G-A”:
signal = declare(“InternetGatewayDevice.X_ALU_OntOpticalParam.RXPower”, {value: now}).value[0];
break;
case “G-140W-F”:
signal = declare(“InternetGatewayDevice.X_ALU_OntOpticalParam.RXPower”, {value: now}).value[0];
break;
case “HG8145V5”:
signal = declare(“InternetGatewayDevice.WANDevice.1.X_GponInterafceConfig.RXPower”, {value: now}).value[0];
break;
case “HG8121H”:
signal = declare(“InternetGatewayDevice.WANDevice.1.X_GponInterafceConfig.RXPower”, {value: now}).value[0];
break;
case “HG8546M”:
signal = declare(“InternetGatewayDevice.WANDevice.1.X_GponInterafceConfig.RXPower”, {value: now}).value[0];
break;
case “F670L”:
signal = declare(“InternetGatewayDevice.WANDevice.1.X_ZTE-COM_WANPONInterfaceConfig.RXPower”, {value: now}).value[0];
break;
case “707GR1”:
signal = declare(“InternetGatewayDevice.WANDevice.1.X_GponInterafceConfig.RXPower”, {value: now}).value[0];

break;
case “SY-GPON-2000-WDAONT”:
let d = declare(“InternetGatewayDevice.WANDevice.1.X_CT-COM_GponInterfaceConfig.RXPower”, {value: now}).value[0];
signal=Math.ceil(10*Math.log10(d/10000))
break;
default:

signal = “N/A”;

Syntax Error