Unable to read parameters

Hello. In the UI I see the device (I use for testing genieacs-sim)

DeviceID.ID 202BC1-BM632w-000000
DeviceID.Manufacturer Huawei Technologies Co., Ltd.
DeviceID.OUI 202BC1
DeviceID.ProductClass BM632w
DeviceID.SerialNumber 000000

But i can’t read the parameters from device. Нere is the test script:

log(“test script start”);
const s = declare(“DeviceID.SerialNumber”, {value: 1});
log(JSON.stringify(s));

In the logs I see

… 202BC1-BM632w-000000: Script: test script start
… 202BC1-BM632w-000000: Script: {}

log(JSON.stringify(s.value));

2 Likes
const s = declare(“DeviceID.SerialNumber”, {value: 1});

The whole DeviceID structure is one created by GenieACS for internal purposes, it does not exist on the device. Doing this const s = declare("DeviceID.SerialNumber").value[0]; will allow you to read the serial number the device has sent over neutral of whether the device is using TR-069 or TR-181.

The {value: 1} parameter also tells GenieACS that you wish to refresh that value if its copy is older than the value given. The value is in Unix epoch.