Difference between revisions of "Valt Module"

From IVS Wiki
Jump to: navigation, search
(Created page with "==valtauth== ===Usage=== Connects to the valt server and returns an authentication token. ===Parameters=== {| class="wikitable" |- |Parameter |Type |Value |- |https |Boolean |...")
 
(startrecording)
 
(35 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
==valtauth==
 
==valtauth==
 
===Usage===
 
===Usage===
Connects to the valt server and returns an authentication token.
+
Connects to the Valt server, and returns an authentication token.
 +
 
 
===Parameters===
 
===Parameters===
 +
<pre>valtauth(https,server,username,password)</pre>
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 11: Line 13:
 
|https
 
|https
 
|Boolean
 
|Boolean
|True if the server uses https otherwise False
+
|True if the server uses HTTPS, otherwise False.
 
|-
 
|-
 
|server
 
|server
 
|String
 
|String
|IP address or DNS name of the Valt application server
+
|IP address or DNS name of the Valt application server.
 
|-
 
|-
 
|username
 
|username
 
|String
 
|String
|Valt Username
+
|Valt Username.
 
|-
 
|-
 
|password
 
|password
 
|String
 
|String
|Valt Password
+
|Valt Password.
 
|}
 
|}
 
===Example===
 
===Example===
auth = valt.valtauth(True,'valt.example.com','admin','admin')
+
<pre>auth = valt.valtauth(True,'valt.example.com','admin','admin')</pre>
 +
 
 
==isrecording==
 
==isrecording==
 
===Usage===
 
===Usage===
Checks the state of a room and returns True if it is recording and False if it is not.
+
''Deprecated''<br/>Checks the state of a room and returns True if it is recording, or False if it is not.
 
===Parameters===
 
===Parameters===
 +
<pre>isrecording(https,server,accesstoken,room)</pre>
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 39: Line 43:
 
|https
 
|https
 
|Boolean
 
|Boolean
|True if the server uses https otherwise False
+
|True if the server uses HTTPS, otherwise False.
 
|-
 
|-
 
|server
 
|server
 
|String
 
|String
|IP address or DNS name of the Valt application server
+
|IP address or DNS name of the Valt application server.
 
|-
 
|-
 
|accesstoken
 
|accesstoken
 
|String
 
|String
|The authentication token returned by the function valtauth
+
|The authentication token returned by the function valtauth.
 
|-
 
|-
 
|room
 
|room
 
|Integer
 
|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.
+
|The room number of the room in the Valt application. This must be the actual room ID number, not the room name. This can be obtained from the database.
 
|}
 
|}
 
===Example===
 
===Example===
if isrecording(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4):
+
<pre>if valt.isrecording(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4):</pre>
 +
 
 
==getrecordingid==
 
==getrecordingid==
 
===Usage===
 
===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.
 
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===
 
===Parameters===
 +
<pre>getrecordingid(https,server,accesstoken,room)</pre>
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 67: Line 73:
 
|https
 
|https
 
|Boolean
 
|Boolean
|True if the server uses https otherwise False
+
|True if the server uses HTTPS, otherwise False.
 
|-
 
|-
 
|server
 
|server
 
|String
 
|String
|IP address or DNS name of the Valt application server
+
|IP address or DNS name of the Valt application server.
 
|-
 
|-
 
|accesstoken
 
|accesstoken
 
|String
 
|String
|The authentication token returned by the function valtauth
+
|The authentication token returned by the function '''valtauth'''.
 
|-
 
|-
 
|room
 
|room
 
|Integer
 
|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.
+
|The room number of the room in the Valt application. This must be the actual room ID number, not the room name. This can be obtained from the database.
 
|}
 
|}
 
===Example===
 
===Example===
current_recording = getrecording(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4)
+
<pre>current_recording = valt.getrecording(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4)</pre>
 +
 
 
==startrecording==
 
==startrecording==
 
===Usage===
 
===Usage===
 
Starts a new recording in the specified room.
 
Starts a new recording in the specified room.
 
===Parameters===
 
===Parameters===
 +
<pre>startrecording(https,server,accesstoken,room,name)</pre>
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 95: Line 103:
 
|https
 
|https
 
|Boolean
 
|Boolean
|True if the server uses https otherwise False
+
|True if the server uses HTTPS, otherwise False.
 
|-
 
|-
 
|server
 
|server
 
|String
 
