Valt Module

From IVS Wiki
Revision as of 17:04, 18 February 2019 by IVSWikiBlue (talk | contribs) (isrecording)
Jump to: navigation, search

valtauth

Usage

Connects to the valt server and returns an authentication token.

Parameters

valtauth(https,server,username,password)

Parameter Type Value
https Boolean True if the server uses https otherwise False
server String IP address or DNS name of the Valt application server
username String Valt Username
password String Valt Password

Example

auth = valt.valtauth(True,'valt.example.com','admin','admin')

isrecording

Usage

Deprecated
Checks the state of a room and returns True if it is recording and False if it is not.

Parameters

isrecording(https,server,accesstoken,room)

Parameter Type Value
https Boolean True if the server uses https otherwise False
server String IP address or DNS name of the Valt application server
accesstoken String The authentication token returned by the function valtauth
room Integer The room number of the room in the Valt application. This must be the actually room ID number, not the room name. This can be obtained from the database.

Example

if valt.isrecording(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4):

getrecordingid

Usage

If the room is currently recording, it returns the ID of the active recording. You should check if the room is recording using the isrecording function prior to getting the recording ID.

Parameters

getrecordingid(https,server,accesstoken,room)

Parameter Type Value
https Boolean True if the server uses https otherwise False
server String IP address or DNS name of the Valt application server
accesstoken String The authentication token returned by the function valtauth
room Integer The room number of the room in the Valt application. This must be the actually room ID number, not the room name. This can be obtained from the database.

Example

current_recording = valt.getrecording(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4)

startrecording

Usage

Starts a new recording in the specified room.

Parameters

startrecording(https,server,accesstoken,room,name)

Parameter Type Value
https Boolean True if the server uses https otherwise False
server String IP address or DNS name of the Valt application server
accesstoken String The authentication token returned by the function valtauth
room Integer The room number of the room in the Valt application. This must be the actually room ID number, not the room name. This can be obtained from the database.
name String The name that will be associated with the recording in Valt.

Example

valt.startrecording(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4,"My Recording")

stoprecording

Usage

Stops the current recording in the specified room.

Parameters

stoprecording(https,server,accesstoken,room)

Parameter Type Value
https Boolean True if the server uses https otherwise False
server String IP address or DNS name of the Valt application server
accesstoken String The authentication token returned by the function valtauth
room Integer The room number of the room in the Valt application. This must be the actually room ID number, not the room name. This can be obtained from the database.

Example

valt.stoprecording(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4)

pauserecording

Usage

Pauses the current recording in the specified room.

Parameters

pauserecording(https,server,accesstoken,room)

Parameter Type Value
https Boolean True if the server uses https otherwise False
server String IP address or DNS name of the Valt application server
accesstoken String The authentication token returned by the function valtauth
room Integer The room number of the room in the Valt application. This must be the actually room ID number, not the room name. This can be obtained from the database.

Example

valt.pauserecording(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4)

resumerecording

Usage

Unpauses the current recording in the specified room.

Parameters

resumerecording(https,server,accesstoken,room)

Parameter Type Value
https Boolean True if the server uses https otherwise False
server String IP address or DNS name of the Valt application server
accesstoken String The authentication token returned by the function valtauth
room Integer The room number of the room in the Valt application. This must be the actually room ID number, not the room name. This can be obtained from the database.

Example

valt.resumerecording(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4)

addmarker

Usage

Adds a marker to the recording in progress in the specified room.

Parameters

addmarker(https,server,accesstoken,room,markername,color)

Parameter Type Value
https Boolean True if the server uses https otherwise False
server String IP address or DNS name of the Valt application server
accesstoken String The authentication token returned by the function valtauth
room Integer The room number of the room in the Valt application. This must be the actually room ID number, not the room name. This can be obtained from the database.
markername String Name for the maker in the Valt application
color String Color for the marker, valid values are white, gray, red, yellow, purple, cyan, blue, green, and orange.

Example

valt.addmarker(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4,"My Marker","red")

getrecordingtime

Usage

Returns the current time value of the recording in the specified room. Primarily used by the add marker function to specify the time for the marker.

Parameters

getrecordingtime(https,server,accesstoken,room)

Parameter Type Value
https Boolean True if the server uses https otherwise False
server String IP address or DNS name of the Valt application server
accesstoken String The authentication token returned by the function valtauth
room Integer The room number of the room in the Valt application. This must be the actually room ID number, not the room name. This can be obtained from the database.

Example

current_recording_time = valt.getrecordingtime(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4)

ispaused

Usage

Checks the state of a room and returns True if it is paused and False if it is not.

Parameters

ispaused(https,server,accesstoken,room)

Parameter Type Value
https Boolean True if the server uses https otherwise False
server String IP address or DNS name of the Valt application server
accesstoken String The authentication token returned by the function valtauth
room Integer The room number of the room in the Valt application. This must be the actually room ID number, not the room name. This can be obtained from the database.

Example

if valt.ispaused(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4):

islocked

Usage

Checks the state of a room and returns True if it is locked and False if it is not.

Parameters

islocked(https,server,accesstoken,room)

Parameter Type Value
https Boolean True if the server uses https otherwise False
server String IP address or DNS name of the Valt application server
accesstoken String The authentication token returned by the function valtauth
room Integer The room number of the room in the Valt application. This must be the actually room ID number, not the room name. This can be obtained from the database.

Example

if valt.islocked(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4):

getcameras

Usage

Returns a nested listed containing details for the cameras in the specified room. Primarily used with the axis module to enable/disable privacy mode on cameras.

Parameters

getcameras,server,accesstoken,room)

Parameter Type Value
https Boolean True if the server uses https otherwise False
server String IP address or DNS name of the Valt application server
accesstoken String The authentication token returned by the function valtauth
room Integer The room number of the room in the Valt application. This must be the actually room ID number, not the room name. This can be obtained from the database.

Example

cameras = valt.getcameras(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4)

getschedule

Usage

Returns a nested list of all upcoming schedules for the specified room. The returned list contains the start and end time for each schedule.

Parameters

getschedule(https,server,accesstoken,room)

Parameter Type Value
https Boolean True if the server uses https otherwise False
server String IP address or DNS name of the Valt application server
accesstoken String The authentication token returned by the function valtauth
room Integer The room number of the room in the Valt application. This must be the actually room ID number, not the room name. This can be obtained from the database.

Example

schedules = valt.getschedule(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4)

getroomname

Usage

Returns the name of the room in VALT.

Parameters

getroomname(https,server,accesstoken,room)

Parameter Type Value
https Boolean True if the server uses https otherwise False
server String IP address or DNS name of the Valt application server
accesstoken String The authentication token returned by the function valtauth
room Integer The room number of the room in the Valt application. This must be the actually room ID number, not the room name. This can be obtained from the database.

Example

roomname = valt.getroomname(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4)

getroomstatus

Usage

Returns a value indicating the current status of the room. This should be used instead of islocked, ispaused, or isrecording as it also includes better error handling.

Room Status Return Value
ERROR 0
Available 1
Recording 2
Paused 3
Locked 4

Parameters

getroomstatus(https,server,accesstoken,room)

Parameter Type Value
https Boolean True if the server uses https otherwise False
server String IP address or DNS name of the Valt application server
accesstoken String The authentication token returned by the function valtauth
room Integer The room number of the room in the Valt application. This must be the actually room ID number, not the room name. This can be obtained from the database.

Example

roomstatus = valt.getroomstatus(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4)