To add PPPoE credentials, the "InternetGatewayDevice.WANDevice.3.WANConnectionDevice.1.WANPPPConnection.1" has to exist. So an additional WANPPPConnection-Interface must be created, before any parameters can be modified.
curl -X PUT -i 'http://ip:7557/objects/1' -d '{}'
2. Creating virtual parameters
To differentiate between an 'InternetGatewayDevice' and a 'Device', there are virtual parameters, preventing to check both types of devices.
curl -i 'http://ip:7557/virtual_parameters/SerialNumber' -X PUT -d 'var sn = declare("DeviceID.SerialNumber", {value: Date.now()});
return {writable: false, value: [sn.value[0], "xsd:string"]};'
3. Building provisions
A Provision is JavaScript code that can handle provisioning workflow. After a factory reset the device needs to have the correct MAC. So at every refresh, GenieACS needs to get the most important values from the device. The TR-069 connection request- and PPPoE credentials should be present.
There is always the option to create a preset via GenieACS GUI and show them via GET to see how to call different functions (refreshObject, add_object, age, ...).