Device Clusters

Pre-requisite:

  • The user has to be signed in to perform the following operations.
  • The Device should be a cluster device to perform the following operations.

Get Cluster for a Device

To get the device cluster, The following method can be used:

  • spaceId (required): The space ID of the device.
  • deviceId (required): The device ID.
Factory.deviceService.getDeviceClusters(spaceId: String, deviceId: String) -> IVPublisher<CameraClustersModel>

Update Device Cluster

To update the device cluster, The following method can be used:

  • spaceId (required): The space ID of the device.
  • deviceId (required): The device ID.
  • clusterId (required): The id of the cluster to be updated.
  • wakeup (required): Bool(If device is battery operated)
  • request (required): The attributes to write; each UpdateClusterAttributeRequestModel must carry its attributeId.
Factory.deviceService.updateDeviceCluster(spaceId: String, deviceId: String, clusterId: String, wakeup: Bool, request: UpdateClusterMultipleAttributeRequestModel) -> IVPublisher<ClusterUpdateRespModel>

Update Device Cluster attribute

To update the device cluster, The following method can be used:

  • spaceId (required): The space ID of the device.
  • deviceId (required): The device ID.
  • clusterId (required): The id of the cluster to be update.
  • attributeId (required): The id of the attribute to be updated.
  • wakeup (required): Bool(If device is battery operated)
  • request (required): The request object containing the new value for the attribute.
Factory.deviceService.updateDeviceClustersAttribute(spaceId: String, deviceId: String, clusterId: String, attributeId: String, wakeup: Bool, request: UpdateClusterAttributeRequestModel) -> IVPublisher<ClusterUpdateRespModel>

Cloud settings are not cluster-specific; see Device Cloud Settings.