Service: App

Interacting with the local application instance

Functions in this service are always executed in the context of the user and station currently active that the module is connected to.

Functions

ResultName / ParamsComment
boolapp.CommandExecute a menu command.
namestringCommand name like 'view.panel.video', 'system.files' etc.
boolapp.ExecuteScriptExecutes a script.
filestringName of the .wgt or .js file relative to scripts folder.
paramsvalue{}(Optional) Parameters for the script.
boolapp.CancelScriptStops execution of a script.
filestringName of the .js file relative to scripts folder.
boolapp.CancelActionsStops execution of pending actions by their Id.
filestringId of the pending actions.
boolapp.Login <wg 0.6.0Performs user login.
userstringUser login or code.
passwordstringUser password.
forcedbool(Optional) Login without queries, unsaved content may be lost.
boolapp.LogoutPerforms user logout.
forcedbool(Optional) Logout without queries, unsaved content may be lost.
stringapp.GetLanguageGet current language.
boolapp.SetLanguageSet current language.
idstringLanguage Id (de, en, ...).
forcedbool(Optional) Set language without queries, unsaved content may be lost.
stringapp.GetThemeGet current theme.
boolapp.SetThemeSet current theme.
idstringTheme Id (arctic, light_grey, ...).
forcedbool(Optional) Set theme without queries, unsaved content may be lost.
boolapp.SelectSegmentSelects a segment in the explorer.
idguidId of the segment for remove of selection.
doubleclickbool(Optional) Double click on selection.
guidapp.GetSelectedSegmentGet Id of currently selected segment.
boolapp.SelectLocationSelects a location in the explorer.
idguidId of the location or null for remove of selection.
doubleclickbool(Optional) Double click on selection.
guidapp.GetSelectedLocationGet Id of currently selected location.
boolapp.SelectDatapointSelects a Datapoint in the explorer.
idguidId of the Datapoint or null for remove of selection.
doubleclickbool(Optional) Double click on selection.
guidapp.GetSelectedDatapointGet Id of currently selected Datapoint.
boolapp.SelectEventSelects an Event in the event list.
idguidId of the Event or null for remove of selection.
doubleclickbool(Optional) Double click on selection.
guidapp.GetSelectedEventGet Id of currently selected Event.
boolapp.SelectIncident ≥wg.app 0.1.0Selects an Incident in the event list.
idstringIncident URL.
doubleclickbool(Optional) Double click on selection.
boolapp.FetchEventFetch the Event with the given id
idguidId of the Event
boolapp.PlaySoundPlays a sound file.
soundstringName of the sound file relative to sounds folder.
loopbool(Optional) Play sound in a loop.
boolapp.StopSoundStops a looped sound.
allboolStop looped sound from every source, not only from scripts.
intapp.GetLocalStationRetrieves the local station number.
voidapp.ConnectAudio ≥wg.app 0.4.0Connects audio inputs to outputs.
idstring(Optional) An optional id for the audio connection, used as name by the audio control panel for the corresponding connection, can also be used as reference to end the connection.
sourcesguid[]Ids of the audio input Datapoints.
destinationsguid[]Ids of the audio output Datapoints.
priorityintThe priority of the connect audio activity.
delayintDelay before the audio connects.
connectavailableonlyboolIf true, audio inputs are connected to free audio outputs, otherwise this audio connect activity gets discarded if there are no available audio outputs.
repeatboolAudio shall be played cyclically.
parametersstring(Optional) Additional extension-specific parameters.
eventidguid(Optional) The audio connect activity should be executed under the context of this event.
boolapp.ShowVideo ≥wg 0.4.0Shows the video source on the given target.
sourceidguidID of the camera datatpoint. If the ID is the null GUID, the command will remove the camera on the target.
targeturlstring(Optional) Only necessary if the target is the Video Manager, a display or the camera control panel. Only the following types of URLs are allowed: "VideoManager[1..4]", "VideoDisplay[1..4]/Window[1..4]" and "VideoPanel"
targetidguid(Optional) ID of the target Datapoint. Only necessary when targeturl is empty.
targetpanestring(Optional) The area of the target, which should show the camera.
streamstring(Optional) The video stream, which should be shown.
modestring(Optional) Sets live or archive mode. Only the following values are allowed: "live" and "archive".
speedstring(Optional) Only valid when mode="archive". The desired speed of the video. The sign indicates the direction. Only the following values are allowed: "0", "0.125", "0.25", "0.5", "1", "2", "4", "8" and all of their negative counterparts.
timetime(Optional) Only valid when mode="archive". The time on which the video should start.
markeroffsetint(Optional) Only valid when mode="archive". An offset in seconds to define the time of the start marker in respect to the current time.
markerdurationint(Optional) Only valid when mode="archive". A duration in seconds. It defines the position of the end marker by defining the time range between start and end marker. If set to 0, the start and end marker are removed.
loopbool(Optional) Only valid when mode="archive". Loop video between markers.

Notifications

Name / ParamsComment
app.LanguageChangedNotifies change of current language.
idstringLanguage Id (de, en, ...).
app.ThemeChangedNotifies change of current theme.
idstringTheme Id (arctic, light_grey, ...).
app.SettingsChangedNotifies change of current settings.
settingsvalue{}Changed settings.
app.SegmentSelectedNotifies selection of a segment in the explorer.
idguidId of the segment or null for no selection.
app.LocationSelectedNotifies selection of a location in the explorer.
idguidId of the selected location or null for no selection.
app.DatapointSelectedNotifies selection of a Datapoint in the explorer.
idguidId of the selected Datapoint or null for no selection.
app.EventSelectedNotifies selection of an Event in the event list.
idguidId of the selected Event or null for no selection.
Last modified September 25, 2026