6.4 Device models using Smart Device Template

TS-0023 defines a framework for developing common standardized models of devices. There are multiple device specific domains defined and new models and domains are added in each release of oneM2M. The Home Domain contains a deviceClothesWasher model that aligns with the device that we are trying to model. The resource tree structure of the deviceClothesWasher is shown in Figure 5. There are many more potential services exposed in this model than our example simplified washing machine provides. The elements in bold are required for a compliant SDT model. Services in the model that are not supported by our simple clothes-washing machine are not implemented unless they are required. It should be noted that using an SDT model is the only model that can be certified by a certification authority.

Figure 9: SDT washing machine model

Figure 9: SDT washing machine model

When using a SDT model from TS-0023 to represent a physical device it is necessary to map the functionality of the device to be modelled with the existing modules defined for the SDT device.

Meta-Data Device Value SDT modelling
Manufacturer XYZ The SDT model captures this information in a dmDeviceInfo ModuleClass
Manufacturer description "Very cool Washing Machine" The SDT model captures this information in a dmDeviceInfo ModuleClass
Model Type XYZ_Cool The SDT model captures this information in a dmDeviceInfo ModuleClass
Supported Commands ON
OFF
Toggle
The SDT model enables the ON and OFF commands using the state attribute of the binarySwitch ModuleClass. The Toggle command is supported by the toggle ActionModule.
State "WASHING"
"STOPPED"
"ERROR"
The SDT model offers runState ModuleClass which supports more enumerations that indicated by our product.
Location My_Bathroom The SDT model does not have an attribute specifically for Location.

Figure 10: SDT model oneM2M Call Flows

Figure 10: SDT model oneM2M Call Flows

Only the messages highlighted in light blue are described here as the rest of the messages are the same as in the general call flow described in clause 6.1.

  • Create Information Model. The IPE creates all the resources needed to for the clothes washing machine that it knows how to model a priori using SDT. This IPE is developed with awareness of the clothes washing machine interface and the model that it is creating in the oneM2M CSE.
  • A <flexContainer> resource is created for the runState with the custom attribute currentMachineState and MachineStates. The IPE updates this resource with the following content when there are any changes in the status of the clothes washing machine:
{
"CurrentMachineState ": 3, // Or [1,3,5,6]
}
  • A <flexcontainer> resource is created for the binarySwitch module that allows command and control of the clothes washing machine. The client application sets the state of the device by updating the resource with the following payload:
{
"state": False, // Or True
}
  • A <flexcontainer> resource is created for the Toggle command as a child of the binarySwitch. This action is used to change the current state of the clothes washing machine. The client application toggles the state of the device by sending an update request to the resource with an empty payload.
  • A <flexcontainer> resource is created for the clothesWasherJobMode with custom attributes currentJobMode and jobModes. This resource is mandatory for the deviceClothesWasher SDT model, but the IPE will set the states and never modify them.
  • A <subscription> resource is created as a child of the toggle <flexContainer> resource by the IPE. This will cause a notification to be sent to the IPE when a new command is made by an application.
  • A <subscription> resource is created as a child of the binarySwitch command <flexContainer> resource by the IPE. This will cause a notification to be sent to the IPE when a new command is made by an application.