lwm2m.oir.write action

The lwm2m.oir.read trigger action will write the value of a resource or values of all the resources associated with an object.

Action

To access the lwm2m.oir.write trigger action:

  • In the Adding trigger screen, under Lwm2m click and drag the lwm2m.oir.write to the canvas.

Canvas

When dragged onto the canvas, the appearance of the action is a rectangle with two routing points.

The left routing point (red) is the failure route. This route will be taken if there is an error during execution.

The right routing point (green) is the success route. This route will be taken if action executes successfully.

Form

Parameters

Name Type Required Description
Thing key String Yes The thing key of the LWM2M device.
Object String Yes Click on the Object drop-down and then select the object that contains the resource to be written
Instance ID String Yes The Instance ID of the object that contains the resource or resources to be written.
Resource String The Resource that needs to be updated
Encoding Integer The encoding that needs to be done.
Value String Yes The value to be written. The Value must be in JSON format when writing to multiple resources. For example: {"MultipleResId1":"value1", "MultipleResId2":"value2"}
Partial Boolean   When the Resource parameter is set to anything other than "Write to entire instance", the default behavior is to completely replace the array of values in a multi-value resource. Use this parameter and set it to true if only the fields specified should be added/updated. Cannot be used with the replace parameter (the Partial and Replace parameters are mutually exclusive).
Replace Boolean   When the Resource parameter is "Write to entire instance", the default behavior is to only update the fields specified, adding/updating values within the array of values of a multi-value resource. Use this parameter and set it to true if the passed values should completely replace any existing values. Cannot be used with the Partial parameter (the Partial and Replace parameters are mutually exclusive).

To write an empty string to a resource or resource instance, use the Unicode string termination character "\u0000" as the value.