Device Control and Operations

Pre-requisite: The user has to be signed in to perform the following operations.


Operate PTZ of the Device

To move the PTZ of the device, The following method can be used:

  • spaceId (required): The space ID of the device.
  • deviceId (required): The device ID.
  • request (required): The request object containing the PTZ movement information.
Factory.deviceService.movePtz(spaceId: String, deviceId: String, request: MovePtzRequest) -> IVPublisher<Void>

Stop PTZ Movement

To stop the PTZ movement of the device, The following method can be used:

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

Reset PTZ to default position

To reset the PTZ of the device, The following method can be used:

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

Wake Up Device from sleep state

To wake up the device, The following method can be used:

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

Check if the device is awake

To check if the device is awake, The following method can be used:

  • spaceId (required): The space ID of the device.
  • deviceId (required): The device ID.
Factory.deviceService.checkDeviceWakeupState(spaceId: String, deviceId: String, request: Codable?) -> IVPublisher<Codable?>