onem2m

Controlling Group Of Lights in oneM2M


What if an IN-AE creates a group of lights with ADN-AE1 and ADN-AE2, controlling them by using just one request. The diagram shows that, it uses one request to control both of them but when I click the request example, its creates <contentInstances> one by one. Is there any example that I can control a group of resources with just one request or this is not in oneM2M's scope ?

Call flows for multiple light control are depicted in the figure below and are ordered as follows:

When the user updates a group of light states on her/his smartphone, the IN-AE creates a new contentInstance targeting a group of Light ADN-AE container resources hosted on the MN-CSE. Request shown here

For each contentInstances created successfully, the MN-CSE sends a notification to the corresponding Light ADN-AE.

enter image description here

---------------------- --------- EDITED -------------------------------

enter image description here

enter image description here


Solution

  • A <group> resource bundles and manages a number of resources (either of the same or of a mixed resource type), in your example the two <container>'s under ADN-AE1 and ADN-AE2.

    In addition to its other attributes a <group> has a virtual resource called the <fanOutPoint>. This virtual resource multiplies internally every request it receives for all the fitting resources of the <group>, be it CREATE, READ, UPDATE or DELETE.

    In the example, the <container>'s exist before they are organised in a group, and can be accessed and controlled independently. The <group> resource now bundles them together and makes them available for an application as a single entity. When this <group> receives a CREATE request for a <contentInstance> the group automatically creates a new <contentInstance> resource for all its resources. For the ADN-AE's, though, it doesn't matter who and how the <contentInstance>'s where created.

    Interestingly, this decouples the IN-AE application from the actual deployment and orchestration of an infrastructure. Just imagine that a <group> bundles all the lights in a home. This <group> is managed by a home manager AE. Now, another AE, for managing the home when the inhabitants leave, doesn't need to know much about the actual devices in the home. It only needs to sends one request to the <group> resource to switch off all the lights.

    Update

    Check oneM2M's "TS-0001 - Functional Architecture", sections "9.6.13 - Resource Type group" for the <group> and "9.6.14 - Resource Type fanOutPoint" for the <fanOutPoint> for the specification of this behaviour.