Difference between revisions of "Settings"

From HSYCO
Jump to navigation Jump to search
Line 605: Line 605:
  
 
{{note|Only one process can access the database files at any time. If you need to access these files using other applications or SQL utilities, you should stop the HSYCO process, otherwise all data could be lost.}}
 
{{note|Only one process can access the database files at any time. If you need to access these files using other applications or SQL utilities, you should stop the HSYCO process, otherwise all data could be lost.}}
 +
 +
 +
'''DatabaseRecovery'''
 +
 +
'''Default:''' false
 +
 +
'''Format:''' false | true
 +
 +
 +
When set to true, and DatabaseBackup is also enabled, if an unrecoverable database error occurs at startup, HSYCO will rename the corrupted database directory to "data.original" and try to recover from last backup, if available.
  
  

Revision as of 14:46, 25 February 2016

The Settings icon HSYCO can be configured using the Settings application in the Manager.

Settings stores all configuration parameters in the hsyco.ini file.


Note You can copy this file to save the current configuration, or manually change it. In this case, be sure to reopen the Settings application after the changes have been saved.


The configuration is read at start-up, so any changes become effective only after restarting the HSYCO process.

HSYCO is factory configured to automatically restart when hsyco.ini is saved.


Manager settings menu.png


When you make changes using Settings, the hsyco.ini file will be overwritten when you press the Save button.

You can’t return to the previous configuration once it is saved.

The Revert button allows you to reload the current configuration if you have made changes in Setting that have not yet been saved.

Settings parameters are grouped in several sections.

You can make changes to any parameter, even in different sections, and then save all changes together.

System

The Systems section contains all general configuration parameters, including vital parameters affecting system’s security and reliability.

These parameters are further split in several sub-sections.

General

Manager settings general.png


URLKey

Default: hsycoserver

Format: string of at least 8 characters


To protect against malicious service discovery robots, HSYCO does not answer to Web requests where only the server address is defined, for example https://192.168.0.50, but requires an extended URL, which must include an access key, called URLKey.

Note The URLKey must be at least 8 characters long.

It is possible to specify more than one URLKEY, separated by a comma; in this case all the specified URLKEYs will be valid for the web access to HSYCO.

The factory default URLKey is hsycoserver.

The URLKey is not a secret password, but only an additional protection feature.


Language

Default: en

Format: cn | en | fr | it


Some I/O Servers and other core services use localized text messages. This parameter defines the default system language for these services.


AutoKillFiles

Default:

Format: list of file names separated by commas


This parameter is usually set as: "hsyco.ini,hsyco.jar,com/hsyco/user.class" forcing the automatic restart after the changes of the three files listed.


DatabaseTransactionLog

Default: false

Format: false | true


If true the HSQLDB embedded database transaction log file is used to log individual transactions between checkpoints.

If false the log file is not used, improving the performance and reducing I/O but, in case of uncontrolled shutdown of the HSYCO process, all data updates after the last checkpoint (a database checkpoint is automatically perfomed every 60 seconds) will be lost.


StartupDelay

Default: 0

Format: 0 or positive integer number of seconds


When set to a positive number, the HSYCO server will wait for the specified number of seconds at start-up before becoming active.

This start-up delay could be useful to prevent HSYCO from starting before other peripherals or devices, like external storage systems, are completely initialized.


ExceptionWatchdog

Default: 5

Format: positive integer number


After N uncaught Java execution exceptions, the HSYCO server will be killed and restarted.

Set to 0 to disable the exception watchdog.


EventsLoadTimeout

Default: 20

Format: positive integer number of seconds


When an EVENTS file is saved, If any code section takes more than the specified amount of time to execute during the test run and INIT events sections, HSYCO will abort the JavaScript engine, rename events.txt to events_unsafe.txt and, a few seconds later, will restart the whole HSYCO server engine to protect the integrity of the system.

If you have code in EVENTS that requires more than the default 20 seconds to run, you should set a larger value for EventsLoadTimeout.


userLog

Default: false

Format: false | true


Set to true to enable the log of the Java methods called in user.java or of the commands defined in the EVENTS programming environment.


eventsLog

Default: false

Format: false | true


If true, the log of events received from field devices is enabled, for example the events related to the IO Servers.


verboseLog

Default: false

Format: false | true


If true, the extended log is enabled.

It is useful for debugging, or during the advanced customization phase or the development of Java code.


persistentLog

Default: true

Format: false | true


When set to false, message and error logs are not written to files, and are only visible in the Manager's Log Viewer.

You may want to avoid writing log files when using servers with limited disk space or when the mass storage device is an SSD with limited write cycles.


securityLogDailyFiles

Default: false

Format: false | true


When set to true, the security logs are written in daily files named MMDD-security.log.


LogMaxAge

Default: 0

Format: 0, or positive integer number


Log files are automatically deleted when older than the number of days defined with this parameter.

When set to 0 or not defined, log files are not deleted automatically.

Access Control

Configuration Access Control.png


trustedNet

Default: local

Format: local, or nn.nn.nn.nn-nn.nn.nn.nn


IP addresses that define the group of network addresses belonging to the secure local network.

It is possible to enter multiple, comma-separated IP ranges or individual IP addresses, or simply enter “local”, so that HSYCO will assume all IP addresses in the LAN as trusted.

The loop-back IP address (127.0.0.1) is considered part of the trusted network only when the trustedNet option is set to "local", or when explicitly listed.

The Web clients connecting to HSYCO from these addresses are subject to the time-out defined in KeysTrustedValidityHours, which is usually longer than the one used for all the other IP addresses, defined in KeysNotTrustedValidityHours.


KeysTrustedValidityHours

Default: 24

Format: integer > 0 or hh:mm


Login time-out in hours for the connections from trusted IP addresses.

Set on a very high value, e.g. 100000, to practically avoid the time-out of sessions.

It can also be set using the hh:mm hours and minutes format.


KeysNotTrustedValidityHours

Default: 1

Format: integer > 0 or hh:mm


Login time-out in hours for not trusted IP addresses.