|String
|IP address or DNS name of the Valt application server
+
|IP address or DNS name of the Valt application server.
 
|-
 
|-
 
|accesstoken
 
|accesstoken
 
|String
 
|String
|The authentication token returned by the function valtauth
+
|The authentication token returned by the function '''valtauth'''.
 
|-
 
|-
 
|room
 
|room
 
|Integer
 
|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.
+
|The room number of the room in the Valt application. This must be the actual room ID number, not the room name. This can be obtained from the database.
 
|-
 
|-
 
|name
 
|name
Line 114: Line 122:
 
|}
 
|}
 
===Example===
 
===Example===
startrecording(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4,"My Recording")
+
<pre>valt.startrecording(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4,"My Recording")</pre>
 +
 
 
==stoprecording==
 
==stoprecording==
 
===Usage===
 
===Usage===
 
Stops the current recording in the specified room.
 
Stops the current recording in the specified room.
 
===Parameters===
 
===Parameters===
 +
<pre>stoprecording(https,server,accesstoken,room)</pre>
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 127: Line 137:
 
|https
 
|https
 
|Boolean
 
|Boolean
|True if the server uses https otherwise False
+
|True if the server uses HTTPS, otherwise False.
 
|-
 
|-
 
|server
 
|server
 
|String
 
|String
|IP address or DNS name of the Valt application server
+
|IP address or DNS name of the Valt application server.
 
|-
 
|-
 
|accesstoken
 
|accesstoken
 
|String
 
|String
|The authentication token returned by the function valtauth
+
|The authentication token returned by the function '''valtauth'''.
 
|-
 
|-
 
|room
 
|room
 
|Integer
 
|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.
+
|The room number of the room in the Valt application. This must be the actual room ID number, not the room name. This can be obtained from the database.
 
|}
 
|}
 
===Example===
 
===Example===
stoprecording(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4)
+
<pre>valt.stoprecording(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4)</pre>
 +
 
 
==pauserecording==
 
==pauserecording==
 
===Usage===
 
===Usage===
 
Pauses the current recording in the specified room.
 
Pauses the current recording in the specified room.
 
===Parameters===
 
===Parameters===
 +
<pre>pauserecording(https,server,accesstoken,room)</pre>
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 155: Line 167:
 
|https
 
|https
 
|Boolean
 
|Boolean
|True if the server uses https otherwise False
+
|True if the server uses HTTPS, otherwise False.
 
|-
 
|-
 
|server
 
|server
 
|String
 
|String
|IP address or DNS name of the Valt application server
+
|IP address or DNS name of the Valt application server.
 
|-
 
|-
 
|accesstoken
 
|accesstoken
 
|String
 
|String
|The authentication token returned by the function valtauth
+
|The authentication token returned by the function '''valtauth'''.
 
|-
 
|-
 
|room
 
|room
 
|Integer
 
|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.
+
|The room number of the room in the Valt application. This must be the actual room ID number, not the room name. This can be obtained from the database.
 
|}
 
|}
 
===Example===
 
===Example===
pauserecording(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4)
+
<pre>valt.pauserecording(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4)</pre>
 +
 
 
==resumerecording==
 
==resumerecording==
 
===Usage===
 
===Usage===
 
Unpauses the current recording in the specified room.
 
Unpauses the current recording in the specified room.
 
===Parameters===
 
===Parameters===
 +
<pre>resumerecording(https,server,accesstoken,room)</pre>
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 183: Line 197:
 
|https
 
|https
 
|Boolean
 
|Boolean
|True if the server uses https otherwise False
+
|True if the server uses HTTPS, otherwise False.
 
|-
 
|-
 
|server
 
|server
 
|String
 
|String
|IP address or DNS name of the Valt application server
+
|IP address or DNS name of the Valt application server.
 
|-
 
|-
 
|accesstoken
 
|accesstoken
 
|String
 
|String
|The authentication token returned by the function valtauth
+
|The authentication token returned by the function '''valtauth'''.
 
|-
 
|-
 
|room
 
|room
 
|Integer
 
|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.
+
|The room number of the room in the Valt application. This must be the actual room ID number, not the room name. This can be obtained from the database.
 
|}
 
|}
 
===Example===
 
===Example===
resumerecording(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4)
+
<pre>valt.resumerecording(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4)</pre>
 +
 
 
==addmarker==
 
==addmarker==
 
===Usage===
 
===Usage===
 
Adds a marker to the recording in progress in the specified room.  
 
