Hunting / Embargo Mode

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

Embargo — hunting mode in the app — keeps the camera quiet without switching it off. While it is in effect the camera keeps detecting and recording as normal, but the backend suppresses the notifications for those events. Nothing is lost: the events are in the feed the whole time and the notifications simply do not go out. Suppression ends when the scheduled window closes or hunting mode is switched off.

Two controls drive it: the mode switch, and an optional daily window between startTime and endTime that limits the suppression to those hours. device.embargo?.mode reports the current mode (EmbargoMode: Hunting, Embargo) and device.isInEmbargo() whether one is set; the cloud settings carry huntingMode and embargoSettings.


Update Embargo Schedule for a Device

To update the embargo (do-not-disturb) schedule for a device, The following method can be used:

  • spaceId (required): The space ID of the device.
  • deviceId (required): The ID of the device.
  • request (required): The request object containing the embargo schedule to be updated.
val request = UpdateEmbargoScheduleRequest(
  startTime = Time(hour = 22, minute = 0),
  endTime = Time(hour = 6, minute = 0),
  isActive = true,
)
InstaVision.deviceServices.updateEmbargoSchedule(
  spaceId = "spaceId",
  deviceId = "deviceId",
  request = request,
  onSuccess = { embargoSetting ->
    // EmbargoSettingResponse: isActive, startTime, endTime, timezone, deviceId, spaceId
  },
  onError = { error ->
    // The error object contains the error code and message
  },
)


Update Hunting Mode for a Device

To update the hunting mode for a device, The following method can be used:

  • spaceId (required): The space ID of the device.
  • deviceId (required): The ID of the device.
  • request (required): The request object containing the new hunting mode status.
val request = UpdateHuntingModeRequest(enabled = true)
InstaVision.deviceServices.updateHuntingMode(
  spaceId = "spaceId",
  deviceId = "deviceId",
  request = request,
  onSuccess = { huntingMode ->
    // The updated hunting mode object
  },
  onError = { error ->
    // The error object contains the error code and message
  },
)

This site uses Just the Docs, a documentation theme for Jekyll.