It can also be set using the hh:mm hours and minutes format.


KeysInactivityHours

Default: 1

Format: integer > 0 or hh:mm


Inactivity time-out in hours.

This is an optional parameter; if not set there will be no inactivity time-out and the user session will be automatically logged out based on the login time-out only.

It can also be set using the hh:mm hours and minutes format.


KeysInactivityMode

Default: browser

Format: browser | cameras | commands


Inactivity time-out mode.

This is an optional parameter.

It is significant only when KeysInactivityHours is also defined.

In browser mode, having the Web browser open on the HSYCO page will keep the session alive.

In cameras mode the session will remain alive only when sending commands or watching cameras.

In commands mode the session will stay alive only if commands are sent before the inactivity timer expires.


HTTPServerPublicDirectory

Default: browser

Format: directory name


If defined, enables a simple Web server that serves files, without any parsing, via HTTP and HTTPS, only to clients in the trusted range of IP addresses.

This parameter sets the name of the directory, under the www root Web directory, used for the public files.

If, for example, you have HTTPServerPublicDirectory=public, and an HTML file named home.html in the public directory, then the https://192.168.0.50/public/home.html URL will point to that file.

As you see, you shouldn’t add the URLKey in public URLs.


HTTPServerLowSecurityEnabled

Default: false

Format: true | false


Usually, the HTTP server is only active to let cameras and PBX systems send motion detection and calls notifications.

To avoid the authentication keys, PIN and PUK codes and all traffic to be transmitted in the clear, the HTTP protocol is not normally used for Web access to HSYCO.

Set the parameter to true only when you want to enable the not-secure HTTP protocol for Web access to HSYCO.


WebAdminNetConfigLock

Default: false

Format: true | false


If true, the Web network settings functions are disabled.

This parameter should be set to true once you expect no changes in the network configuration of HSYCO Server.

Network

Configuration Network.png


HTTPServerPort

Default:

Format: integer number < 65535


TCP/IP port of HSYCO HTTP Web Server. If not defined, the HTTP server is not enabled.

Normally set to 80.


HTTPSSLServerPort

Default:

Format: integer number < 65535


TCP/IP port of HSYCO HTTPS Web Server.

If not defined, the HTTPS server is not enabled.

Normally set to 443.


SysLogServerPort

Default:

Format: integer number < 65535


TCP/IP port of HSYCO SYSLOG Web server.

The SYSLOG server is used to receive from the Access Points (AP) the information to determine which AP every user in the Wi-Fi LAN is using to connect.

If not defined, the SYSLOG server is not enabled.

It is usually set to 514.


ServerName

Default: hsyco

Format: domain name


Name used to generate the SSL certificate.

It is necessary for the cryptography of the HTTPS Web traffic and should correspond to the domain name through which the HSYCO server is accessed via the Internet.

The certificate is saved in the hsyco.keys file.

When HSYCO is started, if this file is not available or its name doesn’t match the ServerName parameter in hsyco.ini, a new SSL certificate is automatically generated according to the name defined in ServerName.


OffLineCache

Default: false

Format: false | true


HSYCO implements the off-line cache feature of the Web browsers that support the HTML 5.0 standard.

To enable the off-line storage on the Web browser of all HSYCO HTML static content, set this parameter to true.

Note Note that all files saved under any subdirectory named "nocache" will not be listed in the persistent cache's manifest file.


HTTPServerThreads

Default: 256

Format: positive integer number


Sets the total number of processing threads for the HTTP and HTTPS internal web servers.

You should change this parameter only when you have a very large number of active web clients.

Web browsers normally use only a few (up to about 6) concurrent connections for each session, and the default should be fine to support up to at least 40 active clients.

When the HTTP and HTTPS servers run low of threads, some clients could see their requests rejected, causing page load errors or becoming unresponsive.

In this case you should see “too many connections” error messages in HSYCO’s log files.

Note Increasing this parameter also increases memory and I/O resources requirements to the underlying operating system.

Clock

Configuration Clock.png


TimeAutoUpdate

Default: true

Format: false | true | NTP server name/address


HSYCO automatically sets the local date and time by polling Network Time Protocol (NTP) servers.

To disable this feature, set this parameter to false.

To use a specific NTP server, set this parameter to the name or IP address of the NTP server.


TimeZone

Default: true

Format: the time zone id


Set the current time zone.

The time zone information is used to obtain the correct local time and automatically adjust for daylight saving time.

If this parameter is not set, HSYCO will use the operating system’s time zone settings.

The time zone id is either in the form “Area/Location”, or a generic “GMT+NN”, “GMT-NN” format that simply defines the hours offset from UTC time.

When the “Area/Location” format is used, the clock is automatically adjusted for daylight saving time.

The TimeZone value should have no spaces; replace spaces in area or location names with underscores, for example “America/New_York”.

When HSYCO starts, you can check the message.log file to see the actual time zone and DST setting, just after the start-up message, for example:

2013.07.10 15:28:30.113 - HSYCO Ver. 3.3.0 Build 0112 (USER Ver. No User Code) started
2013.07.10 15:28:30.425 - Time zone is: Europe/Rome (Central European Summer Time)


Latitude

Default: 0

Format: positive or negative numerical value, decimals separated by “.”


Latitude in decimal degrees (positive for the Northern Hemisphere), to calculate the sun position and sunrise/sunset time.


Longitude

Default: 0

Format: positive or negative numerical value, decimals separated by “.”


Longitude in decimal degrees (positive for the Eastern Hemisphere), to calculate the sun position and sunrise/sunset time.


SunriseOffsetMinutes

Default: 0

Format: positive or negative integer number


Deviation in minutes from the civil sunrise time (in advance if negative, delayed if positive).


SunsetOffsetMinutes

Default: 0

Format: positive or negative integer number


Deviation in minutes from the civil sunset time (in advance if negative, delayed if positive).

High Availability

Configuration High Availability.png


haMode

Default:

Format: master | slave


Enables the high availability configuration of HSYCO.

The high availability configuration uses two different HSYCO systems, one is configured as the master system, the other as slave.