Adds a marker to the recording in progress in the specified room.  
 
===Parameters===
 
===Parameters===
 +
<pre>addmarker(https,server,accesstoken,room,markername,color)</pre>
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 211: Line 227:
 
|https
 
|https
 
|Boolean
 
|Boolean
|True if the server uses https otherwise False
+
|True if the server uses HTTPS, otherwise False.
 
|-
 
|-
 
|server
 
|server
 
|String
 
|String
|IP address or DNS name of the Valt application server
+
|IP address or DNS name of the Valt application server.
 
|-
 
|-
 
|accesstoken
 
|accesstoken
 
|String
 
|String
|The authentication token returned by the function valtauth
+
|The authentication token returned by the function '''valtauth'''.
 
|-
 
|-
 
|room
 
|room
 
|Integer
 
|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.
+
|The room number of the room in the Valt application. This must be the actual room ID number, not the room name. This can be obtained from the database.
 
|-
 
|-
 
|markername
 
|markername
 
|String
 
|String
|Name for the maker in the Valt application
+
|Name for the marker in the Valt application.
 
|-
 
|-
 
|color
 
|color
Line 234: Line 250:
 
|}
 
|}
 
===Example===
 
===Example===
addmarker(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4,"My Marker","red")
+
<pre>valt.addmarker(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4,"My Marker","red")</pre>
 +
 
 
==getrecordingtime==
 
==getrecordingtime==
 
===Usage===
 
===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.
 
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===
 
===Parameters===
 +
<pre>getrecordingtime(https,server,accesstoken,room)</pre>
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 247: Line 265:
 
|https
 
|https
 
|Boolean
 
|Boolean
|True if the server uses https otherwise False
+
|True if the server uses HTTPS, otherwise False.
 
|-
 
|-
 
|server
 
|server
 
|String
 
|String
|IP address or DNS name of the Valt application server
+
|IP address or DNS name of the Valt application server.
 
|-
 
|-
 
|accesstoken
 
|accesstoken
 
|String
 
|String
|The authentication token returned by the function valtauth
+
|The authentication token returned by the function '''valtauth'''.
 
|-
 
|-
 
|room
 
|room
 
|Integer
 
|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.
+
|The room number of the room in the Valt application. This must be the actual room ID number, not the room name. This can be obtained from the database.
 
|}
 
|}
 
===Example===
 
===Example===
current_recording_time = getrecordingtime(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4)
+
<pre>current_recording_time = valt.getrecordingtime(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4)</pre>
 +
 
 
==ispaused==
 
==ispaused==
 
===Usage===
 
===Usage===
Checks the state of a room and returns True if it is paused and False if it is not.
+
''Deprecated''<br/>Checks the state of a room and returns True if it is paused, or False if it is not.
 +
 
 
===Parameters===
 
===Parameters===
 +
<pre>ispaused(https,server,accesstoken,room)</pre>
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 275: Line 296:
 
|https
 
|https
 
|Boolean
 
|Boolean
|True if the server uses https otherwise False
+
|True if the server uses HTTPS, otherwise False.
 
|-
 
|-
 
|server
 
|server
 
|String
 
|String
|IP address or DNS name of the Valt application server
+
|IP address or DNS name of the Valt application server.
 
|-
 
|-
 
|accesstoken
 
|accesstoken
 
|String
 
|String
|The authentication token returned by the function valtauth
+
|The authentication token returned by the function '''valtauth'''.
 
|-
 
|-
 
|room
 
|room
 
|Integer
 
|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.
+
|The room number of the room in the Valt application. This must be the actual room ID number, not the room name. This can be obtained from the database.
 
|}
 
|}
 
===Example===
 
===Example===
if ispaused(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4):
+
<pre>if valt.ispaused(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4):</pre>
 +
 
 
==islocked==
 
==islocked==
 
===Usage===
 
===Usage===
Checks the state of a room and returns True if it is locked and False if it is not.
+
''Deprecated''<br/>Checks the state of a room and returns True if it is locked and False if it is not.
 +
 
 
===Parameters===
 
===Parameters===
 +
<pre>islocked(https,server,accesstoken,room)</pre>
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 303: Line 327:
 
|https
 
|https
 
|Boolean
 
|Boolean
|True if the server uses https otherwise False
+
|True if the server uses HTTPS, otherwise False.
 
|-
 
|-
 
|server
 
|server
 
