|  Developer
Updated on November 30, 2022

hub.scenes.device.groups.list

  • Version: 1.0
  • Classes: UI
  • Title: Scene manager categories
  • Description: Returns an array of device groups
Edit
Field Type Required Description
ids array of IDs Filter output with only these device groups
version int64 Current version of device groups list the client has already had. If a client doesn’t have any device groups list yet, should be empty. If the version of the list has no changes, the response is empty. Can be used for any set of filters. The request souldn’t have any other parameters!
Edit
  • Array/filtered array of device groups or version of device groups list.
Edit
Code Message Data
-32602 Wrong params,
-32602 Wrong field of object
Edit
Edit
Edit

Get the full list call:

				
					{
    "id": "__ID__",
    "api": "1.0",
    "method": "hub.scenes.device.groups.list",
    "params": {
    }
}				
			
Edit
				
					{
   "error":null,
   "id":"633216245ab7be12415365c4",
   "result":{
      "deviceGroups":[
         {
            "_id":"633216245ab7be12415365c4",
            "name":"SecuritySensors 01",
            "categories":[
               {
                  "category":"security_sensor",
                  "subcategories":[
                     "co2",
                     "leak"
                  ]
               },
               {
                  "category":"scene_controller",
                  "exceptions":[
                     "panic"
                  ]
               }
            ],
            "devices":[

            ],
            "exceptions":[

            ],
            "persistent":false
         }
      ],
      "version":25
   }
}				
			
Edit
Edit

Optimised request: client has item groups list of specific version already and asks about the changed one: call:

				
					{
    "id": "__ID__",
    "api": "1.0",
    "method": "hub.scenes.device.groups.list",
    "params": {
        "version": 24
    }
}				
			
Edit
				
					{
    "api": "1.0",
    "error": null,
    "id": "633216245ab7be12415365c4",
    "result": {
    "version": 24
    }
}				
			

Note: By default, returns full list of item group objects. Note: The “version” can be used to avoid passing data from a controller to a client, if the client already has the same version of data.