i am trying to create a preset and provision where i monitor the uptime ever 20 seconds, i see nothing in the logs so thats why i came here to know if there’s a way where i can see the visible changes in this.
This is the preset i created:
name - uptime_monitor_preset
channel - (empty)
Weight - 100
Schedule - */20 * * * * *
Events - 0
Precondition - _deviceId._SerialNumber = “U82R143022189”
Provision - monitor_uptime
Arguments - (empty)
This is the provision i created:
Name - monitor_uptime
Script:
const now = Date.now();
const uptimeSeconds = Math.floor(now/1000);
declare(‘InternetGatewayDevice.DeviceInfo.UpTime’, {value: uptimeSeconds});
log(‘Device ’ + deviceId + ’ - Uptime: ’ + uptimeSeconds + ’ seconds’);
// Enable periodic inform
declare(‘InternetGatewayDevice.ManagementServer.PeriodicInformEnable’, {value: true});
declare(‘InternetGatewayDevice.ManagementServer.PeriodicInformInterval’, {value: 20});
commit();
Kindly please someone help so that i can see a visible change