|String
 
|String
|IP address or DNS name of the Valt application server
+
|IP address or DNS name of the Valt application server.
 
|-
 
|-
 
|accesstoken
 
|accesstoken
 
|String
 
|String
|The authentication token returned by the function valtauth
+
|The authentication token returned by the function '''valtauth'''.
 
|-
 
|-
 
|room
 
|room
 
|Integer
 
|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.
+
|The room number of the room in the Valt application. This must be the actual room ID number, not the room name. This can be obtained from the database.
 
|}
 
|}
 
===Example===
 
===Example===
if islocked(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4):
+
<pre>if valt.islocked(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4):</pre>
 +
 
 
==getcameras==
 
==getcameras==
 
===Usage===
 
===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.
+
Returns a nested list, containing details for the cameras in the specified room. Primarily used with the AXIS module to enable/disable privacy mode on cameras.
 
===Parameters===
 
===Parameters===
 +
<pre>getcameras,server,accesstoken,room)</pre>
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 331: Line 357:
 
|https
 
|https
 
|Boolean
 
|Boolean
|True if the server uses https otherwise False
+
|True if the server uses HTTPS, otherwise False.
 
|-
 
|-
 
|server
 
|server
Line 339: Line 365:
 
|accesstoken
 
|accesstoken
 
|String
 
|String
|The authentication token returned by the function valtauth
+
|The authentication token returned by the function '''valtauth'''.
 
|-
 
|-
 
|room
 
|room
 
|Integer
 
|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.
+
|The room number of the room in the Valt application. This must be the actual room ID number, not the room name. This can be obtained from the database.
 
|}
 
|}
 
===Example===
 
===Example===
cameras = getcameras(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4)
+
<pre>cameras = valt.getcameras(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4)</pre>
 +
 
 
==getschedule==
 
==getschedule==
 
===Usage===
 
===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.
 
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===
 
===Parameters===
 +
<pre>getschedule(https,server,accesstoken,room)</pre>
 +
{| class="wikitable"
 +
|-
 +
|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 actual room ID number, not the room name. This can be obtained from the database.
 +
|}
 +
===Example===
 +
<pre>schedules = valt.getschedule(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4)</pre>
 +
 +
==getroomname==
 +
===Usage===
 +
Returns the name of the room in VALT.
 +
===Parameters===
 +
<pre>getroomname(https,server,accesstoken,room)</pre>
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 359: Line 417:
 
|https
 
|https
 
|Boolean
 
|Boolean
|True if the server uses https otherwise False
+
|True if the server uses HTTPS, otherwise False.
 
|-
 
|-
 
|server
 
|server
 
|String
 
|String
|IP address or DNS name of the Valt application server
+
|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 actual room ID number, not the room name. This can be obtained from the database.
 +
|}
 +
===Example===
 +
<pre>roomname = valt.getroomname(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4)</pre>
 +
 
 +
==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.
 +
{| class="wikitable"
 +
|-
 +
|Room Status
 +
|Return Value
 +
|-
 +
|ERROR
 +
|0
 +
|-
 +
|Available
 +
|1
 +
|-
 +
|Recording
 +
|2
 +
|-
 +
|Paused
 +
|3
 +
|-
 +
|Locked
 +
|4
 +
|}
 +
 
 +
===Parameters===
 +
<pre>getroomstatus(https,server,accesstoken,room)</pre>
 +
{| class="wikitable"
 +
|-
 +
|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
 
|accesstoken
 
|String
 
|String
|The authentication token returned by the function valtauth
+
|The authentication token returned by the function '''valtauth'''.
 
|-
 
|-
 
|room
 
|room
 
|Integer
 
|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.
+
|The room number of the room in the Valt application. This must be the actual room ID number, not the room name. This can be obtained from the database.
 
|}
 
|}
 
===Example===
 
===Example===
schedules = getschedule(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4)
+
<pre>roomstatus = valt.getroomstatus(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4)</pre>

Latest revision as of 10:36, 17 May 2019

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, or 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 actual 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 actual 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 actual 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 actual 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 actual 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 actual 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 actual room ID number, not the room name. This can be obtained from the database.
markername String Name for the marker 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 actual 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

Deprecated
Checks the state of a room and returns True if it is paused, or 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 actual 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

Deprecated
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 actual 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 list, 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 actual 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 actual 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 actual 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 actual room ID number, not the room name. This can be obtained from the database.

Example

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