haMasterIP

Default:

Format: IP address: nnn.nnn.nnn.nnn


Mandatory parameter for the high availability configuration.

It specifies the IP address of the HSYCO master system.


haSlaveIP

Default:

Format: IP address: nnn.nnn.nnn.nnn


Mandatory parameter for the high availability configuration.

It specifies the IP address of the HSYCO slave system.


haActiveIP

Default:

Format: IP address: nnn.nnn.nnn.nnn


Optional parameter for the high availability configuration.

Defines an IP address that the active server, master or slave, will assign as an IP alias to its main Ethernet port. Using this IP address, clients will be able to access the active server with the same address, regardless of the active server being the master or the slave.


haDisableCommandEvents

Default: true

Format: false | true


Optional parameter for the high availability configuration.

If true, command methods and actions in Java and EVENTS are automatically disabled on the HSYCO Server that is not active (for example the system defined as slave is not active when the master system works properly) for the following systems: Audio, Cameras, Comm ports, DMX, I/O Servers, IRTrans, Modbus (write command are disabled) Squeezebox, URL.


haDisableFilesSync

Default: false

Format: false | true


Optional parameter for the high availability configuration.

If true, files changes on the master will not be synched to the slave server (changes to access.ini, scheduler.ini and timers.data will not be synched too).


haClientSessionsFailover

Default: false

Format: false | true


Optional parameter for the high availability configuration.

When true the slave server will mirror the master's authentication keys, allowing a clean transition of authenticated sessions from master to slave.

Note To ensure a proper transition of the client sessions from master to slave, the ServerName option and the hsyco.keys file of the slave server must also be the same as on the master.

Backup

Manager settings backup.png


DatabaseBackup

Default: false

Format: false | true


When set to true, a hot backup of the core database is automatically executed on a daily basis, saving data in the data_backup directory, and overwriting the previous backup files.

The data_backup directory can be used to restore the database. The Database Maintenance document explains how to safely perform the database restore procedure.

Only one process can access the database files at any time. If you need to access these files using other applications or SQL utilities, you should stop the HSYCO process, otherwise all data could be lost.


DatabaseRecovery

Default: false

Format: false | true


When set to true, and DatabaseBackup is also enabled, if an unrecoverable database error occurs at startup, HSYCO will rename the corrupted database directory to "data.original" and try to recover from last backup, if available.


RootBackupDay

Default: empty or undefined (automatic root backup disabled)

Format: *, mon, tue, wed, thu, fri, sat, sun, 1-31


Day schedule for automatic root backup:

  • *: every day
  • mon: every Monday (weekly schedule)
  • tue: every Tuesday (weekly schedule)
  • wed: every Wednesday (weekly schedule)
  • thu: every Thursday (weekly schedule)
  • fri: every Friday (weekly schedule)
  • sat: every Saturday (weekly schedule)
  • sun: every Sunday (weekly schedule)
  • 1-31: on the day (monthly schedule)


RootBackupHour

Default: empty or undefined (automatic root backup disabled)

Format: *, 0-23


Hour schedule for automatic root backup:

  • *: every hour
  • 0-23: on the hour (daily schedule)


RootBackupMinute

Default: empty or undefined (automatic root backup disabled)

Format: 0-59


Minute schedule for automatic root backup:

  • 0-59: on the minute


Using the RootBackupDay, RootBackupHour and RootBackupMinute you can set a monthly, weekly, daily or hourly schedule for the automatic root backup.

To schedule a single backup every month, set RootBackupDay to the N-th day of the month, for example 1, then set RootBackupHour and RootBackupMinute to the preferred hour and minute.

To schedule a weekly backup, set RootBackupDay to a day of the week, for example Sunday, then set RootBackupHour and RootBackupMinute to the preferred hour and minute.

To schedule a daily backup, set RootBackupDay to "*", then set RootBackupHour and RootBackupMinute to the preferred hour and minute.

Finally, to schedule an hourly backup, set RootBackupDay to "*", RootBackupHour to "*" and RootBackupMinute to the preferred minute.


RootBackupDestinations

Default: empty or undefined (automatic root backup disabled)

Format: comma-separated list of local or remote destination paths.


The backup file destinations.

The automatic root backup engine creates a single zip file and saves copies of it locally on the HSYCO server file system or on remote servers using the SSH secure copy protocol.

