Create group or scene

This API is used to create a group or scene.

Use the parameter "type" to specify whether you want to create a group or scene.
("type": "GROUP" or "type": "SCENE").

The following section provides brief descriptions for a Group and a Scene:

Group: A group is a collection of devices that can be viewed and controlled as a single entity. The devices in a group are of a similar type, or have common attributes (e.g. On/Off) that can be controlled as a whole. Groups enable the users to perform a single action to a collection of devices at the same time.

Scene: A scene is a collection of devices with different actions/states. A scene allows us to perform various actions to different types of devices at the same time. When a scene is activated, a set of pre-defined actions are performed on all the devices associated with a scene. A scene is activated manually (tapping a button in the mobile app), or can be automated based on a schedule.

NOTE: In general, a group or scene is referred to as a collection.

{
    "collection": {
        "name": "Room101",
        "type": "GROUP",
        "devices": [
            {
                "dsn": "TESTDSN_787294_001"
            },
            {
                "dsn": "TESTDSN_899248_001"
            }
        ],
        "child_collections": [
            {
                "collection_uuid": "62871xxx-3c72-xxxx-9af2-4e76569e6b94"
            },
            {
                "collection_uuid": "62871xxx-3c72-xxxx-9af2-4e76569e6b95"
            },
            {
                "collection_uuid": "62871xxx-3c72-xxxx-9af2-4e76569e6b96"
            }
        ],
        "custom_attributes": {
            "color": "#F08080",
            "sort_order": "ascending"
        }
    }
}
{
    "collection_uuid": "62871xxx-3c72-xxxx-9af2-4e7xxx9sfs54"
    "name": "Room101"
    "type": "GROUP"
    "devices": [
        {
            "dsn": "TESTDSN_787294_001"
            "connected_at": "2021-09-09T11:42:50Z"
            "connection_status": "online"
            "lan_enabled": "1"
            "oem_model": "OEM1"
            "product_name": "light 1"
        }
        {
            "dsn": "TESTDSN_899248_001"
            "connected_at": "2021-09-09T11:42:50Z"
            "connection_status": "online"
            "lan_enabled": "1"
            "oem_model": "OEM1"
            "product_name": "light 2"
        }
    ]
    "child_collections": [
        {
            "collection_uuid": "62871xxx-3c72-xxxx-9af2-4e76569e6b94"
            "name": "Bed room lights"
        }
        {
            "collection_uuid": "62871xxx-3c72-xxxx-9af2-4e76569e6b95"
            "name": "Ceiling lights"
        }
        {
            "collection_uuid": "62871xxx-3c72-xxxx-9af2-4e76569e6b96"
            "name": "living room lights"
        }
    ]
    "custom_attributes": {
        "color": "#F08080"
        "sort_order": "ascending"
    }
}
{
    "collection": {
        "name": "Good Morning",
        "type": "SCENE",
        "devices": [
            {
                "dsn": "TESTDSN_787294_001",
                "states": [
                    {
                        "property_name": "integer_output_tp1",
                        "base_type": "integer",
                        "property_value": 1008
                    },
                    {
                        "property_name": "string_input_tp1",
                        "base_type": "string",
                        "property_value": "OK"
                    }
                ]
            }
        ],
        "child_collections": [
            {
                "collection_uuid": "a8ae010c-2dde-4140-8e19-116363eaa475",
                "states": [
                    {
                        "property_name": "integer_output_tp1",
                        "base_type": "integer",
                        "property_value": 1008
                    },
                    {
                        "property_name": "string_input_tp1",
                        "base_type": "string",
                        "property_value": "OK"
                    }
                ]
            }
        ],
        "custom_attributes": {
            "color": "#F08080",
            "sort_order": "ascending"
        },
        "schedule": {
            "active": true,
            "days_of_month": "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31]",
            "days_of_week": "[1, 2, 3, 4, 5, 6, 7]",
            "end_date": "2021-12-02",
            "end_time_each_day": "00:00:00",
            "months_of_year": "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]",
            "name": "sched-2021-09-15-21:40:08",
            "start_date": "2021-10-02",
            "start_time_each_day": "00:00:00",
            "metadata": {
                "sunrise_sunset": true
            },
            "time_zone" : "America/Los_Angeles",
            "utc" : false
        }
    }
}
{
  "collection_uuid":"8ae79d4b-bc40-4bc3-889e-7cbddda0c0ad"
  "name":"Good Morning"
  "type":"SCENE"
  "is_active":true
  "devices":[
  { 
    "dsn":"TESTDSN_787294_001"
    "product_name":"TESTDEVICE_001"
    "oem_model":"ledevb"
    "lan_enabled":false
    "connected_at":"2020-07-06T11:08:03Z"
    "connection_status":"Offline"
    "states":[
      {
        "property_name":"integer_output_tp1"
        "base_type":"integer"
        "property_value":1008
      }
      {
        "property_name":"string_input_tp1"
        "base_type":"string"
        "property_value":"OK"
      }
      ]
  }
  ]  
  "child_collections":[
  {
    "collection_uuid":"a8ae010c-2dde-4140-8e19-116363eaa475"
    "name":"Room102"
    "states":[
      { 
        "property_name":"integer_output_tp1"
        "base_type":"integer"
        "property_value":1008
      }
      {
         "property_name":"string_input_tp1"
         "base_type":"string"
         "property_value":"OK"
      }
      ]
  }
  ]
  "custom_attributes":{
    "color":"#F08080"
    "sort_order":"ascending"
    }
  "schedule":{
  "days_of_week":"[1, 2, 3, 4, 5, 6, 7]"
  "end_date":"2021-12-02"
  "months_of_year":"[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]"
  "end_time_each_day":"00:00:00"
  "start_time_each_day":"00:00:00"
  "days_of_month":"[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, ..."
  "name":"sched-2021-09-15-21:40:08"
  "active":true
  "start_date":"2021-10-02"
  "metadata": {
            "sunrise_sunset": true
        },
  "time_zone" : "America/Los_Angeles",
  "utc" : false
  }
}
Language
Credentials
Header
Click Try It! to start a request and see the response here!