NVR Systems
Pre-requisite
- The user has to be signed in to perform the following operations.
- The space contains a network video recorder (
DeviceType.NVR) and its channels.
A space built around an NVR is monitored through a parallel set of calls. The profile, arming and responding-party concepts are the same as on the other pages of this section; the difference is that the enrolled devices are the recorder’s channels. A space uses either the camera path or the NVR path — they are not interchangeable.
Creating an NVR Security Profile
To create a security profile for an NVR device, The following method can be used:
spaceId(required): The space id of the User.request(required): The request object containing the NVR device id and profile details.
val address = SecurityAddress(
lineOne = "123 Main St", // The street address
city = "San Francisco", // The city
state = "CA", // The state
zipCode = "94105", // The postal code
country = "US" // The country
)
val request = NvrSecurityProfileRequest(
deviceId = "deviceId",
address = address,
timezone = "TimeZone"
)
InstaVision.securityServices.createNvrProfile(
spaceId = "spaceId",
request = request,
onSuccess = {
// The NVR security profile has been created
},
onError = { error ->
// The error object contains the error code and message
}
)
Arming the NVR System
To arm the NVR-connected security system, The following method can be used:
spaceId(required): The space id of the User.
InstaVision.securityServices.armNvrSystem(
spaceId = "spaceId",
onSuccess = {
// The NVR system arming request has been sent
},
onError = { error ->
// The error object contains the error code and message
}
)
Disarming the NVR System
To disarm the NVR-connected security system, The following method can be used:
spaceId(required): The space id of the User.
InstaVision.securityServices.disarmNvrSystem(
spaceId = "spaceId",
onSuccess = {
// The NVR system will be disarmed
},
onError = { error ->
// The error object contains the error code and message
}
)
Updating NVR Devices
To update the devices linked to the NVR security profile, The following method can be used:
spaceId(required): The space id of the User.request(required): The request object containing the list of devices.
val request = SecurityDeviceRequest(
deviceIds = listOf("deviceId1", "deviceId2")
)
InstaVision.securityServices.updateNvrDevices(
spaceId = "spaceId",
request = request,
onSuccess = { devices ->
// Returns the list of NVR security enabled devices
},
onError = { error ->
// The error object contains the error code and message
}
)
Updating the NVR Exit Delay
To update the exit delay for the NVR-connected system, The following method can be used:
spaceId(required): The space id of the User.request(required): The request object containing the exit delay in seconds.
val request = UpdateExitDelayRequest(
exitDelay = 60
)
InstaVision.securityServices.updateNvrExitDelay(
spaceId = "spaceId",
request = request,
onSuccess = {
// The exit delay has been updated
},
onError = { error ->
// The error object contains the error code and message
}
)
Adding an NVR Responding Party
To add a responding party (a phone number to be contacted) for NVR alarms, The following method can be used:
spaceId(required): The space id of the User.request(required): The request object containing the responding party details.
val request = NvrRespondingPartiesRequest(
name = "Jane Doe",
code = "+1",
value = "1231231234",
otp = "123123" // Optional, required if the phone number needs OTP verification
)
InstaVision.securityServices.addNvrResponseParty(
spaceId = "spaceId",
request = request,
onSuccess = { response ->
// Whether the responding party was added successfully
},
onError = { error ->
// The error object contains the error code and message
}
)
Deleting an NVR Responding Party
To remove a responding party from the NVR alarm system, The following method can be used:
spaceId(required): The space id of the User.request(required): The request object identifying the responding party to remove.
val request = DeleteRespondingPartiesRequest(
code = "+1",
value = "1231231234"
)
InstaVision.securityServices.deleteNvrResponseParty(
spaceId = "spaceId",
request = request,
onSuccess = {
// The responding party has been removed
},
onError = { error ->
// The error object contains the error code and message
}
)