Principle

The DeviceTwin is a Live Objects service that can collect, update and display the device resources information whether the device is connected to Live Objects or not.The device twin is created when the LwM2M device is created in Live Objects.Because the device twin representation is stored by Live Objects, the service can be collect and report device resources and state from apps and other services.

DeviceTwin feature is a way to define, retrieve or interact with a Twin representation of a device.

LiveObjectsTwin OperationsoperationsTwin ModelsTwin DevicesDevice twinreportedinstantiatedsupportedLWM2M DeviceREAD /3/0WRITE /3/0/1/3 Definition/1 Definition/0 Definition/3/0/0/3/0/9/3/0/0/3supported and instantiated objects,reported valuesOperations
Figure 1. Device twin features overview.

The way to define entities supported and instantiated by a device is called a TwinModel, it’s a list of ObjectsDefinitions where each object includes a list of AttributesDefinitions.

Note: LiveObjects TwinModel is compatible with OMA LWM2M model.

Each twin-capable physical device (LWM2M) connected to LiveObjects has an associated DeviceTwin:

  • a DeviceTwin is a list of supportedObjects, instantiatedObjects, and reportedValues.

  • it is possible to send orders (downlink) to a DeviceTwin using commands representation called TwinOperation.

And when a device reports value changes, LiveObjects could produce an associated data message under certain conditions. This condition are handled by a tenant DataRule entry.

Use cases

DeviceTwin use cases are

From Customer API

From Device to LiveObjects

  • a device uses Coap + LwM2M to talk to LiveObjects,

  • a device reports the supported and instantiated objects,

  • a device reports the attribute values.

  • a device respond to a twin operation.