Difference between revisions of "Valt Module"
IVSWikiBlue (talk | contribs) (→getrecordingid) |
IVSWikiBlue (talk | contribs) (→startrecording) |
||
(13 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=== | ||
Line 13: | Line 13: | ||
|https | |https | ||
|Boolean | |Boolean | ||
− | |True if the server uses | + | |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=== | ||
Line 32: | Line 32: | ||
==isrecording== | ==isrecording== | ||
===Usage=== | ===Usage=== | ||
− | ''Deprecated''<br/>Checks the state of a room and returns True if it is recording | + | ''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> | <pre>isrecording(https,server,accesstoken,room)</pre> | ||
Line 43: | Line 43: | ||
|https | |https | ||
|Boolean | |Boolean | ||
− | |True if the server uses | + | |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 | + | |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=== | ||
Line 73: | Line 73: | ||
|https | |https | ||
|Boolean | |Boolean | ||
− | |True if the server uses | + | |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 | + | |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=== | ||
Line 94: | Line 94: | ||
Starts a new recording in the specified room. | Starts a new recording in the specified room. | ||
===Parameters=== | ===Parameters=== | ||
− | startrecording(https,server,accesstoken,room,name) | + | <pre>startrecording(https,server,accesstoken,room,name)</pre> |
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 103: | Line 103: | ||
|https | |https | ||
|Boolean | |Boolean | ||
− | |True if the server uses | + | |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 | + | |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 122: | Line 122: | ||
|} | |} | ||
===Example=== | ===Example=== | ||
− | valt.startrecording(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4,"My Recording") | + | <pre>valt.startrecording(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4,"My Recording")</pre> |
==stoprecording== | ==stoprecording== | ||
Line 128: | Line 128: | ||
Stops the current recording in the specified room. | Stops the current recording in the specified room. | ||
===Parameters=== | ===Parameters=== | ||
− | stoprecording(https,server,accesstoken,room) | + | <pre>stoprecording(https,server,accesstoken,room)</pre> |
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 137: | Line 137: | ||
|https | |https | ||
|Boolean | |Boolean | ||
− | |True if the server uses | + | |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 | + | |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=== | ||
− | valt.stoprecording(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4) | + | <pre>valt.stoprecording(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4)</pre> |
==pauserecording== | ==pauserecording== | ||
Line 158: | Line 158: | ||
Pauses the current recording in the specified room. | Pauses the current recording in the specified room. | ||
===Parameters=== | ===Parameters=== | ||
− | pauserecording(https,server,accesstoken,room) | + | <pre>pauserecording(https,server,accesstoken,room)</pre> |
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 167: | Line 167: | ||
|https | |https | ||
|Boolean | |Boolean | ||
− | |True if the server uses | + | |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 | + | |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=== | ||
− | valt.pauserecording(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4) | + | <pre>valt.pauserecording(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4)</pre> |
==resumerecording== | ==resumerecording== | ||
Line 188: | Line 188: | ||
Unpauses the current recording in the specified room. | Unpauses the current recording in the specified room. | ||
===Parameters=== | ===Parameters=== | ||
− | resumerecording(https,server,accesstoken,room) | + | <pre>resumerecording(https,server,accesstoken,room)</pre> |
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 197: | Line 197: | ||
|https | |https | ||
|Boolean | |Boolean | ||
− | |True if the server uses | + | |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 | + | |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=== | ||
− | valt.resumerecording(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4) | + | <pre>valt.resumerecording(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4)</pre> |
==addmarker== | ==addmarker== | ||
Line 218: | Line 218: | ||
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=== | ||
− | addmarker(https,server,accesstoken,room,markername,color) | + | <pre>addmarker(https,server,accesstoken,room,markername,color)</pre> |
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 227: | Line 227: | ||
|https | |https | ||
|Boolean | |Boolean | ||
− | |True if the server uses | + | |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 | + | |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 | + | |Name for the marker in the Valt application. |
|- | |- | ||
|color | |color | ||
Line 250: | Line 250: | ||
|} | |} | ||
===Example=== | ===Example=== | ||
− | valt.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== | ||
Line 256: | Line 256: | ||
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=== | ||
− | getrecordingtime(https,server,accesstoken,room) | + | <pre>getrecordingtime(https,server,accesstoken,room)</pre> |
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 265: | Line 265: | ||
|https | |https | ||
|Boolean | |Boolean | ||
− | |True if the server uses | + | |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 | + | |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 = valt.getrecordingtime(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4) | + | <pre>current_recording_time = valt.getrecordingtime(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4)</pre> |
==ispaused== | ==ispaused== | ||
===Usage=== | ===Usage=== | ||
− | ''Deprecated''<br/>Checks the state of a room and returns True if it is paused | + | ''Deprecated''<br/>Checks the state of a room and returns True if it is paused, or False if it is not. |
===Parameters=== | ===Parameters=== | ||
− | ispaused(https,server,accesstoken,room) | + | <pre>ispaused(https,server,accesstoken,room)</pre> |
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 296: | Line 296: | ||
|https | |https | ||
|Boolean | |Boolean | ||
− | |True if the server uses | + | |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 | + | |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 valt.ispaused(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4): | + | <pre>if valt.ispaused(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4):</pre> |
==islocked== | ==islocked== | ||
Line 318: | Line 318: | ||
===Parameters=== | ===Parameters=== | ||
− | islocked(https,server,accesstoken,room) | + | <pre>islocked(https,server,accesstoken,room)</pre> |
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 327: | Line 327: | ||
|https | |https | ||
|Boolean | |Boolean | ||
− | |True if the server uses | + | |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 | + | |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 valt.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 | + | 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=== | ||
− | getcameras,server,accesstoken,room) | + | <pre>getcameras,server,accesstoken,room)</pre> |
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 357: | Line 357: | ||
|https | |https | ||
|Boolean | |Boolean | ||
− | |True if the server uses | + | |True if the server uses HTTPS, otherwise False. |
|- | |- | ||
|server | |server | ||
Line 365: | 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 | + | |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 = valt.getcameras(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4) | + | <pre>cameras = valt.getcameras(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4)</pre> |
==getschedule== | ==getschedule== | ||
Line 378: | Line 378: | ||
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=== | ||
− | getschedule(https,server,accesstoken,room) | + | <pre>getschedule(https,server,accesstoken,room)</pre> |
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 387: | Line 387: | ||
|https | |https | ||
|Boolean | |Boolean | ||
− | |True if the server uses | + | |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 | + | |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 = valt.getschedule(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4) | + | <pre>schedules = valt.getschedule(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4)</pre> |
+ | |||
==getroomname== | ==getroomname== | ||
===Usage=== | ===Usage=== | ||
Returns the name of the room in VALT. | Returns the name of the room in VALT. | ||
===Parameters=== | ===Parameters=== | ||
− | getroomname(https,server,accesstoken,room) | + | <pre>getroomname(https,server,accesstoken,room)</pre> |
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 416: | Line 417: | ||
|https | |https | ||
|Boolean | |Boolean | ||
− | |True if the server uses | + | |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 | + | |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=== | ||
− | roomname = valt.getroomname(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4) | + | <pre>roomname = valt.getroomname(True,'valt.example.com','3e2c3e461736ce73830ed8d6d9d5dae6',4)</pre> |
==getroomstatus== | ==getroomstatus== | ||
Line 458: | Line 459: | ||
===Parameters=== | ===Parameters=== | ||
− | getroomstatus(https,server,accesstoken,room) | + | <pre>getroomstatus(https,server,accesstoken,room)</pre> |
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 467: | Line 468: | ||
|https | |https | ||
|Boolean | |Boolean | ||
− | |True if the server uses | + | |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 | + | |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=== | ||
− | roomstatus = valt.getroomstatus(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
Contents
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)