Actions

Difference between revisions of "Virtual IO - Examples"

From Zenitel Wiki

 
(84 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{PS}}
 
{{PS}}
[[Pulse_Configuration#Virtual_I.2FO_using_Scripts|Virtual I/O]] is a feature for activating scripts on station events.
+
Virtual I/O is a feature for activating scripts on station events.
  
==Prerequisites==
+
The scripts mentioned in this article can be [[Downloads#Stations_and_Devices|downloaded]] under the '''Stations and Devices''' chapter.
To use Virtual I/O a Pulse Enterprise system is required.
 
  
Pulse server must be a Turbine station with version 4.2.3.6 or greater.
+
{{obs|
 +
* ''As from version 4.11.3.1 for Pulse and version 5.1.3.0 for IC-EDGE Virtual I/Os are by default disabled. To enable, enter in the web browser the url "http://<IP Address>/goform/zForm_webcall", and check the flag '''Enable Web Call and Relay'''}}
  
The Pulse Server must also be licensed with Enterprose license as well as Virtual I/O license.
+
== Lua scripts for version 4.2.x.x==
 +
=== Door Opening - Operating a relay located in safe area ===
 +
[[File:ScriptRelayExample.PNG|right|thumb|350px|Example of using Vitual IO to control the relay of another unit]]
 +
Due to security requirements it is sometimes not allowed to operate the door lock from the relay in the Turbine station at the door.  
  
==Features==
+
Instead of operating the relay in the door station, one can use the "Virtual I/O" feature to control the relay of a remote I/O unit (e.g. [[TKIS-2]] unit) which is located in a secure area.
Custom Event Scripting for integration with e.g. Access Control or CCTV
 
  
==Scripts==
+
The script '''RelayTimer_v1.lua''' can be used for this prupose. The script let you pulse a relay of a remote unit for a set time.
The scripts mentioned in this article can be [[Downloads|downloaded here]].
 
  
The use of scripts contains three steps:
+
*[[Downloads#Virtual_I.2FO_-_Sample_scripts|Download]] and unzip the script
# First the user need to upload a script to the station. It is possible to download scripts by clicking on the name. Scripts are kept during upgrade. The uploaded scripts should clearly state in the start of the file which parameters that are needed .
+
* Select '''SIP Configuration''' > '''Script Upload''', and click '''Browse''' to upload the script to the station
# The script needs to be configured with some custom parameters and assigned to a script slot. The number of parameters and their content varies from script to script.
 
#* Assign a logical name to the script
 
#* Write which script to activate and add parameters (note that shell scripts don't need to be uploaded, it is possible to write the script direclty inside the text field).
 
#*: If it is a '''lua''' script then the syntax is:
 
#*:: lua <scriptname> <parameter1> <parameter2> <parameter3> ...
 
#*: '''Shell''' scripts follow the same syntax, but starts with "sh":
 
#*:: sh <scriptname> <parameter1> <parameter2> <parameter3> ...
 
# Finally the execution of a script has to be assigned to a station event. The same script can be assigned to multiple events.
 
  
==Configuration examples==
+
[[File:ScriptRelayUpload2.PNG|thumb|left|500px|Upload the script to the station]]
===Controlling relays located in safe area ===
+
<br style="clear:both;" />
Sometimes due to security requirements it is not allowed to operate the door lock from the relay in the Turbine station outside the door.
 
  
Instead of operating the relay in the door station, one can use the "Virtual I/O" feature to control the relay of an I/O unit (e.g. TKIS unit) which is located in a secure area.
+
The ''RelayTimer_v1.lua'' script requires 4 parameters:
----
+
{{Code|lua RelayTimer_v1.lua <username> <password> <Station IP address> <Timer>}}
'''Upload the script''' <br>
+
:- <username> is by default ''admin''
There are three different scripts for relay control:
+
:- <password> is by default ''alphaadmin''
* Relay ON
+
:- <Station IP address> is the IP address in dot notation
* Relay OFF
+
:- <Timer> is the relay pulse time in seconds
* Relay activation with timer controlled deactivation
 
  
[[File:VIO_1_1_v1.PNG|thumb|left|500px|Relay ON script]]
+
* Configure the script with the required parameters. Select '''SIP Configuration''' > '''Script Configuration'''
 +
[[File:ScriptRelayTimer.PNG|thumb|left|500px|When this script is triggered, the relay of station 10.5.101.149 will be pulsed for 3 seconds]]
 
<br style="clear:both;" />
 
<br style="clear:both;" />
  
[[File:VIO_1_2_v1.PNG|thumb|left|500px|Relay OFF script]]
+
* Finally you need to define which event should trigger the script. Select '''SIP Configuration''' > '''Script Events''':
<br style="clear:both;" />
 
  
[[File:VIO_1_3_v1.PNG|thumb|left|500px|Relay activation with timer script]]
+
[[File:ScriptRelayEvent.PNG|thumb|left|500px|When pressing digit "5", the script is triggered]]
 
<br style="clear:both;" />
 
<br style="clear:both;" />
  
----
+
=== Other scripts for Relay operation ===
'''Script configuration''' <br>
+
There are three different scripts for relay control.
RelayOn script requires 3 parameters:
+
* '''RelayTimer_v1.lua''': Pulse the relay for a set time. The required parameters are described earlier in this article.
* username (default: admin)
+
* '''RelayOn_v1.lua''': Turn relay ON
* password (default: alphaadmin)
+
* '''RelayOff_v1.lua''': Turn relay OFF
* Turbine IP address
 
  
[[File:VIO_2_1_v1.PNG|thumb|left|500px|Configuration for RelayOn script]]
+
The scripts can control the relay both in [[:Category:Stations#INCA_stations|INCA stations]] and in [[:Category:Stations#Turbine_stations|Turbine stations]].
<br style="clear:both;" />
 
  
RelayOff script requires 3 parameters:
+
Both the ''RelayOn_v1.lua'' and the ''RelayOff_v1.lua'' scripts require 3 parameters:
* username (default: admin)
+
{{Code|lua RelayOn_v1.lua <username> <password> <Station IP address>}}
* password (default: alphaadmin)
+
:- <username> is by default ''admin''
* Turbine IP address
+
:- <password> is by default ''alphaadmin''
 +
:- <Station IP address> is the IP address in dot notation
  
[[File:VIO_2_2_v1.PNG|thumb|left|500px|Configuration for RelayOff script]]
+
== Lua scripts for version 4.7 and newer ==
<br style="clear:both;" />
+
=== OutputTimer_v47 ===
 +
Parameters:
 +
* Turbine station username
 +
* Turbine station password
 +
* IP address for target Turbine station
 +
* Valid inputs are relay1-2 or output 1-6
 +
* Timer for relay ON in seconds
  
RelayWithTimer script requires 4 parameters:
+
=== ActivateOutput_v47 ===
* username (default: admin)
+
Parameters:
* password (default: alphaadmin)
+
* Turbine station username
* Turbine IP address
+
* Turbine station password
* Timer (the number of seconds the relay shoud stay active)
+
* Valid inputs are relay1-2 or output 1-6
 +
* IP address for target Turbine station
  
[[File:VIO_2_3_v1.PNG|thumb|left|500px|Configuration for Relay with timer script]]
+
=== DeactivateOutput_v47 ===
<br style="clear:both;" />
+
Parameters:
 +
* Turbine station username
 +
* Turbine station password
 +
* Valid inputs are relay1-2 or output 1-6
 +
* IP address for target Turbine station
  
----
+
=== CallHangup ===
'''Script Event assignement''' <br>
+
Parameters:
After a script slot has been created the user can choose which event(s) which will start the script(s).
+
* Turbine station username
[[File:VIO_3.PNG|thumb|left|500px]]
+
* Turbine station password
<br style="clear:both;" />
+
* IP address for target Turbine station
  
===TruPortal Integration===
+
==TruPortal Integration==
 
By using Virtual I/O the Pulse system trigger a script that can control the door lock in a TruPortal system.
 
By using Virtual I/O the Pulse system trigger a script that can control the door lock in a TruPortal system.
 
----
 
----
Line 104: Line 105:
 
<br style="clear:both;" />
 
<br style="clear:both;" />
  
===Milestone Integration===
+
==Milestone Integration==
 
By using Virtual I/O the Pulse system trigger a script that can control the Milestone Video Management System. In this example we want to activate a camera when the Turbine station calls the reception. The camera should switch off when the conversation ends.
 
By using Virtual I/O the Pulse system trigger a script that can control the Milestone Video Management System. In this example we want to activate a camera when the Turbine station calls the reception. The camera should switch off when the conversation ends.
  
Line 136: Line 137:
 
<br style="clear:both;" />
 
<br style="clear:both;" />
  
 +
==Related articles==
 +
* [[Virtual I/O (Pulse)|Virtual I/O - Pulse mode]]
 +
* [[Virtual I/O (SIP)|Virtual I/O - SIP mode]]
  
[[Category:Pulse - Features]]
+
[[Category: Pulse - Configuration]]
 +
[[Category: SIP intercom - Configuration]]

Latest revision as of 15:22, 15 December 2022

PS.png

Virtual I/O is a feature for activating scripts on station events.

The scripts mentioned in this article can be downloaded under the Stations and Devices chapter.

OBS icon
  • As from version 4.11.3.1 for Pulse and version 5.1.3.0 for IC-EDGE Virtual I/Os are by default disabled. To enable, enter in the web browser the url "http://<IP Address>/goform/zForm_webcall", and check the flag Enable Web Call and Relay


Lua scripts for version 4.2.x.x

Door Opening - Operating a relay located in safe area

Example of using Vitual IO to control the relay of another unit

Due to security requirements it is sometimes not allowed to operate the door lock from the relay in the Turbine station at the door.

Instead of operating the relay in the door station, one can use the "Virtual I/O" feature to control the relay of a remote I/O unit (e.g. TKIS-2 unit) which is located in a secure area.

The script RelayTimer_v1.lua can be used for this prupose. The script let you pulse a relay of a remote unit for a set time.

  • Download and unzip the script
  • Select SIP Configuration > Script Upload, and click Browse to upload the script to the station
Upload the script to the station


The RelayTimer_v1.lua script requires 4 parameters:

lua RelayTimer_v1.lua <username> <password> <Station IP address> <Timer>


- <username> is by default admin
- <password> is by default alphaadmin
- <Station IP address> is the IP address in dot notation
- <Timer> is the relay pulse time in seconds
  • Configure the script with the required parameters. Select SIP Configuration > Script Configuration
When this script is triggered, the relay of station 10.5.101.149 will be pulsed for 3 seconds


  • Finally you need to define which event should trigger the script. Select SIP Configuration > Script Events:
When pressing digit "5", the script is triggered


Other scripts for Relay operation

There are three different scripts for relay control.

  • RelayTimer_v1.lua: Pulse the relay for a set time. The required parameters are described earlier in this article.
  • RelayOn_v1.lua: Turn relay ON
  • RelayOff_v1.lua: Turn relay OFF

The scripts can control the relay both in INCA stations and in Turbine stations.

Both the RelayOn_v1.lua and the RelayOff_v1.lua scripts require 3 parameters:

lua RelayOn_v1.lua <username> <password> <Station IP address>


- <username> is by default admin
- <password> is by default alphaadmin
- <Station IP address> is the IP address in dot notation

Lua scripts for version 4.7 and newer

OutputTimer_v47

Parameters:

  • Turbine station username
  • Turbine station password
  • IP address for target Turbine station
  • Valid inputs are relay1-2 or output 1-6
  • Timer for relay ON in seconds

ActivateOutput_v47

Parameters:

  • Turbine station username
  • Turbine station password
  • Valid inputs are relay1-2 or output 1-6
  • IP address for target Turbine station

DeactivateOutput_v47

Parameters:

  • Turbine station username
  • Turbine station password
  • Valid inputs are relay1-2 or output 1-6
  • IP address for target Turbine station

CallHangup

Parameters:

  • Turbine station username
  • Turbine station password
  • IP address for target Turbine station

TruPortal Integration

By using Virtual I/O the Pulse system trigger a script that can control the door lock in a TruPortal system.


Upload the script

VIO 11 1 v1.PNG



Script configuration
TruPortal script requires 4 parameters:

  • username
  • password
  • TruPortal device IP address
  • Door number to activate
VIO 11 2 v1.PNG



Script Event assignement
After a script slot has been created the user can choose which event(s) which will start the script.

VIO 11 3 v1.PNG


Milestone Integration

By using Virtual I/O the Pulse system trigger a script that can control the Milestone Video Management System. In this example we want to activate a camera when the Turbine station calls the reception. The camera should switch off when the conversation ends.


Upload the script

VIO 21 1 v1.PNG



Script configuration
Milestone script requires 3 parameters:

  • Milestone server IP address
  • TCP port number
  • "Text" to send (example "Cam105")
Send command to switch to camera for station 105


A second slot is needed to deactivate the camera. Same parameters with text changed to "CamOff".

  • Milestone server IP address
  • TCP port number
  • "Text" to send (example "CamOff")
Send command to deactivate camera for station 105



Script Event assignement
After a script slot has been created the user can choose which events which will start the script.

VIO 21 3 v1.PNG


Related articles