How to use DUStates

Hi all,

Looking for some input and assistance on how to use TR-157 with GenieACS. It seems it has been implemented in the ChangeDUStates branch in Github. I have deployed an instance of GenieACS with these changed merged however I’m unsure how to actually get them to work.

I’ve attempted the following in a provision which I can confirm is executing based on the logs however there are no changes to the device parameters nor any RPCs made to/from the device.

        log(`We can install a container`);

        declare('DUStates.0.URL', {value: now}, {value: 'https://example.com/container.ipk'});
        declare('DUStates.0.UUID', {value: now}, {value: '68bef7b0-8822-4738-b70b-99c03b613d7f'});
        declare('DUStates.0.OperationType', {value: now}, {value: 'install'});
        declare('DUStates.0.ChangeDUState', { value: now }, { value: now });

        commit();

        log(`We have attempted to install the container on the device`);

Any assistance on how to use this feature is greatly appreciated.

I’m not familiar with TR-157. But does the object DUStates.0 currently exist? If not, then you need to add the instance like so:

log(`We can install a container`);

declare('DUStates.[URL:https://example.com/container.ipk,UUID68bef7b0-8822-4738-b70b-99c03b613d7f,OperationType:install,ChangeDUState:' + Date.now() + ']', {path: 1}, {path: 1});

log(`We have attempted to install the container on the device`);

An explicit commit() is almost always not necessary.