Action Keywords

From HSYCO
Revision as of 10:52, 5 February 2014 by Hsyco (talk | contribs) (→‎AUDIO)
Jump to navigation Jump to search

An action is defined as a keyword that identifies the action type, always followed by one or more parameters and sometimes the equal (assignment) operator.

Every keyword uses a specific syntax that interprets parameters according to its own rules.

System Keywords

DATESET

HAACTIVE

POWER

PROGRAMTIMER

WAIT

Cameras

CAMERA

The CAMERA action is used to temporarily disable cameras’ live view and recording features.

Action Description
CAMERA name = ON live view enabled
CAMERA name = OFF live view and recording disabled
CAMERA name = RECON recording enabled
CAMERA name = RECOFF recording disabled


Parameters:

  • name - the camera’s id. You can specify a list of space separated ids.


Examples:

  • CAMERA entrance = ON

CAMERAREC

Records video from a camera.

Action Description
CAMERAREC name = sec records for the number of seconds defined with the set attribute


Parameters:

  • name - the camera’s id. You can specify a list of space separated ids.


Examples:

CAMERAREC openspace = 30

CAMERARECFULL

Records video from a camera, like CAMERAREC, but ignores the DroppedFrames parameter in hsyco.ini, so that all frames captured from the camera during the recording period are recorded with no skips.

Action Description
CAMERARECFULL name = sec records for the number of seconds defined with the set attribute


Parameters:

  • name - the camera’s id. You can specify a list of space separated ids.


Examples:

CAMERARECFULL openspace = 30

Data Logger

DATALOGGER

DMX

DMX

Controls the value of DMX-512 channels.

Action Description
DMX address = ON sets the DMX address to the value preceding the last OFF command
DMX address = OFF sets the DMX address to value = 0
DMX address = FLIP

flips the status of a DMX channel (if the status is ON it executes the OFF command and vice versa).
When more channels are specified, if the previous status of at least one of the channels is different from OFF, the OFF command will be sent to all the channels, otherwise the ON command will be sent

DMX address = value

assigns a value to the DMX channel.
Valid values are numbers between 0 and 255

DMX addressX = DMX addressY the DMX channel addressX assumes the current status of the DMX channel addressY
DMX address = MERGE the channel or channels on the DMX OUT bus of the gateway follow the same channels of the DMX IN bus
DMX address = UNMERGE disables merge mode


Parameters:

  • address - when using one DMX gateway, address will be a standard DMX-512 address between 1 and 512. If there is more than one gateway, 1000 must be added to the DMX address for the second gateway, 2000 for the third one and so on. For example, 2100 stands for the address 100 on the DMX bus controlled by the third gateway. You can also use a from-to range format to specify a contiguous block of channels.


Examples:

DMX 100 101 102 = ON
DMX 100-120  200-220 = DMX 40
DMX 33 = MERGE

Infrared Control

IR

Sends a command to an IRTrans.

Action Description
IR name = command the IR code must be in the local IRTrans FLASH memory database or, If the hsyco/ir directory contains a .ccfhex file corresponding to the database name, then the CCF string in that file is used instead of sending the command stored in the IRTrans internal database


Parameters:

  • name - identifies the IRTrans, as defined with the IRTrans parameter in hsyco.ini
  • command - the command format is remote.command; that is the remote control database name followed by a dot and the command name.


Examples:

IR theater = dvd.play

I/O Servers

IO

Writes to I/O servers data points.

Action Description
IO name = value

sets the data point to a value.
Values are specific to the type of I/O server

IO name = FLIP inverts the output of the I/O data point. If the status of the output is 0 the new status will be 1, if different from 0 the new status will be 0
IO name1 = IO name2 sets the I/O interface output name1 to the current value of the I/O interface name2


Parameters:

  • name - the server id, followed by a single dot and the data point suffix. The EVENTS interpreter converts data points names to lower case
  • value - you can use multiple unquoted words, quoted strings and variables, that will be appended to the value string.


Examples:

IO contacts.c1 contacts.c3= 1
IO sensors.c1 = FLIP
IO contacts.o1 contacts.o2 = IO sensors.flood

Leak Detector

LEAK

Log

FILELOG

LOG

Mail

MAIL

Network Services

PING

URL

Public Announcement

AUDIO

The AUDIO action is used to play text-to-speech messages or recorded audio files.

Audio can be sent to the Web browser, the server’s audio line out connector, the internal speaker or audio out line of Axis cameras, and the speaker of SNOM phones or PA devices.

See the Public Announcement Appendix for additional information.

Action Description
AUDIO to = FILE filename plays a pre-recorded audio file
AUDIO to = VOICE:voicename message converts a text message to speech and plays the audio


Parameters:

  • to - the audio destination (see table below)
  • filename - the pathname of the audio file, relative to the HSYCO’s main directory
  • voicename - the voice name for the text-to-speech engine; see the Public Announcement Appendix for additional information
  • message - the text message for text-to-speech conversion; you can use multiple strings that will be automatically appended.


Audio Destination Description
speaker the server’s audio line out connector
web the Web browser’s audio output
Note this feature is supported only on Firefox and Chrome browsers
axis@camera id audio sent to an Axis camera, using the camera id defined in the Cameras parameter in hsyco.ini
snom@ip:port audio sent to SNOM phones and public announcement devices, to the multicast IP address and port specified (the IP address and port should be configured as multicast addresses on each phone)


Examples:

The gong.mp3 audio file is played every minute through the server’s audio line out or internal speaker:

TIME : audio speaker = file "audio/gong.mp3"

Same as above, but played at the same time on all phones registered to the 239.255.255.245 multicast address and port 5555:

TIME : audio snom@239.255.255.245:5555 = file "audio/gong.mp3"

Same as above, but played to the Axis camera with id “cam1”:

TIME : audio axis@cam1 = file "audio/gong.mp3"

Converts a text message to speech using the “en” voice of the text-to-speech engine, and play the audio on an Axis camera:

TIME : audio axis@cam1 = "voice:en" “the time is “ $time:h:m$

Serial Communication Ports

COMM

Sends a sequence of bytes to the specified communication port.

Action Description
COMM name = hexbytes sends bytes to a serial port


Note If both verboseLog and userLog are set to true, the full trace of sent bytes is written to the log file.


Parameters:

  • name - the name of the communications port, as defined in the CommPorts parameter in hsyco.ini
  • hexbytes - string with the hexadecimal representation of the sequence of bytes to be sent. You can use multiple unquoted words, quoted strings and variables, that will be appended to generate the byte stream sent to the communication port.


Examples:

COMM serialport =  FE03C9104B27
COMM serialport =  FE $body 27

Squeezebox

MUSIC

Controls the Squeezebox players.

Action Description
MUSIC address = ON turns the player on
MUSIC address = OFF turns the player off
MUSIC address = PLAY starts playing music in the active playlist


Parameters:

  • address - player number, starting from 0 for the first player, based on the listing order of the slimPlayers parameter in hsyco.ini.


Examples:

MUSIC 0 = ON
MUSIC 1 = PLAY

User Interface

UISESSIONSET

UISET

USER