To copy the backup zip file to the local file system (including remote network storage mounted on the server's file system), simply use the absolute pathname of the destination file, for example "/backup/mybackup.zip".

To copy the backup zip file to a remote SSH server, use the following format:

scp:<login>:<password>@<host>:<port>:<path>

where:

  • <login> is the remote user
  • <password> is the remote user's SSH password
  • <host> is the remote server's name or IP address
  • <port> is the SSH port number. The port number can be omitted if the SSH service is using the standard SSH port 22. In this case the format becomes: scp:<login>:<password>@<host>:<path>
  • <path> the pathname of the zip file on the remote server. The pathname can be absolute (starting with / on Unix systems) or relative to the user's home directory.

You can also use a few special parameters in the pathname to generate dynamic names based on the backup date and time:

  • %date is replaced by the date and time as yyyyMMddHHmm
  • %day is replace by the day of the month as two digits, from 01 to 31
  • %dow is replaced by the day of week, mon-sun
  • %hour is replaced by the hour of day as two digits, from 00 to 23.

Using these parameters you will be able to create permanent log files (using %date in the path name) or rolling files (using %day, %dow or %hour) with backup files automatically overwriting older files.

Example: the following RootBackupDestinations will save one file on remote server 192.168.1.201, accessing it as user "john" with password "mypassword1", saving the file in the /hsyco_backup/ directory and with rolling names like hsyco-office-mon.zip, hsyco-office-tue.zip, etc. It will also save the backup locally, at /mnt/usb/hsyco_backup/hsyco-office.zip (this file is replaced at every new backup).

scp:john:mypassword1@192.168.1.201:/hsyco_backup/hsyco-office-%dow.zip,/mnt/usb/hsyco_backup/hsyco-office.zip


RootBackupExclude

Default: empty or undefined (logs and motion directories, and the hsyco.jar file are excluded)

Format: comma-separated list of paths that should be skipped during the backup process


You can set this parameter to skip directories and files you don't need be saved in the backup zip file. If you set this parameter, it is recommended to also explicitly list logs, motion and hsyco.jar, if you don't want these in the backup.

Remote HSYCO Servers

The HSYCO Remote I/O Server is a powerful and secure server-to-server communication system that allows an HSYCO server read and write access to all the I/O data points and GUI variables of other remote HSYCO servers. The remote HSYCO Servers settings are used to enable remote HSYCO servers access to this server.

The HSYCO Remote I/O Server uses a secure HTTPS API based on the REST (Representational state transfer) model and the JSON data format. A subset of this API can be used by third-party HTTP client applications. Read the HSYCO Remote API specification for additional details.


Configuration Remote HSYCO Servers.png


RemoteServerPassword

Default:

Format: string (letters and numbers), 8 characters or longer


Set this password to enable this HSYCO server to be accessed by another HSYCO server via the HSYCO Remote I/O Server (see the HSYCO Remote I/O Server Application Note for further information).

The password must be at least 8 characters long. You should use a very long and randomly generated string to reduce the risk of unauthorized access.


RemoteServerAddress

Default:

Format: comma separated list of IP addresses, or *


Set to the IP addresses of the remote HSYCO servers that should be allowed to access this HSYCO server.

Set to * to allow any remote IP address.


RemoteServerControl

Default: false

Format: false | true


Set to true to allow the remote server to modify the data points values of this HSYCO server.


RemoteServerIOFilter

Default:

Format: comma separated list of I/O Servers IDs


If you want to limit remote access and control to just some of the I/O Servers defined in this HSYCO, use this parameter to list the I/O Servers that should be available to the remote HSYCO system.

Filtering out I/O Servers that are not used remotely could have a positive impact on performance and network traffic.


RemoteServerUIFilter

Default:

Format: comma separated list of I/O Servers IDs


If you want to limit remote access and control to just some of the user interface objects defined in this HSYCO, use this parameter to list the objects’ IDs prefixes (a prefix is the first part of the ID, before the first dot character, if you are using a dot-separated notation; use the full ID if not using the dot notation) that should be available to the remote HSYCO system.

Filtering out UI objects that are not used remotely could have a positive impact on performance and network traffic.

Email

Configuration Email.png


SmtpName

Default:

Format: SMTP server name or IP address


SMTP server name or numeric IP address.

This parameter is used by the MAIL action and sendMail() method to send email messages through a specific authenticated and secured SMTP account rather than directly to the recipient’s SMTP server.


SmtpPort

Default: 25, 465 or 587

Format: positive integer number


SMTP server’s port number, if different from the default port.

The default port is:

  • 25 for not encrypted traffic
  • 465 for SMTP over SSL
  • 587 for ESMTP.


SmtpUser

Default:

Format: string


Account’s username to authenticate the connection to the SMTP server.


SmtpPassword

Default:

Format: string


Account’s password to authenticate the connection to the SMTP server.


SmtpSSL

Default: false

Format: false | true | esmtp


Set to “true” for SMTP server that support SMTP over SSL (default port is 465).

Set to “esmtp” for SMTP server that support ESMTP (default port is 587).

Set to “false” for SMTP servers that don’t support traffic encryption.


SmtpDebug

Default: false

Format: false | true


Set to “true” to dump all SMTP sessions data to the console log file. This option is for debugging purposes only, and should not be left set to true when not needed.

Audio Server

Configuration Audio Server.png


AudioServerTTS

Default:

Format: string


This parameter is only needed if you are using a text-to-speech engine that is not the default one for the operating system.

See the Audio and Public Announcement section for additional information.


AudioServerVolume

Default:

Format: integer number


Change the default output volume for pre-recorded audio files and the text-to-speech engine.


AudioServerQuality

Default:

Format: integer number


Change the default quality for the text-to-speech engine.


AudioServerSpeed

Default:

Format: integer number


Change the default speed for pre-recorded audio files and the text-to-speech engine.

Extras

Configuration Extras.png


This section is used to set other not standard parameters that should be saved in hsyco.ini, like application-specific parameters.

The only standard option that you should configure in the extras section is "HTTPSCompatibility", that could be set to "old" to retain support for older browsers.

I/O Servers

HSYCO Server interfaces to several field sub-systems, including lighting and automation systems, video cameras, HVAC controllers, security systems, and other special-purpose devices. HSYCO supports several standard protocols, like BACnet, DALI, DMX, KNX, Modbus, as well as quite a few proprietary protocols.

Most of these field systems are represented inside HSYCO as “I/O servers”. An I/O server is a software module that offers a standardized abstraction layer so that even very different systems can be interfaced using a consistent naming convention and programming model.


Configuration IO Servers.png


Each I/O server must have a unique ID. You can add a new I/O server pressing the + button.


Configuration IO Servers New IO.png


Select the type and enter the server’s unique ID.

Already defined I/O servers could be deleted with the - button or disabled without removing their configuration parameters by unchecking the Enabled checkbox.

Each server type may require different configuration parameters, like IP address and port, serial port id, or authentication information.

Refer to the Application Notes documentation for detailed configuration and interfacing information for I/O servers.

The “Shutdown when inactive” parameter, that is available for all I/O server types, is only used in high availability configurations.

Set it to true to automatically stop the I/O server when the HSYCO server (master or slave) is not the active system. Set to false to keep the I/O server running even when the HSYCO server is not the active system.

Communication Ports

Configuration Communication Ports.png


The Comm Ports section is used to define all serial ports and their configuration parameters.

Each port must have a unique ID. You can add a new ports pressing the + button.


Configuration Communication Ports New Comm.png


Select the type and enter the port’s unique ID.

Already defined ports could be deleted with the - button or disabled without removing their configuration parameters by unchecking the Enabled checkbox.

The different types of comm ports have different configuration parameters.

The CommPortsList is an optional parameter, and should not be required unless the operating system fails to automatically detect the local serial ports. In this case, list all local serial ports using the full operating system port names, for example: /dev/ttyS0,/dev/ttyS1.

Serial ports

Configuration Serial ports.png


To configure one of the real serial ports of the server, or a USB serial adapter, create a port of type “serial”.

Port

Default: mandatory

Format:


Complete or partial system name of the associated communication port. In the Linux based architecture of the HSYCO servers this is the naming convention:

  • COM1: ttyS0 or /dev/ttyS0
  • COM2: ttyS1 or /dev/ttyS1
  • COM3: ttyS2 or /dev/ttyS2
  • COM4: ttyS3 or /dev/ttyS3

For USB connected devices:

  • 1st USB device: ttyUSB0 or /dev/ttyUSB0
  • 2nd USB device: ttyUSB1 or /dev/ttyUSB1
  • ...etc etc


Baud rate

Default: mandatory

Format:


Port speed.


Data bits

Default: mandatory

Format:


The number of bits can be 8, 7, 6 or 5. It should be set to 8 in most cases.


Stop bits

Default: mandatory

Format:


The number of stop bits can be 1, 1.5 or 2.


Parity

Default: mandatory

Format:


Parity can be none, odd, even, mark or space.


Flow control

Default: mandatory

Format:


Flow control can be none, XON/XOFF or RTS/CTS.


Timeout

Default: 2000

Format:


The timeout parameter is optional and could be omitted. It defines the serial port receive timeout, in milliseconds. Defaults to 2 seconds if not defined.

Serial Gateways

Generic serial gateways that provide bi-directional serial port communication via a TCP connection are supported by HSYCO.

Configuration Server ports.png

To configure a comm port to send data to the serial port of a serial gateway, you should set the comm port type to “server”, and set the gateway’s IP address and TCP port number.

The serial port handshake parameters must be set on the gateway using its configuration utilities.

HSYCO supports a high-availability, failover configuration for serial gateways.

HSYCO supports a high-availability, failover configuration for serial gateways. You enable failover by adding a second IP address to the IP parameter.

HSYCO will try to establish a connection using the first IP address, automatically switching to the failover address if a communication error occurs.

In this configuration, the JavaScript or Java closeComm() function can be used to force a reconnect on the next call to readComm() or writeComm(), so that a switch between the fail-over IPs would happen if the current IP is not responding.

HWG I/O Server ports

Some network I/O controllers produced by HWG have a serial port, that could be used as fully functional serial port by HSYCO. To configure these ports, select type “io”, then select the I/O server id of the HWG controller and enter the normal serial port configuration parameters.


Configuration HWG Server ports.png


IRTrans ports

Some IRTrans network IR controllers have a local serial port. HSYCO can use this port as an output-only serial port.

To configure an IRTrans serial port, select type “irtrans”, and select the id of the IRTrans device. The serial port communication parameters, like speed, flow control etc., should be configured on the IRTrans.


Configuration IRTrans ports.png


IRTrans Servers

The IRTrans Servers section is used to define the IRTrans network infrared devices.


Configuration IRTrans Servers1.png


Each IRTrans must have a unique ID. You can add a new devices pressing the + button.


Configuration IRTrans Servers2.png


Already defined devices could be deleted with the - button or disabled without removing their configuration parameters by unchecking the Enabled checkbox.


Configuration IRTrans Servers3.png


The only configuration parameter is the IRTrans IP address.


Cameras

This section is used to define individual IP cameras, to set general configuration parameters for video processing, and to define camera grids for the user interface.


Configuration Cameras1.png


General parameters

CamerasRecordingMotionTriggerSeconds

Default: 5

Format: positive integer number


Number of seconds during which HSYCO keeps on recording from a camera after a recording trigger event for that camera. It is possible to set this parameter at 0, disabling the triggered recording of events; this can be useful in case it is preferred to control recording only through the Java user code or EVENTS.


CamerasRefreshMillis

Default: 1000

Format: positive integer number


Camera frames acquisition interval, in milliseconds. For example, for a frequency of 4 frames a second, set the value to 250. A low value corresponds to a higher number of frames acquired and recorded in the time unit, with a heavier load in terms of CPU resources and disk space.


CamerasResizedQuality

Default: 0.7

Format: decimal number between 0 and 1 (decimals separated by “.”)


Image quality for images processing and resizing. Numbers close to 1 produce a better quality, but heavier load and larger size for each frame.


CamerasMinFreeSpaceBytes

Default: if not set, HSYCO will start deleting older frames when free space is less than 2GB, and stop recording if free space drops below 1GB. If the motion directory is on a separate file system, the default limits are 15% and 10% of total file systems space

Format: positive integer number, followed by K for kilobytes, M for megabytes, G for gigabytes or T for terabytes

Cameras recording is disabled and older frames could be deleted if the file systems's free space drops below this level.

Use the "Extras" tab in "System" settings to set this option.

Cameras parameters

Each camera must have a unique ID. You can add a new cameras pressing the + button in the cameras list panel.


Configuration Cameras2.png


Already defined cameras could be deleted with the - button or disabled without removing their configuration parameters by unchecking the Enabled checkbox.


Configuration Cameras3.png


URL

Default: mandatory

Format: complete URL


Complete URL to acquire single frames in JPEG format, or MJPEG streams, in the desired resolution. Mandatory for each camera. Recording is based on frames acquired with this URL.

When using MJPEG streams, it is advisable to configure the number of frames per second the camera streams to a value that is very close to HSYCO’s frame rate as set with CamerasRefreshMillis.


URL Small

Default:

Format: complete URL

In order to optimize camera processing performance, set this optional parameter. The URL fetches frames at a lower resolution. When serving frames to the Web interface, HSYCO will automatically choose the most appropriate frame resolution to use, based on the size of the frame in the Web interface.

Small frames are also normally used to create grids, improving processing performance.


For a list of supported URLs check here: Camera URLs and here: Encoder URLs.


PTZ

Default:

Format: name of the PTZ driver


Defines the PTZ features of a camera and family of PTZ driver. The PTZ control of a camera is automatically added to the Web interface.

You can click on the edges of the camera image to control the camera: up, down, right, left, zoom and focus.

Supported types are:

Camera.id.PTZ = axis (AXIS PTZ cameras) Camera.id.PTZ = axis-vptz (AXIS fixed cameras with virtual PTZ support) Camera.id.PTZ = panasonic (Panasonic BB and BL Series cameras) Camera.id.PTZ = panasonic-wv (Panasonic WV Series cameras) Camera.id.PTZ = mobotix (Mobotix cameras) Camera.id.PTZ = rovio (the WowWee Rovio camera) Camera.id.PTZ = SNV-3120, SNP-3120, SNP-3120V, SNP-3120H (Samsung cameras) Camera.id.PTZ = vptz (fixed cameras with virtual PTZ support implemented by HSYCO) Camera.id.PTZ = user (to associate custom Java code to the control areas of the image).


Type

Default:

Format: string (letters and numbers)


Defines the camera model type for cameras that support this option. For example, Camera.samsung.Type = SND-5080.


IO

Default:

Format: enabled


For some camera models, you can enable I/O and VA (Visual Analysis) option for a camera. For example, Camera.<camid>.IO=enabled. If you want to enable I/O only, set it to “enabled:io”, or to “enabled:va” to enable VA only.


User

Default:

Format: string (letters and numbers)


When this parameter is defined, the access requests to the frames and the commands for PTZ control of the camera are sent with user and password authentication.


Password

Default:

Format: string (letters and numbers)


When this parameter is defined, the access requests to the frames and the commands for PTZ control of the camera are sent with user and password authentication.


Dropped Frames

Default: 0

Format: integer number ≥ 0


This parameter specifies the number of frames that should be discarded during recording.

For example, setting the value to 1, half of the frames will be recorded out of those normally acquired from the camera; setting the value to 3, 3 frames will be discarded for each frame acquired, thus recording only 1/4 of the acquired frames. Dropping frames reduces space used to store frames on disk, and causes accelerated playback of recorded video.


Max Age

Default: 30d

Format: positive integer number followed by “d” character, for days, “h” for hours or “m” for minutes


Period of time, from when each frame acquired by the camera corresponding is recorded, during which the frames remain on HSYCO’s hard disk.

When this time expires the frames are automatically deleted from the HSYCO motion directory. The older frames can be automatically erased even before their expiration time, in case the space available on disk drops below a safe margin.


Motion Buffer

Default: 0

Format: positive integer number


Recording normally starts exactly when a recording trigger or command is issued. Using this parameter you can have HSYCO start recording some time ahead of the recording command. This is particularly important to capture video a few seconds before an event happens.

When this parameter is set, HSYCO constantly acquires images from the camera, not only when necessary to display or record video. Moreover, the temporary recording of this buffer requires memory resources, and it is therefore convenient not to use high values (values included between 10 and 20, with an acquisition rate of about 400 milliseconds, can be considered normal).

Enable motion buffering only when actually needed.


Remote Password

Default:

Format: string (letters and numbers)


HSYCO can optionally serve live images of its cameras through a password protected HTTP request, for example:

https://<hsycoserver>/x/camera/<cameraid>?password=<password>&size=<width>x<height>

(size is optional) for single frames or:

https://<hsycoserver>/x/camerastream/<cameraid>?size=<width>x<height>&password=<pwd>[&period=<millis>]

to retrieve a MJPEG stream.

It is also possible to define different passwords for clients inside the trusted range of IP addresses and outside.


Trusted Password

Default:

Format: string (letters and numbers)


Similar to RemoteRequestPassword, you can use this optional parameter to set remote passwords for clients inside the trusted range of IO addresses.

Note that requests with the TrustedRequestPassword value will be also served via HTTP, without SSL.


Rotate

Default: 0

Format: integer number


Allows the rotation of the images acquired by a camera. Set to the number of decimal degrees of rotation. A positive number causes a clockwise rotation. Because of the rotation, the images could be cut or have bars at their edges to adapt the rotated picture to the frame size. Setting this parameter could cause a noticeable impact of performance, especially when processing high resolution images.

Grids

You can define up to 99 different combinations of cameras to create matrix displays of multiple cameras. The id is automatically generated when the + button is pressed, starting from 1 and up to 99 with consecutive numbers.

Grids could be deleted using the - button.


Configuration Grids.png


Select an item in the grids list to define the grid’s number of rows and columns and select the cameras for each position. You can leave some positions empty. You should also define the other grid parameters.

Resolution

Default: 0

Format: <width> x <height> in pixels


This optional parameter is used to optimize grid processing performance, especially on large grids when using large size skins for the Web interface.

You can define a maximum resolution for the grid. HSYCO will always deliver this grid with a resolution that is never larger than the width and height defined with this parameter.

The effect is to reduce the byte size of the resulting image, improving performance on remote connections, and to offload the CPU processing required to generate the grid, having a potential benefit on frame rate.


Remote Password

Default: 0

Format: string (letters and numbers)


HSYCO can optionally serve live images of its grids through a password protected HTTP request, for example:

https://<hsycoserver>/x/camera/grid<N>?password=<password>&size=<width>x<height>

(size is optional) for single frames or:

https://<hsycoserver>/x/camerastream/grid<N>?size=<width>x<height>&password=<pwd>[&period=<millis>]

to retrieve a MJPEG stream.

It is also possible to define different passwords for clients inside the trusted range of IP addresses and outside.


Trusted Password

Default: 0

Format: string (letters and numbers)


Similar to RemoteRequestPassword, you can use this optional parameter to set remote access passwords for clients inside the trusted range of IP addresses.

Note that requests with the TrustedRequestPassword value will be also served via HTTP, without SSL.

Data Loggers

The Data Loggers section is used to define HSYCO’s data loggers and their configuration parameters.


Configuration Data Loggers1.png


There is one general configuration parameter:

CSV Separator

Default: comma

Format: tab | comma | semicolon


This parameter defines the field separator character for CSV files generated by the data loggers.


Each data logger must have a unique ID. You can add a new data loggers pressing the + button.


Configuration Data Loggers2.png


Select the type, range or counter, and enter the data logger unique ID.

Already defined data loggers could be deleted with the - button or disabled without removing their configuration parameters by unchecking the Enabled checkbox.

Counter and range data loggers have different configuration parameters.


Counter Data Loggers

Configuration Data Loggers Counter.png


Decimals

Default: 1

Format: integer number


The number of decimal digits to be used for the input data.


Resolution

Default: hour

Format: minute | hour | day | month


Data aggregation maximum resolution.


Hour Interval

Default: 1

Format: divisor of 24


Specifies the number of hours to be grouped into a single interval. For example, if set to 6, the day will be divided in groups of 6 hours: 1-6, 7-12, 13-18, and 19-24.


Set Variables

Default: false

Format: true | false

If set to true (checked), the following variables will be generated:

  • $dlog.<datalogger_id>.hour.tot: its value is updated to the total value of the current hour
  • $dlog.<datalogger_id>.hour.past.tot: its value is updated to the total value of the past hour
  • $dlog.<datalogger_id>.day.tot: its value is updated to the total value of today
  • $dlog.<datalogger_id>.day.past.tot: its value is updated to the total value of yesteday
  • $dlog.<datalogger_id>.month.tot: its value is updated to the total value of the current month
  • $dlog.<datalogger_id>.month.past.tot: its value is updated to the total value of the past month
  • $dlog.<datalogger_id>.year.tot: its value is updated to the total value of the current year
  • $dlog.<datalogger_id>.year.past.tot: its value is updated to the total value of the past year

If slots are used, the following variables will be generated for each slot:

  • $dlog.<datalogger_id>.s<slot_id>.hour.tot: its value is updated to the total value of the current hour for this slot
  • $dlog.<datalogger_id>.s<slot_id>.hour.past.tot: its value is updated to the total value of the past hour for this slot
  • $dlog.<datalogger_id>.s<slot_id>.day.tot: its value is updated to the total value of today for this slot
  • $dlog.<datalogger_id>.s<slot_id>.day.past.tot: its value is updated to the total value of yesteday for this slot
  • $dlog.<datalogger_id>.s<slot_id>.month.tot: its value is updated to the total value of the current month for this slot
  • $dlog.<datalogger_id>.s<slot_id>.month.past.tot: its value is updated to the total value of the past month for this slot
  • $dlog.<datalogger_id>.s<slot_id>.year.tot: its value is updated to the total value of the current year for this slot
  • $dlog.<datalogger_id>.s<slot_id>.year.past.tot: its value is updated to the total value of the past year for this slot


Delete data after

Default:

Format: non-negative integer number


If set to a value greater than zero, data older than the specified amount of days will be deleted.


Consolidate months data after

Default:

Format: non-negative integer number


If set to a value greater than zero, the resolution of data older than the specified amount of days will be reduced to one month.


Consolidate days data after

Default:

Format: non-negative integer number


If set to a value greater than zero, the resolution of data older than the specified amount of days will be reduced to one day.


Consolidate hours data after

Default:

Format: non-negative integer number


If set to a value greater than zero, the resolution of data older than the specified amount of days will be reduced to one hour.


Max Delta

Default:

Format: positive float number


Sets the maximum valid delta between consecutive readings. If the calculated delta exceed such value, the read value is ignored. If not specified, all values are accepted.

Note It is highly recommended to set the delta limit in order to prevent the data series from being corrupted in case of false readings.


Upper Limit

Default: 0

Format: positive float number


Specifies the maximum value that can be reached by the input value. This value will be used in case of counter roll-over. A value of 0 indicates that no upper limit is specified.


Separate Slot Charts

Default: false

Format: true | false


Option for counter data loggers using time slots. Specifies wether or not to use different monthly and yearly charts for each defined time slot.


Align Slots

Default: true

Format: true | false


Option for counter data loggers using time slots with separate charts. Specifies wether or not to align the scale of the slot charts belonging to the same period.


Rates Log File

Default:

Format: file path. e.g.: hsyco/rates.csv


Option for counter data loggers using time slots. Specifies the path of the file where the processed data will be logged. If omitted, no log file will be created.

If the path includes the strings “%Y”, “%M”, or “%D” they will be replaced respectively by the current year, month, or day.

Range Data Loggers

Configuration Data Loggers Range.png


Decimals

Default: 1

Format: integer number


The number of decimal digits to be used for the input data.


Resolution

Default: hour

Format: minute | hour | day | month


Data aggregation maximum resolution.


Hour Interval

Default: 1

Format: divisor of 24


Specifies the number of hours to be grouped into a single interval. For example, if set to 6, the day will be divided in groups of 6 hours: 1-6, 7-12, 13-18, and 19-24.


Set Variables

Default: false

Format: true | false

If set to true (checked), the following variables will be generated:

  • $dlog.<datalogger_id>.hour.min.tot: its value is updated to the minimum value of the current hour
  • $dlog.<datalogger_id>.hour.max.tot: its value is updated to the maximum value of the current hour
  • $dlog.<datalogger_id>.hour.avg.tot: its value is updated to the average value of the current hour
  • $dlog.<datalogger_id>.hour.past.min.tot: its value is updated to the minimum value of the past hour
  • $dlog.<datalogger_id>.hour.past.max.tot: its value is updated to the maximum value of the past hour
  • $dlog.<datalogger_id>.hour.past.avg.tot: its value is updated to the average value of the past hour
  • $dlog.<datalogger_id>.day.min.tot: its value is updated to the minimum value of today
  • $dlog.<datalogger_id>.day.max.tot: its value is updated to the maximum value of today
  • $dlog.<datalogger_id>.day.avg.tot: its value is updated to the average value of today
  • $dlog.<datalogger_id>.day.past.min.tot: its value is updated to the minimum value of yesterday
  • $dlog.<datalogger_id>.day.past.max.tot: its value is updated to the maximum value of yesterday
  • $dlog.<datalogger_id>.day.past.avg.tot: its value is updated to the average value of yesterday
  • $dlog.<datalogger_id>.month.min.tot: its value is updated to the minimum value of the current month
  • $dlog.<datalogger_id>.month.max.tot: its value is updated to the maximum value of the current month
  • $dlog.<datalogger_id>.month.avg.tot: its value is updated to the average value of the current month
  • $dlog.<datalogger_id>.month.past.min.tot: its value is updated to the minimum value of the past month
  • $dlog.<datalogger_id>.month.past.max.tot: its value is updated to the maximum value of the past month
  • $dlog.<datalogger_id>.month.past.avg.tot: its value is updated to the average value of the past month
  • $dlog.<datalogger_id>.year.min.tot: its value is updated to the minimum value of the current year
  • $dlog.<datalogger_id>.year.max.tot: its value is updated to the maximum value of the current year
  • $dlog.<datalogger_id>.year.avg.tot: its value is updated to the average value of the current year
  • $dlog.<datalogger_id>.year.past.min.tot: its value is updated to the minimum value of the past year
  • $dlog.<datalogger_id>.year.past.max.tot: its value is updated to the maximum value of the past year
  • $dlog.<datalogger_id>.year.past.avg.tot: its value is updated to the average value of the past year


Delete data after

Default:

Format: non-negative integer number


If set to a value greater than zero, data older than the specified amount of days will be deleted.


Consolidate months data after

Default:

Format: non-negative integer number


If set to a value greater than zero, the resolution of data older than the specified amount of days will be reduced to one month.


Consolidate days data after

Default:

Format: non-negative integer number


If set to a value greater than zero, the resolution of data older than the specified amount of days will be reduced to one day.


Consolidate hours data after

Default:

Format: non-negative integer number


If set to a value greater than zero, the resolution of data older than the specified amount of days will be reduced to one hour.


Origin

Default: 0

Format: float number


Specifies the origin of the charts.


Range

Default:

Format: low:up


Specifies the range of the charts as “low:up”, where “low” indicates the lower limit and “up” the upper one. The lower and upper limits can be specified as rigid or flexible: if the value of a limit is followed by a “!” (e.g. 0!:20!) then it is rigid, meaning it will not change even if the data logger has processed a value exceeding the range. On the contrary, flexible ranges (e.g. 0:20) will be modified whenever a value exceed it.

If the parameter is omitted, the charts will range from the lowest processed value to the highest one.


Out of Range Mode

Default: cut

Format: cut | ignore


Option for range data loggers with a predefined range. Specifies the behavior of the data logger when updated with a value which exceed the set value range: if “cut” is specified then the value is adjusted to the limits, else, if this parameter is set to “ignore”, the passed value is not taken into account. In both cases, an error message is reported for out of range values.

Tools

By clicking on the tools icon it is possible to access the data recovery and size functions.

Data Recovery

The data recovery tool allows to import data loggers' data from an old backup of the "data" folder. It can be used in case of database corruption or hard disk failure.

Configuration Data Loggers Recovery.png

Enter the name of the folder containing the backup (default: "data_backup", must be located in HSYCO's root folder) and specify whether or not to overwrite existing data. This option specifies how to handle data which are stored both in the backup database and in the current database and relative to the same time. If the checkbox is set the data in the backup will overwrite the current data, otherwise the current data will be preserved.

When clicking on "Restore" all the data of the currently defined and enabled data loggers available in the backup will be imported.

Size Report

Clicking on the data logger size button opens the size report page, where all counter and range data loggers are listed with the number of data rows stored in the database for each data logger, and the grand total. This is quite useful to fine tune the data decimation and data expiration settings.

Configuration Data Loggers Size.png


Please note that, if you have a large amount of data stored in data loggers, the report will take some time to become available.

DMX

The DMX section is used to define the DMX-512 gateways.


Configuration DMX1.png


Each DMX gateway must have a unique ID. You can add a new devices pressing the + button.


Configuration DMX2.png


Already defined devices could be deleted with the - button or disabled without removing their configuration parameters by unchecking the Enabled checkbox.

HSYCO supports three different DMX solutions, using different configuration parameters.

KissBox DMX Network Gateways

For KissBox network gateways, check IP and enter the IP address and port number.


Configuration DMX KissBox.png


ENTTEC DMX USB PRO DMX Gateways

For the ENTTEC DMX USB PRO DMX gateways, check Comm and enter the virtual serial port name assigned to the USB port. See the ENTTEC DMX USB PRO application note for additional information.


Configuration DMX Enttec.png

Domino and Contatto DMX devices

When using Doemmegi’s Domino or Contatto systems DMX devices, check ID and enter the full device name, including the I/O server prefix. See the Domino or Contatto application notes for additional information.


Configuration DMX Duemmegi.png

Location Services

The Location Services section is used to define the WiFi access points used to locate the WiFi clients position.


Configuration Location Services1.png


Each access point must have a unique ID. You can add a new devices pressing the + button.


Configuration Location Services2.png


Already defined devices could be deleted with the - button or disabled without removing their configuration parameters by unchecking the Enabled checkbox.


Configuration Location Services3.png


The only configuration parameter is the access point IP address.

Timers

The Timers section is used to define user timers.


Configuration Timers1.png


Each timer must have a unique ID. You can add a new timers pressing the + button.


Configuration Timers2.png


Already defined timers could be deleted with the - button or disabled by unchecking the Enabled checkbox. Timers don’t require any configuration parameter besides the id.

Squeezebox

This section is used to define the Squeezebox server and music players.


Configuration Squeezebox1.png


You should set the Squeezebox server’s IP address or network name and port number.

Each player must have a unique ID. You can add a new devices pressing the + button.


Configuration Squeezebox2.png


Already defined devices could be deleted with the - button or disabled without removing their configuration parameters by unchecking the Enabled checkbox.


Configuration Squeezebox3.png


The only configuration parameter is the player id, usually its MAC address.