This section documents all the HTML Tags that are used in the HomeSeer default web user interface. These tags are used by the HomeSeer web interface. The tags can be used in your own web pages as well as dashboard pages.
The tags are supported by Scriban. See the Scriban docs for information about tag formatting as well as the Scriban language.
See HTML Pages section for more information on how to use these tags.
Scriban Tags for HomeSeer HTML Pages Documentation
|
Kind |
Member |
Summary |
Parameters |
Returns |
|
Type |
|
Static functions to import for HTML file template tags needs to be a sealed class (static class in C#) |
|
|
|
Method |
|
Returns the name of the style sheet to use, without the extension |
|
String, style sheet name |
|
Method |
|
Return all the available style sheets that can be used to style the website |
|
List(Of String), available style sheets |
|
Method |
|
Returns the system date format for a given format name. Supported format names are: shortdatepattern, longdatepattern, shorttimepattern, longtimepattern, monthdaypattern, yearmonthpattern |
format_name |
String |
|
Method |
|
Returns the system date format for a given format name, but modified for use in date pickers. Supported format names are: shortdatepattern, longdatepattern, monthdaypattern, yearmonthpattern |
format_name |
|
|
Method |
|
Use the .NET date format for format a date time |
modifier: The format of the date per .net docs |
|
|
Method |
|
Returns the URL of the registration server |
|
String |
|
Method |
|
Returns the current platform, for example "linux" or "windows" |
|
|
|
Method |
|
|
v1; v2 |
-1 = File Version 2 is greater than File Version 1 0 = Versions are the same 1 = File version 1 is greater than File Version 2 |
|
Method |
|
Return the current HomeSeer software version |
|
|
|
Method |
|
Return the available release version of HomeSeer, if available. If no release update is available, returns "None" |
|
|
|
Method |
|
Return the URL for the release notes for the current version of HomeSeer |
|
String |
|
Method |
|
Return the URL for the release notes for the current beta version of HomeSeer |
|
|
|
Method |
|
Return the URL for a given HTML page Supported page values: devices,events,setup,setup_general,setup_users,setup_categories,setup_network, setup_email,setup_email,setup_cameras,setup_voice,setup_custom,setup_labs, cameras_live,cameras_recordings,tools_help,tools_timerscounters,tools_runscript, tools_energy,tools_log,tools_about,plugins_add,plugins_installed,shutdown, restart,linuxtools,linuxchangepw |
page: The name of the page to get the URL for |
|
|
Method |
|
Return the value of a postback variable from the last request. For example, if you have a form field with name "username", you can get the value submitted in that field with postback_val("username") |
varname: The name of the postback variable |
The value of the postback variable |
|
Property |
|
Holds the queries from the last request. Can be used to see if any queries were added to the URL |
|
|
|
Type |
|
Class to hold name/value pairs for the about page information |
|
|
|
Method |
|
Return the license agreement text from the embedded resource license.txt file |
|
|
|
Method |
|
Return system information |
full: True=full info, False=non personal information only |
|
|
Method |
|
Returns a list of script files in the scripts folder |
|
List(of string) |
|
Method |
|
Read the contents of a script file and return |
filename: Filename of the file to read. The file must exist in the scripts folder |
Contents of the file |
|
Method |
|
Returns a list of files in the Media folder |
|
List(of String) |
|
Method |
|
Return the total number of devices configured in the system Includes child devices |
|
Integer device count |
|
Property |
|
Returns the system type which is one of the following HS4STANDARD HS4PRO HS4ZEES2 |
|
Integer |
|
Property |
|
Returns the user agent of the browser that issued the request |
|
String |
|
Property |
|
Returns the last tab that was selected in Setup |
|
String |
|
Property |
|
Returns the user currently logged into the page |
|
String |
|
Method |
|
Return True if location 1 should be displayed first |
|
|
|
Method |
|
Return True if location 2 should be used. If false, location 2 is not used and should not be displayed |
|
|
|
Method |
|
Returns the name assigned to location 1 |
|
String |
|
Method |
|
Returns the name assigned to location 2 |
|
String |
|
Method |
|
Returns a string array of all locations (location 1) |
|
String() |
|
Method |
|
Returns a string array of all locations (location 2) |
|
String() |
|
Method |
|
For the devices view, returns all the locations selected (location 2) |
session |
List(of String) |
|
Method |
|
For the devices view, returns all the locations selected (location 1) |
session |
List(of String) |
|
Method |
|
For the devices view, returns the total number of features for all devices that match the current filters. This is used for paging purposes to know how many total items there are across all pages |
session: The session identifier |
The total number of features for all devices that match the current filters |
|
Method |
|
For the events list, return the list of group IDS that are currently selecte Empty list indicates all groups |
|
|
|
Method |
|
For the events list, return true if the given group id is part of the current filter. If the filter list is empty, then all groups are included and this function returns true for all group ids |
groupid: The group identifier to check |
True if the group id is part of the current filter or if the filter list is empty, otherwise false |
|
Method |
|
For the events list, return true if the given device ref is part of the current referencing devices filter. If the filter list is empty, then all devices are included and this function returns true for all device refs |
ref: The device reference to check |
True if the device ref is part of the current filter or if the filter list is empty, otherwise false |
|
Method |
|
For the events list page, return the list of device refs that will be compared with all events to filter the events group list. An empty list implies that not filtering is enabled |
|
|
|
Method |
|
Uses current referencing devices filter and checks if any of the devices are referenced in any event that is part of the passed event group id |
groupid |
|
|
Method |
|
Uses current referencing devices filter and checks if any of the devices are used in the passed event reference id |
sevref |
|
|
Type |
|
For the events list, returns a list of event_name_item which contains the event name, group name and event ref for all events that reference the given device ref in any of their actions or triggers. This is used to display the list of events that reference a device when filtering by referencing devices on the events page |
|
|
|
Method |
|
For the events list, returns a list of event_name_item which contains the event name, group name and event ref for all events that reference the given device ref in any of their actions or triggers. If include_all_features is true, then it also includes events that reference any device that is associated to the given device ref. This is used to display the list of events that reference a device when filtering by referencing devices on the events page |
ref: The device reference to check; include_all_features: If true, includes events that reference any device associated with the given device ref |
A list of event_name_item containing the event name, group name, and event ref for all matching events |
|
Type |
|
Class used for the referencing devices cache for events. Each item contains the device ref, event group id and a boolean indicating if the device is used in global actions or conditions. The cache is a dictionary with event ref as the key and a list of these items as the value, which allows for quick lookup of all devices that are used in a given event and also allows for filtering by group id when filtering the events list by referencing devices on the events page |
|
|
|
Method |
|
Launches a thread to totally rebuild the referencing devices cache. Used by the events page |
|
|
|
Method |
|
Thread that monitors the DeviceInEventsCacheNeedsRebuild flag and calls the cache rebuild when needed. This allows the cache to be rebuilt in a separate thread without impacting the performance of the main thread which is used for the UI. The cache is rebuilt when there are changes to devices or events that may impact the referencing devices cache for events, such as a device being added, deleted or modified or an event being added, deleted or modified. The flag is set to true when any of these changes occur and this thread will handle rebuilding the cache in the background. If multiple changes occur in a short period of time, the flag will be set to true multiple times but the cache will only be rebuilt once after all changes have been made, which improves performance by avoiding multiple rebuilds in quick succession. |
|
|
|
Method |
|
Called by a thread to rebuild the referencing devices cache |
|
|
|
Method |
|
Updates a single event in the referencing devices cache by finding all devices that the given event is using |
evref |
|
|
Method |
|
Actual thread called by UpdateSingleEventCacheItem |
th_parms |
|
|
Method |
|
Checks the given device ref to see if the device is used in event Uses the referencing devices cache |
devref |
|
|
Method |
|
Called by DevicesInEventsCacheInit to update any events in the referencing events cache that reference the given device |
device_ref |
|
|
Method |
|
Takes an event and a device and updates or creates an entry in the referencing devices cache. Cache key is event ref id. |
ev; dvref |
|
|
Method |
|
Adds or updates a single entry in the referencing devices cache |
evref; devref; groupref |
|
|
Method |
|
For the devices view, returns all the categories selected |
session |
List(of String) |
|
Method |
|
For the devices view, returns all the filter tags selected |
for_web |
List(of String) |
|
Method |
|
Set the live filter that the user is currently entering into the chips input box |
new_filter |
|
|
Method |
|
Get the live filter that the user is currently entering into the chips input box. This is used to temporarily store the filter as the user is typing so that it can be applied when they hit enter or click away from the input box, without applying the filter on every keystroke which would impact performance |
|
|
|
Method |
|
Clear the live filter that the user is currently in the process of entering |
|
|
|
Method |
|
Takes a string that contains embedded quotes and replaces the quotes with the URL encoded value for quotes. This is used when passing filter values that may contain quotes in the URL for the devices page so that the quotes are not lost when the URL is decoded on the other side. This allows for filtering by values that contain quotes, such as device names with quotes in them |
txt |
|
|
Method |
|
URL encodes a string using UTF-8 encoding. This is used when passing filter values that may contain special characters in the URL for the devices page so that the special characters are not lost when the URL is decoded on the other side. This allows for filtering by values that contain special characters, such as device names with special characters in them. |
txt |
String |
|
Method |
|
This method encodes strings. For instance, single quotation marks and double quotation marks are included as \' and \" in the encoded string. |
value: A string to encode. |
An encoded string. |
|
Method |
|
For the devices view, returns the current device view format which is used to determine how to display the devices on the devices page. The value is stored in the session so that it can be different for each user and persist as they navigate through the pages. If there is an issue getting the value from the session, it returns a default value which is defined in gDeviceViewFormat. This allows for different users to have different device view formats and for the selected format to persist as they navigate through the pages. The device view format determines how much information about each device is displayed on the devices page, such as whether to show just the device name, or to also show the location, category, and other information. |
session: The session identifier for the current user. |
The current device view format for the specified session. |
|
Method |
|
For the devices view, returns whether bulk edit mode is enabled for the current session. Bulk edit mode allows for multiple devices to be selected and edited at the same time on the devices page. The value is stored in the session so that it can be different for each user and persist as they navigate through the pages. If there is an issue getting the value from the session, it returns false which means that bulk edit mode is not enabled. This allows for different users to have bulk edit mode enabled or disabled based on their preference and for the selected state to persist as they navigate through the pages. When bulk edit mode is enabled, checkboxes are displayed next to each device on the devices page to allow for selecting multiple devices, and actions can be performed on all selected devices at once. |
session: The session identifier for the current user. |
True if bulk edit mode is enabled for the specified session; otherwise, false. |
|
Property |
|
For the devices view, returns the current sort mode which is used to determine how to sort the devices on the devices page. The value is stored in the session so that it can be different for each user and persist as they navigate through the pages. If there is an issue getting the value from the session, it returns 0 which is the default sort mode. This allows for different users to have different sort modes and for the selected sort mode to persist as they navigate through the pages. The sort mode determines how the devices are sorted on the devices page, such as by device name, location, category, or other criteria. |
|
The current sort mode for the specified session. |
|
Property |
|
Used to hold JUI HTML information for use in the plugin wrapper HTML page |
|
|
|
Property |
|
For JUI plugin pages, this holds the ID of the plugin |
|
|
|
Type |
|
Defines information about a single session, used internally |
|
|
|
Method |
|
Queue a device that has changed Used by devices page to update devices that have changed Called internally only |
ref: device reference ID as integer |
|
|
Method |
|
A session value is store as a Cookie in each page, this gets a new session when the cookie is not available. It is then passed in the header when the browser requests a page and put in current_session so the page can be built using existing saved information |
|
|
|
Type |
|
Class used for the devices with locations list on the devices page. Each item contains a device reference, name and a list of child devices if the device is a parent. This is used to display the devices in a hierarchical structure based on their location and association, with parent devices at the top level and their associated child devices nested underneath them. The list of these items is organized in a dictionary with location2 as the first key and location as the second key, which allows for grouping devices by their location and sublocation on the devices page. |
|
|
|
Method |
|
Returns a dictionary of all devices organized by their location and sublocation. The first level key is location2, the second level key is location, and the value is a list of device_item which contains the device reference, name and list of child devices for each device in that location. This is used to display the devices on the devices page grouped by their location and sublocation, with parent devices at the top level and their associated child devices nested underneath them. The method iterates through all devices in HomeSeer and organizes them into this structure based on their location and association information. |
|
A sorted dictionary where the first level key is location2, the second level key is location, and the value is a list of device_item representing the devices in that location. |
|
Type |
|
Defines the different sort modes for the devices list on the devices page. The sort mode determines how the devices are sorted when displayed on the devices page, such as by device name, location, category, or other criteria. The value is stored in the session so that it can be different for each user and persist as they navigate through the pages. This allows for different users to have different sort modes and for the selected sort mode to persist as they navigate through the pages. The sorting is applied after filtering so that the filtered list of devices is sorted according to the selected sort mode before being displayed on the devices page. |
|
|
|
Method |
|
Sets a flag to cancel the building of device lists. This is used to stop the building of device lists when they are no longer needed, such as when navigating away from the devices page before the list has finished building. The flag is checked during the building process and if it is set, the building process is stopped to save resources and improve performance. This allows for more efficient use of resources by preventing unnecessary building of device lists when they are no longer needed. |
|
|
|
Method |
|
Returns a list of devices of type "device". The device list is This list of devices is stored seperately for each devices.html page using the session key |
sort |
List(of device) |
|
Method |
|
Determines whether a device should be shown on the devices page based on the global hidden setting and whether the device is marked as hidden. If the global setting to hide devices is enabled, it checks if the device is marked as hidden. If the device is marked as hidden, it checks if it has any child devices that are not marked as hidden. If it has child devices that are not marked as hidden, then the parent device will be shown to allow access to the child devices. If all child devices are also marked as hidden, then the parent device will not be shown. If the global setting to hide devices is not enabled, then all devices will be shown regardless of their hidden status. This allows for a more flexible display of devices on the devices page based on user preferences for hiding certain devices while still allowing access to their associated child devices if needed. |
sref: The reference ID of the device as a string. |
True if the device should be shown, False otherwise. |
|
Method |
|
Given a device reference ID as a string, this function searches through the list of devices stored in the current session to find a device that matches the reference ID. If a matching device is found, it is returned. If no matching device is found, it attempts to find the device using a slower method that does not rely on the session's device list, which may be necessary if there are issues with multiple tabs or if the session's device list has not been built yet. If the device is still not found after the slower method, it returns a new instance of a device with default values. This function allows for retrieving a specific device based on its reference ID while handling potential issues with the session's device list and ensuring that a valid device object is returned even if the specified reference ID does not correspond to an existing device. |
ref: The reference ID of the device as a string. |
A device object corresponding to the specified reference ID, or a new device object if not found. |
|
Method |
|
Given a ref ID return a single device from the global device list This is not using the sessions device list due to errors with multiple tabs Pages use this call to display a device and do not need the filtered list |
ref: Device reference number as string |
Single device of type "device" |
|
Method |
|
Given a device reference ID and a child reference ID as strings, this function searches for the specified child device (feature) within the specified parent device. It first retrieves the parent device using the device reference ID, then iterates through the child devices of the parent to find a child that matches the child reference ID. If a matching child is found, it is returned. If no matching child is found, it returns a new instance of a child with default values. This function allows for retrieving a specific child device (feature) based on its reference ID and its parent device's reference ID, while handling potential issues with finding the specified child and ensuring that a valid child object is returned even if the specified reference IDs do not correspond to existing devices. |
device_ref: The reference ID of the parent device as a string.; child_ref: The reference ID of the child device as a string. |
A child object corresponding to the specified child reference ID, or a new child object if not found. |
|
Method |
|
Searches all child devices (features) for a feature that matches the requested priority Used to find a default feature to display on the grid view when no priority devices are selected Uses the global hidden setting to exclude devices marked as hidden and show mode is "hide marked" |
source_ref |
|
|
Method |
|
Given a device reference ID as a string, this function retrieves the corresponding DeviceClass object from the global device list. It attempts to convert the reference ID to an integer and then uses the GetDeviceByRef function to retrieve the DeviceClass object. If successful, it returns the DeviceClass object. If there is an error during conversion or retrieval, it catches the exception and returns Nothing. This function allows for retrieving detailed information about a device based on its reference ID while handling potential errors gracefully. |
ref: The reference ID of the device as a string. |
A DeviceClass object corresponding to the specified reference ID, or Nothing if not found or an error occurs. |
|
Method |
|
Given a device reference ID as a string, this function retrieves the display index of the corresponding device from the global device list. It attempts to convert the reference ID to an integer and then uses the GetDeviceByRef function to retrieve the DeviceClass object. If successful, it returns the DisplayIndex property of the DeviceClass object as a string. If there is an error during conversion or retrieval, it catches the exception and returns an empty string. This function allows for retrieving the display priority order of a device based on its reference ID while handling potential errors gracefully. |
ref: The reference ID of the device as a string. |
The display index of the device as a string, or an empty string if not found or an error occurs. |
|
Method |
|
Given a device reference ID as a string, this function retrieves the device type information of the corresponding device from the global device list and formats it into a human-readable string. It attempts to convert the reference ID to an integer and then uses the GetDeviceByRef function to retrieve the DeviceClass object. It then extracts the device type information, including the API type, feature type, and subtypes if applicable, and formats this information into a string that describes the device type in a more understandable way. If there is an error during conversion or retrieval, it catches the exception and returns an empty string. This function allows for providing a user-friendly description of a device's type based on its reference ID while handling potential errors gracefully. |
ref: The reference ID of the device as a string. |
A string describing the device type, or an empty string if not found or an error occurs. |
|
Method |
|
Given a device reference ID as a string, this function retrieves the relationship type of the corresponding device from the global device list and formats it into a human-readable string. It attempts to convert the reference ID to an integer and then uses the GetDeviceByRef function to retrieve the DeviceClass object. It then extracts the relationship type information and formats it into a string that describes the relationship of the device in a more understandable way, such as "Feature (Child)" for child devices or "Device (Root)" for parent/root devices. If there is an error during conversion or retrieval, it catches the exception and returns "Unknown". This function allows for providing a user-friendly description of a device's relationship type based on its reference ID while handling potential errors gracefully. |
ref: The reference ID of the device as a string. |
A string describing the device's relationship type, or "Unknown" if not found or an error occurs. |
|
Method |
|
Given a device reference ID as a string, this function retrieves the list of associated devices for the corresponding device from the global device list and formats it into a human-readable string. It attempts to convert the reference ID to an integer and then uses the GetDeviceByRef function to retrieve the DeviceClass object. It then checks if the device has any associated devices and, if so, iterates through the list of associated device references to build a formatted string that includes the name and reference ID of each associated device. The resulting string is a comma-separated list of associated devices in the format "DeviceName (RefID)". If there are no associated devices or if there is an error during conversion or retrieval, it catches the exception and returns an empty string. This function allows for providing a user-friendly description of a device's associated devices based on its reference ID while handling potential errors gracefully. |
ref: The reference ID of the device as a string. |
A string describing the associated devices, or an empty string if none are found or an error occurs. |
|
Method |
|
Returns a list of pages registered as device inclusion pages |
|
Dictionary(Of String, WebPageDesc) |
|
Method |
|
Returns "checked" if ALL devices are checked on the bulk edit page for a given session, otherwise returns an empty string. This is used to determine the state of the "select all" checkbox on the bulk edit page, allowing it to reflect whether all individual device checkboxes are currently selected or not. It compares the total number of devices (including child devices) in the session with the number of checked devices to determine if all devices are selected. If they match, it returns "checked"; otherwise, it returns an empty string. |
session_storage: The session storage identifier. |
A string indicating the checkbox state ("checked" or empty). |
|
Method |
|
On bulk devices page returns True if given device is checked |
sref |
String |
|
Method |
|
Initializes the filters list by attempting to load saved filter settings from a JSON file. If the file exists and contains valid JSON, it deserializes the content into a ConcurrentDictionary of filterssave objects and assigns it to the FiltersList variable. If the file does not exist or if there is an error during deserialization, it initializes an empty FiltersList. It also ensures that there is a filterssave object for the current user in the FiltersList, creating one if it does not already exist. This function allows for restoring user-specific filter settings when the application starts while handling potential errors gracefully. |
|
|
|
Method |
|
Resets all event filters for all users. It clears the selected referencing devices and group filters for each filterssave object in the FiltersList. This function allows for resetting the filter settings to their default state. |
|
|
|
Method |
|
Returns a list of all categories configured for a specific device |
ref: Device reference ID of the device to check |
List(of String) |
|
Method |
|
Returns a list of all categories configured in the system |
|
List(Of String) |
|
Method |
|
Returns the display priority of a device based on its index in the associated devices list of its parent device. It retrieves the parent device using the provided reference ID and then iterates through its associated devices to find the one that matches the specified index. If a matching device is found, it returns its DisplayType, which indicates its display priority (e.g., normal, high, low). If no matching device is found or if there is an error during retrieval, it returns a default value of PriorityDisplayType.DISPLAY_NORMAL. This function allows for determining the display priority of a device based on its position in the associated devices list of its parent device while handling potential errors gracefully. |
ref: The reference ID of the parent device.; index: The index of the associated device. |
The display priority of the device. |
|
Method |
|
Returns the display priority of a device based on its reference ID in the associated devices list of its parent device. It retrieves the parent device using the provided reference ID and then iterates through its associated devices to find the one that matches the specified reference ID. If a matching device is found, it returns its DisplayType, which indicates its display priority (e.g., normal, high, low). If no matching device is found or if there is an error during retrieval, it returns a default value of PriorityDisplayType.DISPLAY_NORMAL. This function allows for determining the display priority of a device based on its reference ID in the associated devices list of its parent device while handling potential errors gracefully. |
ref: The reference ID of the parent device.; featureref: The reference ID of the associated device. |
The display priority of the device. |
|
Method |
|
Return the value of a device |
ref |
|
|
Method |
|
Return True if the given device exists |
ref: Device reference number |
True or False |
|
Method |
|
Returns "checked" if the requested bit in the device MISC property is checked |
ref: Device reference ID; bit: String like 512 or 2048, or 1 |
|
|
Method |
|
Calls a property on the device class |
ref: Device reference number; prop_name: Name of property to call |
Property value as string |
|
Method |
|
Returns the version number of a device given its reference ID as a string. It attempts to convert the reference ID to an integer and then uses the GetDeviceByRef function to retrieve the DeviceClass object. If successful, it returns the Version property of the DeviceClass object as a double. If there is an error during conversion or retrieval, it catches the exception and returns 0. This function allows for retrieving the version number of a device based on its reference ID while handling potential errors gracefully. |
ref: The reference ID of the device. |
The version number of the device as a double. |
|
Method |
|
Gets the full name of a device including location2, location1, and the name |
sref: A string, the reference # of a device |
The device name as string |
|
Method |
|
Returns True if the user agent indicates that the page is being accessed from HomeSeer Mobile. It checks if the user agent string contains "homeseermobile" and returns True if it does, indicating that the page is being accessed from HomeSeer Mobile. If there is an error during this check, it catches the exception and returns False. This function allows for determining if the page is being accessed from HomeSeer Mobile while handling potential errors gracefully. |
|
Boolean indicating if the page is being accessed from HomeSeer Mobile. |
|
Property |
|
Holds an error message that is to be displayed on the error.html page when an error is detected |
|
|
|
Method |
|
Returns True if the user agent indicates that the page is being accessed from a mobile browser. It checks if the user agent string contains "Android", "iPhone", or "Mobile" and returns True if any of these substrings are found, indicating that the page is being accessed from a mobile browser. If there is an error during this check, it catches the exception and returns False. This function allows for determining if the page is being accessed from a mobile browser while handling potential errors gracefully. |
|
Boolean indicating if the page is being accessed from a mobile browser. |
|
Method |
|
Return True if the application is registered or on a trial |
|
Boolean |
|
Method |
|
include another HTML snippet into an existing file the template parser will not parse any tags in this snippet after the text is inserted so we parse the tags here and return the complete html |
sfile: The name of the file to include, path is relative to the location of the requested source file |
complete parsed HTML |
|
Method |
|
Parses a string of text as a Scriban template and returns the rendered result. It creates a new ScriptObject and TemplateContext, imports the functions class into the ScriptObject, and pushes it to the global context. It then parses the input text as a Scriban template and checks for any parsing errors. If there are no errors, it renders the template using the TemplateContext and returns the resulting string. If there is an error during parsing or rendering, it catches the exception and returns an error message indicating that there was an error parsing the text along with the exception message. This function allows for processing a string of text as a Scriban template while handling potential errors gracefully. |
stext: The string of text to be parsed as a Scriban template. |
The rendered result of the Scriban template as a string, or an error message if parsing fails. |
|
Method |
|
Includes another file into the HTML document and processes any tags in the file before returning it. It reads the content of the specified file, processes it as a Scriban template, and returns the resulting HTML string. The function takes two parameters: sfile, which is the name of the file to include (with the path relative to the location of the requested source file), and args, which is an array of arguments that can be passed to the template. It creates a new ScriptObject and TemplateContext, imports the functions class into the ScriptObject, and pushes it to the global context. If there are any arguments provided, it adds them to the ScriptObject with variable names var1, var2, etc. It then parses the content of the file as a Scriban template and checks for any parsing errors. If there are no errors, it renders the template using the TemplateContext and returns the resulting string. If there is an error during parsing or rendering, it catches the exception and returns an error message indicating that there was an error building a custom card along with the exception message. This function allows for including another file into an HTML document while processing any tags in that file and handling potential errors gracefully. |
sfile: The name of the file to include, with the path relative to the location of the requested source file.; args: An array of arguments that can be passed to the template. |
The rendered result of the included file as a string, or an error message if parsing fails. |
|
Method |
|
Includes another file into the HTML document but only if the page is being displayed on a mobile device such as HomeSeer Mobile. Any tags in the file are processed before the file is returned. |
sfile: The file to include |
Contents of file |
|
Method |
|
Includes another file into the HTML document but only if the page is NOT being displayed on a mobile device such as HomeSeer Mobile. Any tags in the file are processed before the file is returned. |
sfile: The file to include |
Contents of file |
|
Method |
|
Returns a page to the HomeSeer logo image |
|
|
|
Method |
|
Returns the current date and time |
|
String |
|
Type |
|
Class used by event.html to describe a device |
|
|
|
Property |
|
Sort the status/value pairs in numerical order |
|
Returns array of VSPair |
|
Type |
|
Class used for sorting status controls, status graphics and value/graphic pairs. It holds the relevant object and the value to sort on. The sorting functions will create a list of these objects, sort them based on the compare_value property, and then return the sorted list of the relevant objects (status controls, status graphics or value/graphic pairs). This allows for sorting these different types of objects based on their associated values while keeping track of the original objects and their properties. |
|
|
|
Type |
|
Class used for sorting strings that contain numbers. It implements the IComparer interface to compare two strings by extracting the numeric part before any underscore and comparing them as doubles. This allows for sorting strings that represent numeric values, even if they have additional characters after an underscore, in numerical order rather than lexicographical order. |
|
|
|
Method |
|
Returns the display string for a status/value pair based on the device reference and the index of the pair. It retrieves the device using the provided reference ID and then gets the sorted list of status/value pairs for that device. It then retrieves the specific status/value pair based on the provided index and calls its GetPairString method, passing in the value of the pair, the HSScaleText, and HSAdditionalDisplayData properties of the device. If there is an error during this process, it catches the exception and returns an empty string. This function allows for obtaining the display string for a specific status/value pair of a device while handling potential errors gracefully. |
ref: The reference ID of the device.; index: The index of the status/value pair. |
The display string for the specified status/value pair, or an empty string if an error occurs. |
|
Method |
|
Sorts the status/value pairs of a device in numerical order based on their values. It retrieves the device using the provided reference ID and then gets all the status/value pairs for that device. It creates a list of clsSort objects, which hold the original VSPair and the value to sort on. For each VSPair, it determines the value to sort on (either the RangeStart for range pairs or the Value for non-range pairs) and adds it to a dictionary with a key that combines the value and a control string to ensure uniqueness. It then sorts the keys of the dictionary using a custom numeric comparer and creates a sorted list of VSPairs based on the sorted keys. If there is an error during this process, it catches the exception and returns an empty list. This function allows for obtaining a sorted list of status/value pairs for a device while handling potential errors gracefully. |
ref: The reference ID of the device. |
A sorted list of status/value pairs for the specified device, or an empty list if an error occurs. |
|
Method |
|
Sorts the status controls of a device in numerical order based on their target values or range minimums. It retrieves the device using the provided reference ID and then gets the collection of status controls for that device. It creates a list of clsSort objects, which hold the original StatusControl and the value to sort on. For each StatusControl, it determines the value to sort on (either the TargetRange.Min for range controls or the TargetValue for non-range controls) and adds it to a dictionary with a key that combines the value and a control string to ensure uniqueness. It then sorts the keys of the dictionary using a custom numeric comparer and creates a sorted list of StatusControls based on the sorted keys. If there is an error during this process, it catches the exception and returns an empty list. This function allows for obtaining a sorted list of status controls for a device while handling potential errors gracefully. |
ref: The reference ID of the device. |
A sorted list of status controls for the specified device, or an empty list if an error occurs. |
|
Method |
|
Sorts the value/graphic pairs of a device in numerical order based on their values or range minimums. It retrieves the device using the provided reference ID and then gets the collection of status graphics for that device. It creates a list of clsSort objects, which hold the original StatusGraphic and the value to sort on. For each StatusGraphic, it determines the value to sort on (either the RangeMin for range graphics or the Value for non-range graphics) and adds it to a list. It then sorts the list of clsSort objects based on the compare_value property and returns the sorted list. If there is an error during this process, it catches the exception and returns an empty list. This function allows for obtaining a sorted list of value/graphic pairs for a device while handling potential errors gracefully. |
ref: The reference ID of the device. |
A sorted list of value/graphic pairs for the specified device, or an empty list if an error occurs. |
|
Method |
|
Returns a specific status/value pair for a device based on the device reference and the index of the pair. It retrieves the device using the provided reference ID and then gets the sorted list of status/value pairs for that device. It then returns the specific status/value pair based on the provided index. If there is an error during this process, it catches the exception and returns Nothing. This function allows for obtaining a specific status/value pair for a device while handling potential errors gracefully. |
pair_ref: The reference ID of the device.; index: The index of the status/value pair to retrieve. |
The specific status/value pair for the device, or Nothing if an error occurs. |
|
Method |
|
Returns a specific status/graphic pair for a device based on the device reference and the index of the pair. It retrieves the device using the provided reference ID and then gets the sorted list of value/graphic pairs for that device. It then returns the specific status/graphic pair based on the provided index. If there is an error during this process, it catches the exception and returns Nothing. This function allows for obtaining a specific status/graphic pair for a device while handling potential errors gracefully. |
pair_ref: The reference ID of the device.; index: The index of the status/graphic pair to retrieve. |
The specific status/graphic pair for the device, or Nothing if an error occurs. |
|
Method |
|
Returns a specific value/graphic pair for a device based on the device reference and the index of the pair. It retrieves the device using the provided reference ID and then gets the sorted list of value/graphic pairs for that device. It then returns the specific value/graphic pair based on the provided index. If there is an error during this process, it catches the exception and returns Nothing. This function allows for obtaining a specific value/graphic pair for a device while handling potential errors gracefully. |
pair_ref: The reference ID of the device.; index: The index of the value/graphic pair to retrieve. |
The specific value/graphic pair for the device, or Nothing if an error occurs. |
|
Method |
|
Returns a list of all root devices Used by event.html Features are alpha sorted by location2/location/name or location/location2/name |
|
List(Of devicedesc) |
|
Method |
|
Returns a list of child device for the given root device reference number |
ref; with_controls_only; include_standalone |
List of(devicedesc) |
|
Method |
|
Return all possible names and values for the EControlUse Enum Controls are values less than 1000, values greater than 1000 are status use |
|
List of NameValue type |
|
Method |
|
Return all possible names and values for the EControlUse StatusUse Enum Controls are values less than 1000, values greater than 1000 are status use |
|
List of NameValue type |
|
Method |
|
Return the EControlUse string for this control use value |
value: control use value |
List of NameValue type |
|
Method |
|
Return the file path of the device status image |
sref: ref number of the device |
String which is the full path to the device status image. The path is relative to the HS HTML folder. |
|
Method |
|
Return the full img tag of the device status image |
sref: ref number of device |
String which is the full img tag |
|
Method |
|
Return the status text of a device with HTML stripped off |
sref: The reference ID of the device |
Text as string |
|
Method |
|
Return the current device status text |
sref: ref number of device |
String which is the device status text such as "On" |
|
Method |
|
Return the current device status text shortened to the first 15 characters |
sref: ref number of device |
String which is the device status text such as "On" shortened to the first 15 characters |
|
Method |
|
Return the current device address. The address is typically used for Z-Wave devices and is a combination of the device's node ID and instance. It can be used to identify the device on the Z-Wave network. If there is an error during this process, it catches the exception and returns an empty string. This function allows for obtaining the device address while handling potential errors gracefully. |
ref: The reference ID of the device. |
The device address as a string, or an empty string if an error occurs. |
|
Method |
|
Return the current device voice command. If the device is enabled for voice commands, it retrieves the voice command associated with the device. If the voice command is not set, it falls back to using the device name as the voice command. If there is an error during this process, it catches the exception and returns an empty string. This function allows for obtaining the device's voice command while handling potential errors gracefully. |
sref: The reference ID of the device. |
The device's voice command as a string, or an empty string if an error occurs. |
|
Method |
|
Returns the device last change time |
sref: Device ref number |
String which is the last change date/time |
|
Method |
|
Returns the device last change time as a DateTime object. If the device has a relationship of Child, it uses the last change time of the root device. If the device has a relationship of Parent_Root, it checks all associated child devices and returns the most recent last change time among them. If there is an error during this process, it catches the exception and returns DateTime.MinValue. This function allows for obtaining the last change time of a device while handling potential errors gracefully. |
sref: The reference ID of the device. |
The last change time of the device as a DateTime object, or DateTime.MinValue if an error occurs. |
|
Method |
|
Returns the latest change time of all features |
sref: Ref of a root device |
|
|
Type |
|
Class used for building a grid of controls for a device. The grid is built as a 2D array of this class which contains the html for the control and the control object itself. This allows for easy building of the html table and also access to the control properties when needed. |
|
|
|
Method |
|
Returns the current image for the thermostat mode |
ref: The parent device ref |
Complete img tag which includes a reference to the current thermostat mode image |
|
Method |
|
Returns the current image for the thermostat fan |
ref: The parent device ref |
Complete img tag which includes a reference to the current fan state image |
|
Method |
|
Returns the thermostat current temperature |
ref: The parent device ref |
String representing the current temp |
|
Method |
|
Returns the thermost heat setpoint value rounded to 1 decimal point |
ref: The parent device ref |
The controls for the device |
|
Method |
|
Returns the thermostat cool setpoint rounded to 1 decimal point |
ref: The parent device ref |
The controls for the device |
|
Method |
|
Returns the thermostat auto changeover setpoint rounded to 1 decimal point |
ref: The parent device ref |
The auto changeover setpoint for the device |
|
Method |
|
Returns the thermostat controls for the mode |
ref: The parent device ref |
The controls for the device |
|
Method |
|
Return the thermostat controls for the fan |
ref: Parent device ref |
The controls for the device |
|
Method |
|
Returns the controls for the child devices of a thermostat. This is used for the pop up that shows all the controls for the child devices of a thermostat. It builds the controls for all the child devices and returns them as a string. It ignores the misc control popup setting on the device since this is specifically for that pop up. It also ignores any values controls since those are not relevant for the thermostat child devices. |
ref: The reference ID of the parent device. |
A string containing the HTML for the child device controls. |
|
Method |
|
Returns true if the given string is a hex RGB color code. This can be in the format of #RRGGBB or RRGGBB where RR, GG, and BB are hexadecimal values for red, green, and blue respectively. The function uses a regular expression to validate the format of the color string. If the string is null or empty, it returns false. If the string matches the hex RGB color pattern, it returns true; otherwise, it returns false. |
color: The string to validate as a hex RGB color code. |
True if the string is a valid hex RGB color code; otherwise, false. |
|
Method |
|
|
ref; row; honor_row_col; ignore_misc_control_popup; value_match; exclude_on_off |
|
|
Method |
|
return the controls for the main device panel on the device list if the root device does not have any controls, add the controls from the child marked as primary this returns the controls for the first row the passed ref is already the primary device |
ref; row |
String |
|
Method |
|
Returns all controls honoring the ROW/COL setting |
ref |
|
|
Type |
|
Class to hold plugin menu information for building the plugin menu on the system page. This is built from the registered links and config links for plugins |
|
|
|
Type |
|
Class to hold menu items for the Linux/system menu. This is used to build the menu on the system page for Linux tools and shutdown/restart options. It is built in the linux_menu_items function below |
|
|
|
Method |
|
Run a Linux command and return the output as a string. This is used for the Linux tools page to run commands and display the output. It is also used for the shutdown/restart commands to run the appropriate command on Linux systems |
cmd: The Linux command to run. |
The output of the Linux command as a string. |
|
Method |
|
Return True if the user has been authorized to access Linux tools in the last 10 minutes. This is used to control access to the Linux tools page and the shutdown/restart options on Linux systems. The authorization is done by asking the user to enter a password on the system page, and if the password is correct, the last_authorized variable is set to the current time. This function checks if the last_authorized time is within the last 10 minutes, and if so, returns True to allow access to the Linux tools and shutdown/restart options. If not, it returns False and the user will need to re-authorize by entering the password again. This provides a simple way to control access to potentially dangerous commands on Linux systems while still allowing easy access for authorized users. |
|
True if the user is authorized, False otherwise. |
|
Method |
|
Return a list of menu items for the Linux/system menu on the system page. This includes options for shutdown/restart and a link to the Linux tools page if this is a Linux system. The menu items are built based on the current system and the available options, and returned as a list of menu_item objects that contain the link and text for each menu item. This allows the system page to dynamically build the Linux/system menu based on the current system and available options, providing a better user experience for Linux users while still allowing access to important system functions like shutdown and restart. The menu items are built in the linux_menu_items function below, which checks if this is a Linux system and adds the appropriate menu items based on the available options. |
|
A list of menu_item objects representing the Linux/system menu items. |
|
Method |
|
Return True if this is a Linux system and the password has been changed from the default. This is used to control access to certain features on Linux systems, such as the Linux tools page and the shutdown/restart options, to ensure that the user has changed the default password before allowing access to these potentially dangerous features. The check is done by looking for the existence of a file called "system_password_changed" in the home directory, which is created when the user changes the password from the default. If the file exists, it returns True to indicate that the password has been changed and access can be granted. If not, it returns False to indicate that the password has not been changed and access should be denied until the user changes the password. This provides an additional layer of security for Linux systems while still allowing easy access for authorized users who have taken the necessary steps to secure their system. |
|
True if the password has been changed from the default, False otherwise. |
|
Method |
|
Return True if this is a Linux system running on a ZEE S2 or SEL S2 unit. This is used to control access to certain features that are only available on these specific units, such as the ability to change the system password and access certain Linux tools. The check is done using compiler directives to determine if the code is being compiled for a Linux system and if the HTZEES2 directive is defined, which indicates that this is a ZEE S2 or SEL S2 unit. If both conditions are met, it returns True to indicate that this is a Linux ZEE S2 or SEL S2 unit. If not, it returns False to indicate that this is not a Linux ZEE S2 or SEL S2 unit and certain features should be hidden or disabled accordingly. This allows the system to provide a tailored experience for users of these specific units while still maintaining compatibility with other systems. |
|
True if this is a Linux ZEE S2 or SEL S2 unit, False otherwise. |
|
Method |
|
Return True if this system is an SEL or PLUS unit System could be Linux or Windows |
|
True or False |
|
Method |
|
Load the network settings from the system on Linux systems. This is used to populate the network settings on the system page for Linux users, allowing them to view and manage their network settings directly from the HomeSeer interface. The function checks if this is a Linux system and if so, it calls the LoadSettingsFromSystem method of the LinuxNetwork class to retrieve the current network settings from the system and populate the appropriate variables and settings in HomeSeer. This allows Linux users to easily access and manage their network settings without needing to use command line tools or other external utilities, providing a better user experience for Linux users while still maintaining compatibility with other systems. |
|
|
|
Method |
|
Return True if this is a Linux system with Wi-Fi capabilities. This is used to control the display of Wi-Fi related settings and options on the system page for Linux users, allowing those with Wi-Fi capabilities to manage their Wi-Fi settings directly from the HomeSeer interface. The function checks if this is a Linux system and if so, it returns the value of the WIFI_Installed property of the LinuxNetwork class, which indicates whether Wi-Fi capabilities are present on the system. If this is not a Linux system, it returns False to indicate that Wi-Fi settings should not be displayed or accessible. This allows the system to provide a tailored experience for Linux users with Wi-Fi capabilities while still maintaining compatibility with other systems that may not have Wi-Fi support. |
|
|
|
Method |
|
Return True if this is a Linux system using Network Manager for network management. This is used to control the display of certain network settings and options on the system page for Linux users, allowing those using Network Manager to manage their network settings directly from the HomeSeer interface. The function checks if this is a Linux system and if so, it returns the value of the UsingNetworkManager property of the LinuxNetwork class, which indicates whether Network Manager is being used for network management on the system. If this is not a Linux system, it returns False to indicate that Network Manager specific settings should not be displayed or accessible. This allows the system to provide a tailored experience for Linux users based on their specific network management setup while still maintaining compatibility with other systems that may not use Network Manager. |
|
True if this is a Linux system using Network Manager, False otherwise. |
|
Method |
|
Return a list of available Wi-Fi networks on a Linux system. This is used to populate the list of available Wi-Fi networks on the system page for Linux users, allowing them to view and connect to available Wi-Fi networks directly from the HomeSeer interface. The function checks if this is a Linux system and if so, it runs the "iwlist wlan0 scan" command to retrieve the list of available Wi-Fi networks, parses the output to extract the ESSID of each network, and returns a list of network names. If this is not a Linux system, it returns an empty list to indicate that Wi-Fi network information is not available. This allows Linux users to easily view and manage their Wi-Fi connections without needing to use command line tools or other external utilities, providing a better user experience for Linux users while still maintaining compatibility with other systems that may not have Wi-Fi support. |
|
A list of available Wi-Fi network names. |
|
Type |
|
Classes to hold plugin menu information for building the plugin menu on the system page. This is built from the registered links and config links for plugins, and is used to build the plugin menu on the system page for Linux tools and shutdown/restart options. The plug_menu_info class is used to hold the raw information from the registered links, while the plug_menu_top_item and plug_menu_sub_item classes are used to structure the menu items for display on the system page. The plugin_menu_items function builds a list of plug_menu_top_item objects based on the registered links and config links, which can then be used to build the plugin menu on the system page. |
|
|
|
Type |
|
Class to hold the top level menu items for the plugin menu on the system page. Each top level item can have multiple sub items, which are represented by the plug_menu_sub_item class. The plugin |
|
|
|
Method |
|
Return a list of plugin menu items for the system page plugin menu. This is built from the registered links and config links for plugins, and is used to build the plugin menu on the system page for Linux tools and shutdown/restart options. The function iterates through the registered links and config links, extracts the relevant information for each link, and organizes it into a structured format using the plug_menu_info, plug_menu_top_item, and plug_menu_sub_item classes. The resulting list of plug_menu_top_item objects can then be used to build the plugin menu on the system page, allowing users to easily access plugin features and settings directly from the HomeSeer interface. The function also allows for filtering by plugin name if desired, and can return either a structured list of menu items or a flat list of links based on the parameters passed in. |
list_only; plug_name |
List(Of plug_menu_top_item) |
|
Type |
|
Class used to hold tabs information for device_tabs tag |
|
|
|
Method |
|
Return a list of "tabitem", one tab for each tab that is displayed in the device properties |
ref: Device reference number |
|
|
Method |
|
Return a list of strings, one entry for each speaker client that is currently connected |
|
List(Of String) |
|
Type |
|
Class used to hold information about a single camera Used by camera_list tag |
|
|
|
Method |
|
Return list of cameras installed in the system, of type "cam" |
|
List(Of cam) |
|
Method |
|
Return the filename of the video that should be played in the recordings page |
|
String |
|
Method |
|
Get the latest recording that is saved Called when the recordings page is displayed and a date is not passed |
|
|
|
Method |
|
Return a list of dates that contain recordings The list is in the format required by the date picker |
|
|
|
Type |
|
Class used to hold information about a single user Used by user_has_access tag and users_list |
|
|
|
Method |
|
Return "checked" if the given user has access to the given ref ID |
ref: reference ID as string; user: user name |
string 'checked' if user has access |
|
Method |
|
Return "checked" if the given user has access to the given ref ID or if the device is set to allow access to "any" user |
ref: reference ID as string; user: user name |
string 'checked' if user has access |
|
Method |
|
Return a list of all users in the system, of type "clsuser" |
|
List(Of clsuser) |
|
Method |
|
Returns true if the user has access to the given page Page access enum values: PAGE_ACCESS_EVENTS = 1 PAGE_ACCESS_COUNTERS_TIMERS = 2 PAGE_ACCESS_LOG = 4 PAGE_ACCESS_CAMERAS = 8 PAGE_ACCESS_DEVICE_CONTROL = 16 PAGE_ACCESS_PLUGIN_MANAGEMENT = 32 PAGE_ACCESS_DASHBOARD = 64 |
page: The page to check, one of the enum values; user: The user name |
Boolean |
|
Method |
|
Returns true if the user has the given rights Rights: USER_GUEST As Integer = 1 ' user can view web pages only, cannot make changes USER_ADMIN As Integer = 2 ' user can make changes Const USER_LOCAL As Integer = 4 ' this user is used when logging in on a local subnet Const USER_NORMAL As Integer = 8 ' Not guest, not admin, just NORMAL! |
rights: The rights to check; user: The user name |
Boolean |
|
Method |
|
Returns true if the user with the given ID has the given rights |
rights: The rights to check; id: The user ID |
Boolean |
|
Method |
|
Returns the user ID for a given username, or 0 if not found |
username: The username to look up |
Integer |
|
Method |
|
Returns the username for a given user ID, or "Unknown" if not found |
id: The user ID to look up |
String |
|
Type |
|
Class used to hold a log color Used by log_colors_list tag |
|
|
|
Method |
|
Returns a list of all log colors configured |
|
List(Of logcolor) |
|
Method |
|
Returns a list of all available setup tabs |
|
List(Of tabitem) |
|
Method |
|
Returns a string that describes license info for the system such as license ID |
|
String |
|
Method |
|
Returns the boolean setting of a specific system setting |
setting: The setting to retrieve |
"checked" if setting is enabled else an empty string |
|
Method |
|
Returns the string setting of a specific system setting |
setting: The setting to retrieve |
setting value as a string |
|
Method |
|
Returns the integer setting of a specific system setting |
setting: The setting to retrieve |
Integer |
|
Method |
|
Returns the string setting of a specific setting that exists in a specific INI file |
setting: The setting to retrieve as string; file: The filename of the file to read (file is in the Config folder) |
|
|
Method |
|
Returns a fully formatted checkbox setting Used mainly as a shortcut on the setup.html page |
setting: Setting name as string; label: The label to display for the setting; disabled: If true, the checkbox appears as disabled |
|
|
Method |
|
Returns a list of all the geo locations configured in the locations.csv file |
|
List(Of String) |
|
Method |
|
Return a list all the .HSD HS config files in the Data folder |
|
List(Of String) |
|
Method |
|
Return the currently select HSD config file |
|
String |
|
Method |
|
Calls a function in a given plugin and returns the result |
plugid; func; scrparms |
|
|
Method |
|
Access a property in a plugin |
plugid; prop; scrparms: DEPRECATED and ignored |
Returns the property value |
|
Method |
|
Sets a property on a plugin |
plugid: String; prop: String; value: Object |
|
|
Method |
|
Return list of all categories as class "category" |
|
Dictionary of type "category" |
|
Method |
|
Return all available category icons Category icons live in html/images/Categories |
|
String list of all icon names without path information List(Of String) |
|
Method |
|
Return all available status icons Status icons live in html/images/HomeSeer/status |
|
List(Of String) |
|
Method |
|
Returns the latest energy graph image file |
|
String |
|
Method |
|
Return all energy devices |
|
List(Of WebUIEnergyPageBuilder.eref) |
|
Method |
|
Return all energy graph types |
|
List(Of WebUIEnergyPageBuilder.energy_graph) |
|
Method |
|
Return 0 if Y axis is Usage or 1 if Cost Graph.YAxis holds the setting |
|
Integer |
|
Type |
|
Class that holds the current energy statistics |
|
|
|
Method |
|
Return the current energy statistics |
|
List(Of String()) |
|
Type |
|
Class that holds information about a single times (for timers/counters) |
|
|
|
Method |
|
Returns all timers configured |
|
List(Of timer_item) |
|
Type |
|
Class used to describe a single counter |
|
|
|
Method |
|
Returns a list of all configured counters |
|
List(Of counter_item) |
|
Property |
|
The currently selected tab on the timers/counters page Either "timers" or "counters" |
|
Tab name as String |
|
Method |
|
Returns the current date/time in short format |
|
String |
|
Method |
|
Returns the current date/time in long format |
dt: The date/time to format |
String |
|
Property |
|
Return the currently active search phrase that the log is filtering with |
|
String |
|
Method |
|
Return the date of the start of the log |
|
String |
|
Method |
|
Return the time of the start of the log |
|
String |
|
Method |
|
Return the date/time of the end of the log |
|
String |
|
Method |
|
Return the time of the end of the log |
|
String |
|
Method |
|
Return a list of all available log types |
|
String() |
|
Method |
|
Return the currently selected log type |
|
String |
|
Method |
|
Return a list of all available log from values |
|
String() |
|
Method |
|
Return the currently selected from filter |
|
String |
|
Method |
|
Return the total number of log entries |
|
|
|
Method |
|
Return selected date to start displaying log data |
|
String |
|
Method |
|
Return the selected end date to end displaying log data |
|
|
|
Method |
|
Return the starting index of the log entries to return based on the current page and page size |
|
Integer |
|
Method |
|
Return the ending index of the log entries to return based on the current page and page size |
|
Integer |
|
Type |
|
Class used to hold a single log entry |
|
|
|
Method |
|
Return an array of lenty objects that represent each log entry The range returned starts with the log_start and log_end date/time |
start: The number of the first log entry to display |
List(Of lentry) |
|
Method |
|
Return the name of the camera given a camera name |
id: The ID of the camera to look up |
String |
|
Method |
|
Return the model of the camera given a camera id |
camid: The ID of the camera to look up |
String |
|
Method |
|
Return True if camera with passed camera id supports PAN/TILT Note that manually added cameras always return TRUE |
camid: The ID of the camera |
TRUE or FALSE |
|
Type |
|
Class to describe a single camera Used by camera_snapshots tag |
|
|
|
Method |
|
Return a list of cameras |
|
List(Of cam_item) |
|
Method |
|
Return the currently selected list of tags for searching for a plugin Used by the plugins.html page |
|
|
|
Method |
|
Returns True if featured plugins are available |
|
|
|
Type |
|
Class to describe a single plugin |
|
|
|
Method |
|
When called forces a download of the updates control file |
|
True if success |
|
Type |
|
Class that holds the description of a single COM port |
|
|
|
Method |
|
Returns a list of available COM ports in the system. The list is a list of type "port" |
plugin_name; plugin_instance |
List(or port) |
|
Method |
|
Returns a list of all installed plugins with information about each plugin such as if an update is available, if its loaded, etc. The list is a list of type "plug_item" |
html: The HTML string |
String |
|
Method |
|
Return list of installed plugins and info such as new version |
|
List of installed plugins as type plug_item, List(Of plug_item) |
|
Method |
|
Returns True if the plugin item passed in matches the current search filter. The search filter is a comma or space delimited list of tags that the user can enter to filter the plugins that are displayed. The plugin item is checked against the search filter for a match in the package name, description, author, and tags. If any tag matches any of those fields then the plugin is included in the results. If the plugin has the tag "homeseer internal" then it will only be included if the user entered "homeseer internal" as one of their search tags. This is to prevent internal plugins from showing up in search results unless the user specifically wants to see them by entering that tag in their search. |
ui: The plugin item to check against the search filter |
Boolean |
|
Method |
|
Returns the list of plugin packages available Does not download the updates file, call plugins_installed first to download the package list and parse |
|
List of packages as type UpdaterItem, List(Of UpdaterV2.clsUpdaterItem) |
|
Method |
|
Returns the installed plugin that match selected_plugin_id |
|
plug_item |
|
Method |
|
Returns the available plugin package that match selected_plugin_id and selected_plugin_version |
|
UpdaterV2.clsUpdaterItem |
|
Type |
|
Class used to hold information about a single event group. |
|
|
|
Method |
|
Returns the number of event groups in an event. An event group is a group of triggers under an "IF" or "OR IF". |
ref: The event reference number |
Integer |
|
Method |
|
Returns the number of action groups in an event. An action group is a group of conditions and actions after a "THEN" |
ref: The event reference number |
Integer |
|
Method |
|
Returns the number of groups of conditions in an event. A group of conditions is a group of conditions under an action group. |
ref: The event reference number |
Integer |
|
Method |
|
Returns the number of conditions in a single group of conditions. Use group_conditions_group_count to determine the total number of groups of conditions in the event. |
ref: The event reference number; groupid: The group number, 0=first group |
Integer |
|
Method |
|
Returns the number of triggers in a single event group. Use ev_trig_group_count to determine the total number of groups in the trigger. |
ref: Event reference number; groupid: Group number, 0=first group |
|
|
Method |
|
Returns True if the given device ref is a trigger for the given event and trigger If the given device ref is the root device for the actual trigger device, it still returns True. |
dvref; evref; index; groupid |
Boolean |
|
Method |
|
Return a list of groups of type "evgroupitem" |
|
List(of evgroupitem) |
|
Method |
|
Returns True if all events in the group are configured, else False. This is used to determine whether to show the green checkmark or red X for the event group in the UI. It also populates the EventConfiguredCache dictionary which is used to speed up access to the configured status of individual events when rendering the list of events within each group. The cache is necessary because calling event_configured for each event can be slow when there are many events and groups. By calling this function first for each group, we can populate the cache with the configured status of each event so that subsequent calls to event_configured_cache will be fast. If this function is not called first, then event_configured_cache will not have any values and will return True for all events, which will cause all events to show as configured in the UI even if they are not. |
groupid: The group ID to check |
Boolean indicating if all events in the group are configured |
|
Method |
|
Speed up access to the event configured status The call to event_groud_configured will load the cache and needs to be called first |
ref: Event reference ID |
True if event is configured, else False |
|
Method |
|
Returns True if the event is configured, else False. An event is considered configured if all of its triggers and actions are configured. This is used to determine whether to show the green checkmark or red X for the event in the UI. Note that this function can be slow when there are many triggers and actions because it needs to check each one, so it is recommended to call event_group_configured first to populate the cache and then use event_configured_cache for faster access when rendering the list of events within each group. |
ref: The event reference number |
Boolean indicating if the event is configured |
|
Method |
|
Returns True if the action is enabled, else False. An action is considered disabled if it has the disabled bit set in the misc field. This is used to determine whether to show the green checkmark or red X for the action in the UI. Note that an action can be disabled without being unconfigured, so it may still show as configured in the UI but with a red X to indicate it is disabled. The event_action_group_enabled function can be used to check if the entire group of actions is disabled, which will show a red X at the group level in the UI. |
ref: The event reference number; index: The index of the action within the group; groupIndex: The index of the action group |
Boolean indicating if the action is enabled |
|
Method |
|
Return True if action group is enabled, False if it is disabled |
ref: Event Reference ID; groupIndex: Index of the conditional actions group, 0 = first group |
Boolean |
|
Method |
|
Returns True if the device is enabled as a trigger or condition in the event, else False. A device is considered disabled if it has the disabled bit set in the misc field of the trigger or condition that references it. This is used to determine whether to show the green checkmark or red X for the trigger or condition in the UI. Note that a trigger or condition can be disabled without being unconfigured, so it may still show as configured in the UI but with a red X to indicate it is disabled. The trigger_device_ref function can be used to check if a given device ref is used in a trigger or condition for the event. |
ref: The device reference number; bit: The bit to check in the misc field |
Boolean indicating if the device is enabled |
|
Method |
|
Returns True if the event is enabled, else False. An event is considered disabled if it has the disabled bit set in the misc field. This is used to determine whether to show the green checkmark or red X for the event in the UI. Note that an event can be disabled without being unconfigured, so it may still show as configured in the UI but with a red X to indicate it is disabled. The event_group_configured function can be used to check if all events in the group are configured, which will show a green checkmark at the group level in the UI, but individual events may still be disabled and show a red X. |
evref: The event reference number |
Boolean indicating if the event is enabled |
|
Method |
|
Return an event of type EventClass |
ref |
Single event of type EventClass |
|
Method |
|
Return True if the given bit is set in the misc field of the event, else False. This can be used to check for various status bits for the event, such as whether it is disabled, whether it is a system event, etc. This is used to determine how to display the event in the UI, such as showing a red X if it is disabled. The specific bits that can be checked depend on the implementation of the EventClass and how it uses the misc field. |
ref: The event reference number; bit: The bit to check in the misc field |
Boolean indicating if the bit is set in the misc field |
|
Method |
|
Return a list of event group names. An event group is a collection of events that are grouped together in the UI. Each event belongs to one event group. The event group is used to organize events in the UI and can be used to apply certain settings or actions to all events within the group. This function retrieves all event groups from the EventManager and returns their names in a list. The names can then be used to display the groups in the UI or for other purposes. |
|
List of event group names |
|
Method |
|
Return an event group of type EventGroup for the given group reference ID. An event group is a collection of events that are grouped together in the UI. Each event belongs to one event group. The event group is used to organize events in the UI and can be used to apply certain settings or actions to all events within the group. This function retrieves the event group from the EventManager using the provided reference ID and returns it as an object of type EventGroup, which contains properties such as the group name and a list of events that belong to the group. This can be used to access information about the group and its events for display in the UI or for other purposes. |
groupref: The group reference ID |
EventGroup object corresponding to the given group reference ID |
|
Method |
|
Return all event actions for one event |
ref: Event reference ID |
Array of type EvAct_Base |
|
Method |
|
Return all event actions for one group of conditional actions |
ref: Event Reference ID; groupIndex: Index of the conditional actions group, 0 = first group |
Array of type EvAct_Base |
|
Method |
|
Return all event conditions for one group of conditional actions |
ref: Event Reference ID; groupIndex: Index of the conditional actions group, 0 = first group |
List of type EvTrig_BASE |
|
Method |
|
Return all global actions for an event group. Global actions are actions that are applied to all events within the group, regardless of the specific triggers or conditions of each event. They are defined at the group level and can be used to apply common actions to all events in the group without having to duplicate them in each individual event. This function retrieves the global actions for the specified event group reference ID and returns them as an array of type EvAct_BASE, which can then be used to access information about each action or to display them in the UI. |
ref: The event group reference ID |
Array of type EvAct_BASE representing the global actions for the event group |
|
Method |
|
Return all global conditions for an event group. Global conditions are conditions that are applied to all events within the group, regardless of the specific triggers or conditions of each event. They are defined at the group level and can be used to apply common conditions to all events in the group without having to duplicate them in each individual event. This function retrieves the global conditions for the specified event group reference ID and returns them as an array of type EvTrig_BASE, which can then be used to access information about each condition or to display them in the UI. |
ref: The event group reference ID |
Array of type EvTrig_BASE representing the global conditions for the event group |
|
Method |
|
Return an array of event triggers of type EvTrig_Base |
ref |
Array of type EvTrig_BASE |
|
Method |
|
Return a single trigger of type EvTrig_BASE for the given event reference, trigger index and group ID. The index is the position of the trigger within the group, starting at 0 for the first trigger. The group ID is the identifier of the trigger group that the trigger belongs to, starting at 0 for the first group. This function retrieves the specified trigger from the EventManager and returns it as an object of type EvTrig_BASE, which contains properties such as the trigger type, device reference, value, etc. This can be used to access information about the trigger or to display it in the UI. |
ref: The event reference ID; index: The index of the trigger within the group; groupid: The ID of the trigger group |
Object of type EvTrig_BASE representing the specified trigger |
|
Method |
|
Convert a date to string in a format used with event last run |
dt: DateTime |
String |
|
Method |
|
Return the description for the given event action |
ref: Event Reference ID; order: order of action; groupIndex: Index of the conditional actions group, 0 = first group |
String |
|
Method |
|
Return formatted group action for given action order |
ref; order |
String describing the action |
|
Method |
|
Return formatted group condition for given condition order and group index |
ref: The event group reference ID; index: The index of the condition within the group; groupindex: The index of the conditional action group |
String describing the condition |
|
Method |
|
Return the description for the given event trigger |
ref: The event reference ID; index: The index of the trigger within the group; groupindex: The index of the trigger group |
String describing the trigger |
|
Method |
|
Return formatted condition description for the given condition in a conditional action group |
ref: Event reference number; index: Index of condition, 0 = first condition; groupIndex: Index of the conditional action group, 0 = first group |
|
|
Method |
|
Return true if the global conditions are being used in the given event group |
ref: The ref of the event group |
True or False |
|
Method |
|
Return true if the global actions are being used in the given event group |
GroupRef: The reference ID of the event group |
True if global actions are in use, otherwise False |
|
Method |
|
return True if a specific event trigger is in EDIT mode |
ref; index |
Boolean |
|
Method |
|
return True if a specific event condition in a conditional action group is in EDIT mode |
ref; index: Index of condition, 0 = first condition; groupIndex: Index of the conditional action group, 0 = first group |
Boolean |
|
Method |
|
return True if a specific global condition for an event group is in EDIT mode |
ref: The event group reference ID; index: The index of the condition within the group; groupindex: The index of the conditional action group |
Boolean |
|
Method |
|
Returns true if the given event trigger is for a JUI based plugin, else false if for an HS3 based plugin |
ref: Event reference number; index: Event index number in group, 0=first trigger; groupindex: Trigger group index number, 0=first group |
Boolean |
|
Method |
|
Returns true if the given group condition is for a JUI based plugin, else false if for an HS3 based plugin |
ref: Event Group reference number; index: Index of condition, 0 = first condition; groupIndex: Condition group index number, 0 = first group |
Boolean |
|
Method |
|
Returns true if the given action condition is for a JUI based plugin, else false if for an HS3 based plugin |
ref: Event reference number; index: Index of condition, 0 = first condition; groupIndex: Index of the conditional action group, 0 = first group |
Boolean |
|
Method |
|
Returns true if the given event action is for a JUI based plugin, else false if for an HS3 based plugin |
ref: Event reference number; index: Action index number, 0=first action; groupIndex: Index of the conditional actions group, 0 = first group |
Boolean |
|
Method |
|
Returns true if the given global action is for a JUI based plugin, else false if for an HS3 based plugin |
ref: The reference ID of the event group; index: The index of the global action within the group |
Boolean |
|
Method |
|
Returns the TIME portion of a DateTime variable |
date_time: String |
String |
|
Method |
|
Returns a list of speaker clients for use in the speaker client dropdown in the event action editor. This list is built from the list of speaker clients defined in HS4, plus any additional clients specified in the gDefaultSpeakerClients setting in the config file. The gDefaultSpeakerClients setting should be a comma-separated list of host:instance values for each additional speaker client to include in the list. If a specified host:instance is not already in the list of speaker clients from HS4, it will be added to the list returned by this function. This allows for custom speaker clients to be included in the dropdown even if they are not defined in HS4, as long as they are specified in the config file. The function returns a list of clsSpeakerClientInfo objects representing all available speaker clients to be shown in the dropdown. |
|
List of clsSpeakerClientInfo objects |
|
Method |
|
Returns true if the given day is selected in the given event trigger. This function is used for event triggers that are based on specific days of the week, such as "every Monday and Wednesday" or "every weekday". The function checks the trigger's DOW (day of week) settings to see if the specified day is included. The day parameter is an integer representing the day of the week, where 1=Monday, 2=Tuesday, ..., 7=Sunday, 8=Weekdays, 9=All Days, 10=Weekends. The function returns true if the specified day is selected in the trigger's DOW settings, and false otherwise. This can be used to determine whether a trigger should be active on a given day based on its configuration. |
ref; index; groupid; day; grpcond; actcond |
Boolean |
|
Method |
|
Returns a list of strings representing specific dates that are selected in a date-based event trigger. This function is used for event triggers that allow the user to select specific calendar dates on which the trigger should be active, such as "every January 1st and July 4th". The function retrieves the trigger's list of selected dates and returns it as a list of strings. Each string in the list represents a specific date in a format such as "MM/dd/yyyy". This can be used to determine whether a trigger should be active on a given date based on its configuration. |
ref; index; groupid; grpcond; actcond |
List of strings representing specific dates |
|
Method |
|
Sets the condition flag for a given trigger. This is used to indicate whether the trigger is being evaluated as a condition in a conditional action group, rather than as a primary trigger for an event. Some triggers may have different behavior or available options when used as conditions, so this function allows the caller to specify that context when retrieving or working with the trigger. The function takes the event reference ID, trigger index, group ID, and a boolean value indicating whether the trigger should be treated as a condition (true) or not (false). It then retrieves the specified trigger and sets its Condition property accordingly. This can be important for ensuring that the trigger behaves correctly in the context of conditional actions. |
ref; index; groupid; condition |
|
|
Method |
|
Returns the full list of available event triggers for the given event, index, and group |
ref; index; groupid |
|
|
Method |
|
Returns the full list of available global conditions for the given event group, index, and group. Global conditions are conditions that apply to an entire event group rather than to a specific trigger or action. This function retrieves the specified global condition and returns a list of NameValue pairs representing the available options for that condition based on its trigger type. The list can be used to populate dropdowns or other UI elements when editing the global condition in the event group. The function takes into account whether the condition is being used as a condition in a conditional action group or as a primary trigger, which may affect the available options. |
ref; index; groupindex |
List of NameValue pairs representing the available options for the global condition |
|
Method |
|
Returns the full list of available conditions for a specific action condition in a conditional action group, based on the trigger type of that condition. This function retrieves the specified action condition and returns a list of NameValue pairs representing the available options for that condition based on its trigger type. The list can be used to populate dropdowns or other UI elements when editing the action condition in the conditional action group. The function takes into account whether the condition is being used as a condition in a conditional action group or as a primary trigger, which may affect the available options. |
ref; index; groupIndex |
List of NameValue pairs representing the available options for the action condition |
|
Method |
|
Returns the full sub trigger list for the given event ref, index, a and group Only some triggers have a sub trigger list |
ref; index; groupindex |
|
|
Method |
|
For a device value change trigger of type "has been/for at least" return the formatted timespan |
ref; index; groupid |
String formatted timespan |
|
Method |
|
For a recurring trigger of type "every ___" return the formatted timespan representing the recurring interval |
ref; index; groupid |
String formatted timespan |
|
Type |
|
For a device value change trigger of type "has been/for at least" return the timespan values as an object |
|
|
|
Method |
|
For a device value change trigger of type "has been/for at least" return the timespan values as an object with separate properties for days, hours, minutes, and seconds. This can be used to populate individual dropdowns or input fields for each time unit when editing the trigger in the UI. The function retrieves the specified trigger, checks that it is a device value change trigger, and then extracts the timespan values into a timespanvalues object which is returned to the caller. |
ref; index; groupid; grpcond; actcond |
timespanvalues object containing the days, hours, minutes, and seconds of the device timespan |
|
Method |
|
For a recurring trigger of type "every ___" return the timespan values as an object with separate properties for days, hours, minutes, and seconds. This can be used to populate individual dropdowns or input fields for each time unit when editing the trigger in the UI. The function retrieves the specified trigger, checks that it is a recurring trigger, and then extracts the recurring interval timespan values into a timespanvalues object which is returned to the caller. |
ref; index; groupid; grpcond; actcond |
timespanvalues object containing the days, hours, minutes, and seconds of the recurring interval |
|
Method |
|
For a device value change trigger of type "has been/for at least" return the timespan values as an object with separate properties for days, hours, minutes, and seconds. This can be used to populate individual dropdowns or input fields for each time unit when editing the trigger in the UI. The function retrieves the specified trigger, checks that it is a device value change trigger, and then extracts the timespan values into a timespanvalues object which is returned to the caller. |
ref; index; groupid; allow_any; grpcond; actcond |
ui_layout object containing the layout for the device value selection UI |
|
Method |
|
For a counter trigger, return the name of the selected counter. This can be used to display the selected counter in the UI when editing the trigger, or to retrieve the counter name for use in plugin code. The function retrieves the specified trigger, checks that it is a counter trigger, and then returns the name of the selected counter as a string. |
ref; index; groupid; grpcond; actcond |
Name of the selected counter as a string, or Nothing if the trigger is not a counter trigger |
|
Method |
|
For a counter trigger, return the current value of the counter. This can be used to display the current counter value in the UI when editing the trigger, or to retrieve the counter value for use in plugin code. The function retrieves the specified trigger, checks that it is a counter trigger, and then returns the current value of the counter as a double. |
ref; index; groupid; grpcond; actcond |
Current value of the counter as a double, or Nothing if the trigger is not a counter trigger |
|
Method |
|
For a timer trigger, return the name of the selected timer. This can be used to display the selected timer in the UI when editing the trigger, or to retrieve the timer name for use in plugin code. The function retrieves the specified trigger, checks that it is a timer trigger, and then returns the name of the selected timer as a string. |
ref; index; groupid; grpcond; actcond |
Name of the selected timer as a string, or Nothing if the trigger is not a timer trigger |
|
Method |
|
For a timer trigger, return the name of the selected timer. This can be used to display the selected timer in the UI when editing the trigger, or to retrieve the timer name for use in plugin code. The function retrieves the specified trigger, checks that it is a timer trigger, and then returns the name of the selected timer as a string. |
ref; index; groupid; grpcond; actcond |
Timespan values of the selected timer as a timespanvalues object, or Nothing if the trigger is not a timer trigger |
|
Method |
|
For a voice recognition trigger, return true if the specified speaker client is selected in the trigger's configuration. This can be used to determine whether a particular speaker client is included in the trigger's settings when editing the trigger in the UI, or to check for the presence of a speaker client in plugin code. The function retrieves the specified trigger, checks that it is a voice recognition trigger, and then checks whether the given speaker host and instance match any of the selected speaker clients in the trigger's configuration. It returns true if a match is found, and false otherwise. |
ref; index; groupid; speaker_host; speaker_instance; grpcond; actcond |
True if the specified speaker client is selected in the trigger's configuration, false otherwise |
|
Method |
|
For a voice recognition trigger, return the voice command phrase that is configured in the trigger. This can be used to display the configured voice command in the UI when editing the trigger, or to retrieve the voice command for use in plugin code. The function retrieves the specified trigger, checks that it is a voice recognition trigger, and then returns the configured voice command phrase as a string. |
ref; index; groupid; grpcond; actcond |
The configured voice command phrase as a string, or an empty string if the trigger is not a voice recognition trigger |
|
Method |
|
For a voice recognition trigger, return true if the trigger is configured to confirm the voice command with the user before executing the event. This can be used to determine whether confirmation is enabled for the trigger when editing it in the UI, or to check the confirmation setting in plugin code. The function retrieves the specified trigger, checks that it is a voice recognition trigger, and then returns the value of the VRConfirm property which indicates whether confirmation is enabled. |
ref; index; groupid; grpcond; actcond |
True if the trigger is configured to confirm the voice command, false otherwise |
|
Method |
|
Return the UI HTML for a trigger, used by plugins UI for standard triggers is built on the actual HTML page event.html |
ref; index |
|
|
Type |
|
Structure used to build the list of triggers for the trigger dropdowns in the UI. This structure is populated by calling the BuildTriggerNameUI function for each trigger type, which returns an array of these structures representing the available triggers of that type. The structure contains properties for the plugin name and instance (if applicable), the display text for the trigger, the trigger type, and any plugin-specific trigger identifiers. This allows the GetFullTriggerList function to compile a complete list of available triggers with their display names and values for use in populating dropdowns or other UI elements when editing event triggers and conditions. |
|
|
|
Type |
|
Structure used to represent a name/value pair for populating dropdowns or other UI elements when editing event triggers and conditions. The Name property represents the display text for the option, the Value property represents the underlying value that should be used when the option is selected (such as a trigger type identifier), and the Selected property indicates whether this option should be marked as selected in the UI based on the current configuration of the trigger or condition being edited. This structure is used by functions like GetFullTriggerList to compile lists of available options for triggers and conditions. |
|
|
|
Method |
|
Returns a list of NameValue pairs representing the full list of available triggers or conditions for a given trigger type, along with information about which one is currently selected based on the provided EvTrig_BASE object. This function is used to populate dropdowns or other UI elements when editing event triggers and conditions, allowing the user to select from the appropriate options based on the trigger type. The function takes into account whether only conditions should be included (for conditional action groups) and whether global conditions should be allowed in the list. It compiles the list by calling the BuildTriggerNameUI function for each trigger type and checking against the current trigger's configuration to determine which option should be marked as selected. |
eTT: The trigger type for which to retrieve the list of available triggers or conditions.; Trig: The current trigger object being edited, used to determine which option should be marked as selected.; ConditionsOnly: Indicates whether only conditions should be included in the list (for conditional action groups).; AllowGlobalCond: Indicates whether global conditions should be allowed in the list. |
A list of NameValue pairs representing the available triggers or conditions. |
|
Method |
|
Returns an array of structTNUI structures representing the available triggers or conditions for a specific trigger type, used to build the trigger name dropdowns in the UI. This function is called by GetFullTriggerList for each trigger type to retrieve the relevant triggers or conditions based on the specified parameters. The function checks if the trigger type is valid and if it should include global conditions, then creates an instance of the trigger to access its properties and determine which triggers or conditions to include in the list. For plugin triggers, it iterates through the available plugins and their triggers to compile the list. The resulting array of structTNUI structures contains the display text and values needed to populate the dropdowns when editing event triggers and conditions in the UI. |
TT: The trigger type for which to retrieve the list of available triggers or conditions.; ConditionsOnly: Indicates whether only conditions should be included in the list (for conditional action groups).; GlobalCond: Indicates whether global conditions should be allowed in the list. |
An array of structTNUI structures representing the available triggers or conditions. |
|
Method |
|
Returns TRUE if an action is currently being edited, else false if not |
ref; index: Index of action, 0=first action; groupIndex: Index of the conditional actions group, 0 = first group |
Boolean |
|
Method |
|
Returns the EvAct_BASE object for the specified action index and group index within an event. This can be used to access the properties and configuration of the action that is currently being edited in the UI, allowing plugin code to retrieve information about the action or modify its settings as needed. The function retrieves the event based on the provided reference number, then accesses the conditional actions for the specified group index and returns the action at the given index as an EvAct_BASE object. If any errors occur during this process, or if the event or action cannot be found, the function returns Nothing. |
ref: The reference number of the event.; index: The index of the action within the conditional actions group.; groupIndex: The index of the conditional actions group within the event. |
The EvAct_BASE object representing the action, or Nothing if not found. |
|
Method |
|
Returns TRUE if a global action is currently being edited, else false if not |
ref: The reference number of the global action group.; index: The index of the action within the global action group. |
Boolean indicating whether the action is being edited. |
|
Method |
|
Check if advanced editing mode is enabled. Advanced editing mode enables some extra features in events |
evref: Event reference number |
True if enabled else fals |
|
Method |
|
Returns a list of all available event actions |
ref; index: Index of action, 0=first action; groupIndex: Index of the conditional actions group, 0=first group |
Collections.Generic.List(Of NameValue) |
|
Method |
|
Returns a list of all available global actions for a given global action group. This can be used to populate dropdowns or other UI elements when editing global actions in the UI, allowing the user to select from the appropriate options based on the action type. The function retrieves the specified global action group based on the provided reference number, then accesses the global actions and returns a list of NameValue pairs representing the available actions. If any errors occur during this process, or if the global action group cannot be found, the function returns an empty list. |
ref: The reference number of the global action group.; index: The index of the action within the global action group. |
A list of NameValue pairs representing the available global actions. |
|
Method |
|
For a speak action, return true if the specified speaker client is selected in the action's configuration. This can be used to determine whether a particular speaker client is included in the action's settings when editing the action in the UI, or to check for the presence of a speaker client in plugin code. The function retrieves the specified action, checks that it is a speak action, and then checks whether the given speaker host and instance match any of the selected speaker clients in the action's configuration. It returns true if a match is found, and false otherwise. |
ref: The reference number of the global action group or event.; index: The index of the action within the global action group or event.; groupIndex: The index of the conditional action group within the event.; speaker_host: The host name of the speaker client.; speaker_instance: The instance name of the speaker client.; grpact: Indicates whether the action is part of a global action group (True) or a conditional action group within an event (False). |
True if the specified speaker client is selected in the action's configuration, otherwise False. |
|
Method |
|
For a speak action, return a list of all speaker clients that are selected in the action's configuration. This can be used to display the selected speaker clients in the UI when editing the action, or to retrieve the list of selected speaker clients for use in plugin code. The function retrieves the specified action, checks that it is a speak action, and then returns a list of clsSpeakerClientInfo objects representing the selected speaker clients in the action's configuration. If any errors occur during this process, or if the action is not a speak action, the function returns an empty list. |
ref: The reference number of the global action group or event.; index: The index of the action within the global action group or event.; groupIndex: The index of the conditional action group within the event.; grpact: Indicates whether the action is part of a global action group (True) or a conditional action group within an event (False). |
A list of clsSpeakerClientInfo objects representing the selected speaker clients in the action's configuration. If any errors occur or if the action is not a speak action, an empty list is returned. |
|
Method |
|
For a play audio file action, return true if the specified speaker client is selected in the action's configuration. This can be used to determine whether a particular speaker client is included in the action's settings when editing the action in the UI, or to check for the presence of a speaker client in plugin code. The function retrieves the specified action, checks that it is a play audio file action, and then checks whether the given speaker host and instance match any of the selected speaker clients in the action's configuration. It returns true if a match is found, and false otherwise. |
ref: The reference number of the global action group or event.; index: The index of the action within the global action group or event.; groupIndex: The index of the conditional action group within the event.; speaker_host: The host name of the speaker client to check.; speaker_instance: The instance name of the speaker client to check.; grpact: Indicates whether the action is part of a global action group (True) or a conditional action group within an event (False). |
True if the specified speaker client is selected in the action's configuration, false otherwise. |
|
Method |
|
For a play audio file action, return a list of all speaker clients that are selected in the action's configuration. This can be used to display the selected speaker clients in the UI when editing the action, or to retrieve the list of selected speaker clients for use in plugin code. The function retrieves the specified action, checks that it is a play audio file action, and then returns a list of clsSpeakerClientInfo objects representing the selected speaker clients in the action's configuration. If any errors occur during this process, or if the action is not a play audio file action, the function returns an empty list. |
ref: The reference number of the global action group or event.; index: The index of the action within the global action group or event.; groupIndex: The index of the conditional action group within the event.; grpact: Indicates whether the action is part of a global action group (True) or a conditional action group within an event (False). |
A list of clsSpeakerClientInfo objects representing the selected speaker clients in the action's configuration. |
|
Method |
|
For a change audio output action, return true if the specified speaker client is selected in the action's configuration. This can be used to determine whether a particular speaker client is included in the action's settings when editing the action in the UI, or to check for the presence of a speaker client in plugin code. The function retrieves the specified action, checks that it is a change audio output action, and then checks whether the given speaker host and instance match any of the selected speaker clients in the action's configuration. It returns true if a match is found, and false otherwise. |
ref: The reference number of the global action group or event.; index: The index of the action within the global action group or event.; groupIndex: The index of the conditional action group within the event.; speaker_host: The host name of the speaker client to check.; speaker_instance: The instance name of the speaker client to check.; grpact: Indicates whether the action is part of a global action group (True) or a conditional action group within an event (False). |
True if the specified speaker client is selected in the action's configuration, otherwise False. |
|
Method |
|
For a change audio output action, return a list of all speaker clients that are selected in the action's configuration. This can be used to display the selected speaker clients in the UI when editing the action, or to retrieve the list of selected speaker clients for use in plugin code. The function retrieves the specified action, checks that it is a change audio output action, and then returns a list of clsSpeakerClientInfo objects representing the selected speaker clients in the action's configuration. If any errors occur during this process, or if the action is not a change audio output action, the function returns an empty list. |
ref: The reference number of the global action group or event.; index: The index of the action within the global action group or event.; groupIndex: The index of the conditional action group within the event.; grpact: Indicates whether the action is part of a global action group (True) or a conditional action group within an event (False). |
A list of clsSpeakerClientInfo objects representing the selected speaker clients in the action's configuration. |
|
Method |
|
For a device control action, return a list of all available control options for the specified device reference. This can be used to populate dropdowns or other UI elements when editing the action in the UI, allowing the user to select from the appropriate control options based on the device reference. The function retrieves the specified action, checks that it is a device control action, and then returns a list of ControlAction objects representing the available control options for the specified device reference in the action's configuration. If any errors occur during this process, or if the action is not a device control action, the function returns a default list containing a single "missing" control option. |
evref: The reference number of the global action group or event.; dvref: The reference number of the device.; action_order: The index of the action within the global action group or event.; groupIndex: The index of the conditional action group within the event.; grpact: Indicates whether the action is part of a global action group (True) or a conditional action group within an event (False). |
A list of ControlAction objects representing the available control options for the specified device reference in the action's configuration. |
|
Method |
|
For a device control action, return a list of all available control options for the specified device reference. This can be used to populate dropdowns or other UI elements when editing the action in the UI, allowing the user to select from the appropriate control options based on the device reference. The function retrieves the specified device based on the provided reference number, then returns a list of ControlAction objects representing the available control options for that device. If any errors occur during this process, or if the device cannot be found, the function returns an empty list. |
sdvRef: The reference number of the device as a string. |
A list of ControlAction objects representing the available control options for the specified device reference. |
|
Method |
|
Returns a formatted HTML action Used only by plugins, standard actions are formatted in event.html |
ref; index |
String |
|
Type |
|
Internal structure used to generate the event action list of available actions, especially for plugin actions where we need to get the action name and plugin name to show in the dropdown. This structure is not exposed outside of this class and is only used as a temporary data holder when building the list of available actions for the event action dropdowns in the UI. |
|
|
|
Method |
|
Used internally to generate the event action list of available actions |
Act; Action; IncludeGlobalAction |
|
|
Method |
|
Used internally to generate the event action list of available actions, especially for plugin actions where we need to get the action name and plugin name to show in the dropdown. This function retrieves the list of available actions for a given action type, including plugin actions where it gathers the action names and associated plugin information to build a comprehensive list of options for the UI. The function handles both standard actions and plugin actions, ensuring that the appropriate information is included for each type when generating the list of available actions for display in the event action dropdowns in the UI. |
action_type: The type of action for which to retrieve the available actions. |
An array of structANUI structures representing the available actions for the specified action type. |
|
Method |
|
Returns the date and time of the last local backup in a formatted string. This function can be used to display the last backup time in the UI or to check when the last backup was performed for plugin code. The function retrieves this information from the BackupManager, which manages backup operations and stores details about the last backup performed on the local system. If there is an issue retrieving this information, such as if no backups have been performed yet, the function may return an empty string or a default value depending on how the BackupManager is implemented. |
|
A string representing the date and time of the last local backup. |
|
Property |
|
Returns the date and time of the last cloud backup in a formatted string. This function can be used to display the last cloud backup time in the UI or to check when the last cloud backup was performed for plugin code. The function retrieves this information from the BackupManager, which manages backup operations and stores details about the last backup performed on the cloud. If there is an issue retrieving this information, such as if no cloud backups have been performed yet, the function may return an empty string or a default value depending on how the BackupManager is implemented. |
|
|
|
Property |
|
Returns the progress of the current backup operation as an integer percentage. This function can be used to display a progress bar or percentage in the UI during a backup operation, or to check the backup progress in plugin code. The function retrieves this information from the BackupManager, which manages backup operations and updates the backup_progress property as the backup progresses. If there is no backup currently running, this function may return 0 or a default value depending on how the BackupManager is implemented. |
|
An integer representing the progress of the current backup operation as a percentage. |
|
Property |
|
Returns a boolean indicating whether a backup operation is currently running. This function can be used to disable certain UI elements or prevent certain actions while a backup is in progress, or to check the backup status in plugin code. The function retrieves this information from the BackupManager, which manages backup operations and updates the backup_is_running property to indicate whether a backup is currently active. If there is an issue retrieving this information, such as if the BackupManager is not properly initialized, this function may return false or a default value depending on how the BackupManager is implemented. |
|
A boolean indicating whether a backup operation is currently running. |
|
Method |
|
Returns the file system path of the backup folder as a string. This function can be used to display the backup folder location in the UI or to access the backup folder path in plugin code for operations such as listing backup files or saving new backups. The function retrieves this information from the BackupManager, which manages backup operations and stores the path to the backup folder. If there is an issue retrieving this information, such as if the BackupManager is not properly initialized, this function may return an empty string or a default value depending on how the BackupManager is implemented. |
|
A string representing the file system path of the backup folder. |
|
Method |
|
Returns the scheduled time for the next automatic backup as a string. This function can be used to display the next scheduled backup time in the UI or to check the schedule for automatic backups in plugin code. The function retrieves this information from the BackupManager, which manages backup operations and stores details about the scheduling of automatic backups. If there is an issue retrieving this information, such as if automatic backups are not enabled or if the BackupManager is not properly initialized, this function may return an empty string or a default value depending on how the BackupManager is implemented. |
|
A string representing the scheduled time for the next automatic backup. |
|
Method |
|
Checks whether a specific bit is set in a given integer value. This function can be used to evaluate bit flags or settings that are stored as integers, allowing you to determine if a particular option or feature is enabled based on the presence of its corresponding bit in the integer value. The function performs a bitwise AND operation between the provided bit and value, returning true if the bit is set (i.e., if the result of the operation is non-zero) and false otherwise. This is commonly used in scenarios where multiple boolean options are combined into a single integer using bitwise operations for efficient storage and retrieval. |
bit: The bit to check.; value: The integer value to check against. |
A boolean indicating whether the specified bit is set in the given value. |
|
Method |
|
Returns a list of available restore dates for local backups as strings. This function can be used to populate dropdowns or other UI elements that allow the user to select a backup date for restoration, or to check for available restore points in plugin code. The function retrieves this information from the BackupManager, which manages backup operations and stores details about the available restore points based on the backups that have been performed. If there are no available restore points or if there is an issue retrieving this information, this function may return an empty list or a default value depending on how the BackupManager is implemented. |
|
A string representing the available restore dates for local backups. |
|
Method |
|
Returns a list of available restore dates for cloud backups as strings. This function can be used to populate dropdowns or other UI elements that allow the user to select a cloud backup date for restoration, or to check for available cloud restore points in plugin code. The function retrieves this information from the BackupManager, which manages backup operations and stores details about the available cloud restore points based on the backups that have been performed and stored in the cloud. If there are no available cloud restore points or if there is an issue retrieving this information, this function may return an empty list or a default value depending on how the BackupManager is implemented. |
|
A string representing the available restore dates for cloud backups. |
|
Method |
|
Returns a list of restore items for the selected restore date. This function can be used to display the available restore points for a specific date in the UI or to access the details of restore points for plugin code. The function retrieves this information from the BackupManager, which manages backup operations and stores details about the available restore points based on the backups that have been performed. The restore_date_selected property is used to specify which date's restore points should be retrieved. If there are no available restore points for the selected date or if there is an issue retrieving this information, this function may return an empty list or a default value depending on how the BackupManager is implemented. |
|
A list of restore items for the selected restore date. |
|
Method |
|
Returns a list of restore items for the selected cloud restore date. This function can be used to display the available cloud restore points for a specific date in the UI or to access the details of cloud restore points for plugin code. The function retrieves this information from the BackupManager, which manages backup operations and stores details about the available cloud restore points based on the backups that have been performed and stored in the cloud. The restore_date_selected property is used to specify which date's cloud restore points should be retrieved. If there are no available cloud restore points for the selected date or if there is an issue retrieving this information, this function may return an empty list or a default value depending on how the BackupManager is implemented. |
|
A list of restore items for the selected cloud restore date. |
|
Method |
|
Returns the current subscription information for the MyHS service. This function can be used to check the status of the user's MyHS subscription, including details such as whether the subscription is active, the expiration date, and any other relevant information provided by the MyHS service. The function retrieves this information from the myhs object, which manages the connection to the MyHS service and stores the subscription details. To optimize performance and reduce unnecessary requests to the MyHS service, this function caches the subscription information and only makes a new request if more than one minute has passed since the last request or if there is no cached subscription information available. If there is an issue retrieving this information, such as if the myhs connection is not properly initialized, this function may return a default SubscriptionInfo object with default values depending on how the myhs connection is implemented. |
|
The current subscription information for the MyHS service. |
|
Method |
|
Returns the current time zone setting for the system. This function can be used to display the current time zone in the UI or to access the time zone information in plugin code for operations that require knowledge of the system's time zone. The function retrieves this information from the gLocationTimeZone variable, which is set during initialization based on the system's configuration. If there is an issue retrieving this information, such as if the gLocationTimeZone variable is not properly initialized, this function may return an empty string or a default value depending on how the time zone information is managed in the system. |
|
The current time zone setting for the system. |
|
Method |
|
Returns a list of available time zones for the system (Linux only). This function can be used to populate dropdowns or other UI elements that allow the user to select a time zone, or to access the list of time zones in plugin code for operations that require knowledge of the available time zones on the system. The function retrieves this information from the system's configuration files, such as /etc/timezone and /usr/share/zoneinfo/zone.tab on Linux systems, and builds a list of dropPair objects representing the available time zones. Each dropPair contains a display name and a value corresponding to a specific time zone. If there is an issue retrieving this information, such as if the necessary files are not accessible or if the system is not running Linux, this function may return an empty list or a default value depending on how the time zone information is managed in the system. |
|
A list of available time zones for the system. |
|
Method |
|
Returns the file name of the current configuration file being used by the system. This function can be used to display the configuration file name in the UI or to access it in plugin code for operations that require knowledge of the current configuration file. The function retrieves this information from the gConfigFilename variable, which is set during initialization based on the system's configuration. If there is an issue retrieving this information, such as if the gConfigFilename variable is not properly initialized, this function may return an empty string or a default value depending on how the configuration file information is managed in the system. |
|
The file name of the current configuration file. |
|
Method |
|
Returns a list of configured webhooks in the system. This function can be used to display the list of webhooks in the UI or to access the webhook information in plugin code for operations that involve managing or utilizing webhooks. The function retrieves this information from the WebHookList variable, which is populated by the WebHooksLoad() function that reads the webhook configurations from the system's storage. Each WebHook object in the list contains details about a specific webhook, such as its name, URL, and associated events. If there are no configured webhooks or if there is an issue retrieving this information, this function may return an empty list or a default value depending on how the webhook information is managed in the system. |
|
A list of configured webhooks. |
|
Method |
|
Returns a list of available text-to-speech voices on the system. This function can be used to populate dropdowns or other UI elements that allow the user to select a text-to-speech voice, or to access the list of available voices in plugin code for operations that involve text-to-speech functionality. The function retrieves this information from the system's text-to-speech engine, such as the SpeechLib.SpVoice object on Windows, and builds a list of voice names that are available for use. If there are no available voices or if there is an issue retrieving this information, this function may return an empty list or a default value depending on how the text-to-speech information is managed in the system. |
|
A list of available text-to-speech voices. |
|
Type |
|
Returns a list of notification categories available in the system. This function can be used to display the notification categories in the UI or to access them in plugin code for operations that involve managing or filtering notifications. The function retrieves this information from the NotificationCategory enumeration, which defines the different categories of notifications that can be generated by the system. Each notification item in the returned list contains the name and corresponding integer value of a notification category. If there are no defined notification categories or if there is an issue retrieving this information, this function may return an empty list or a default value depending on how the notification categories are managed in the system. |
|
|
|
Method |
|
Returns a list of notification categories available in the system. This function can be used to display the notification categories in the UI or to access them in plugin code for operations that involve managing or filtering notifications. The function retrieves this information from the NotificationCategory enumeration, which defines the different categories of notifications that can be generated by the system. Each notification item in the returned list contains the name and corresponding integer value of a notification category. If there are no defined notification categories or if there is an issue retrieving this information, this function may return an empty list or a default value depending on how the notification categories are managed in the system. |
|
A list of notification categories. |
|
Method |
|
Returns the count of unread notifications in the system. This function can be used to display the number of unread notifications in the UI or to check for unread notifications in plugin code for operations that involve managing or responding to notifications. The function retrieves this information from the gNotificationManager, which manages the notifications in the system and provides a method to count the number of unread notifications while considering any filters such as hiding promotional or news notifications based on user settings. If there is an issue retrieving this information, such as if the gNotificationManager is not properly initialized, this function may return 0 or a default value depending on how the notification management is implemented in the system. |
|
The count of unread notifications. |
|
Method |
|
Returns a list of notifications based on the current filter settings. This function can be used to display the notifications in the UI or to access them in plugin code for operations that involve managing or responding to notifications. The function retrieves this information from the gNotificationManager, which manages the notifications in the system and provides methods to get either all notifications or only unread notifications based on the current filter settings. Additionally, the function applies further filtering to remove promotional or news notifications if the corresponding hide settings are enabled. If there is an issue retrieving this information, such as if the gNotificationManager is not properly initialized, this function may return an empty list or a default value depending on how the notification management is implemented in the system. |
|
List of notifications based on the current filter settings. |
|
Method |
|
Returns the details of a specific notification category. This function can be used to display the details of a notification category in the UI or to access them in plugin code for operations that involve managing or responding to notifications. The function retrieves this information from the gNotificationManager, which manages the notifications in the system and provides a method to get the description of a specific notification category, including details such as the category name, description, and any associated settings or properties. If there is an issue retrieving this information, such as if the gNotificationManager is not properly initialized or if the specified notification category does not exist, this function may return a default CategoryDetails object with default values depending on how the notification management is implemented in the system. |
nc: The notification category for which to retrieve details. |
The details of the specified notification category. |
|
Method |
|
Returns a boolean indicating whether read notifications are currently being shown in the notification list. This function can be used to determine the current filter state for notifications in the UI or to check this setting in plugin code for operations that involve managing or responding to notifications. The function retrieves this information from the gNotificationManager, which manages the notifications in the system and provides a property that indicates whether read notifications are included in the current view. If there is an issue retrieving this information, such as if the gNotificationManager is not properly initialized, this function may return false or a default value depending on how the notification management is implemented in the system. |
|
True if read notifications are currently being shown; otherwise, false. |
|
Method |
|
Sets whether read notifications should be shown in the notification list. This function can be used to update the filter state for notifications in the UI or to change this setting in plugin code for operations that involve managing or responding to notifications. The function updates this information in the gNotificationManager, which manages the notifications in the system and provides a property that can be set to indicate whether read notifications should be included in the current view. After calling this function, the notification list will reflect the updated filter state based on whether read notifications are now being shown or hidden. If there is an issue updating this information, such as if the gNotificationManager is not properly initialized, this function may not have any effect depending on how the notification management is implemented in the system. |
value: True to show read notifications; false to hide them. |
|
|
Method |
|
Refreshes the notification list by downloading the latest notifications from the server. This function can be used to update the notification list in the UI or to ensure that plugin code has access to the most recent notifications for operations that involve managing or responding to notifications. The function calls the RefreshNotifications method of the gNotificationManager, which handles the process of fetching new notifications from the server and updating the local notification list accordingly. Additionally, this function triggers a check for plugin updates using the UpdaterV2.CheckForPluginUpdates method, which can be useful to ensure that any available updates for plugins are also retrieved during this refresh process. If there is an issue with refreshing notifications or checking for plugin updates, such as if the gNotificationManager or UpdaterV2 is not properly initialized, this function may not have any effect depending on how these components are implemented in the system. |
|
|
|
Method |
|
Checks whether a specific dashboard is shared. This function can be used to determine if a dashboard is shared with other users in the system, which may affect how the dashboard is displayed in the UI or how it can be accessed in plugin code. The function retrieves this information from the UserDashboards object associated with the current user, which manages the dashboards for that user and provides a method to check if a specific dashboard, identified by its ID, is marked as shared. If there is an issue retrieving this information, such as if the UserDashboards object is not properly initialized or if the specified dashboard ID does not exist, this function may return false or a default value depending on how the dashboard management is implemented in the system. |
dashboard_id: The ID of the dashboard to check. |
True if the dashboard is shared; otherwise, false. |
|
Method |
|
Returns the count of dashboards available for the current user. This function can be used to display the number of dashboards in the UI or to access this information in plugin code for operations that involve managing or displaying dashboards. The function retrieves this information from the UserDashboards object associated with the current user, which manages the dashboards for that user and provides a property that returns the list of dashboards. The count is obtained by accessing the Dashboards property and returning its Count. If there is an issue retrieving this information, such as if the UserDashboards object is not properly initialized, this function may return 0 or a default value depending on how the dashboard management is implemented in the system. |
|
The number of dashboards available for the current user. |
|
Method |
|
Returns a list of dashboard names available for the current user. This function can be used to display the names of dashboards in the UI or to access this information in plugin code for operations that involve managing or displaying dashboards. The function retrieves this information from the UserDashboards object associated with the current user, which manages the dashboards for that user and provides a property that returns the list of dashboards. The function iterates through the Dashboards property and extracts the Name of each dashboard, adding it to a list of strings that is returned to the caller. If there is an issue retrieving this information, such as if the UserDashboards object is not properly initialized, this function may return an empty list or a default value depending on how the dashboard management is implemented in the system. |
|
A list of dashboard names available for the current user. |
|
Method |
|
Returns a list of widgets for a specific dashboard. This function can be used to display the widgets associated with a particular dashboard in the UI or to access this information in plugin code for operations that involve managing or displaying dashboards and their widgets. The function retrieves this information from the UserDashboards object associated with the current user, which manages the dashboards and their widgets for that user. It first gets the specified dashboard by name, then retrieves the list of widgets associated with that dashboard. The function also includes logic to check if any device widgets reference devices that no longer exist in the system, and if so, it removes those widgets from the dashboard. Additionally, if a device widget references a parent device with associated devices, it ensures that the widget's features are updated to reflect any changes in the associated devices. If there is an issue retrieving this information, such as if the UserDashboards object is not properly initialized or if the specified dashboard does not exist, this function may return an empty list or a default value depending on how the dashboard management is implemented in the system. |
dashboard_name: The name of the dashboard for which to retrieve widgets. |
A list of widgets associated with the specified dashboard. |
|
Method |
|
Returns the count of widgets for a specific dashboard. This function can be used to display the number of widgets associated with a particular dashboard in the UI or to access this information in plugin code for operations that involve managing or displaying dashboards and their widgets. The function retrieves this information from the UserDashboards object associated with the current user, which manages the dashboards and their widgets for that user. It first gets the specified dashboard by name, then retrieves the list of widgets associated with that dashboard and returns the count of widgets in that list. If there is an issue retrieving this information, such as if the UserDashboards object is not properly initialized or if the specified dashboard does not exist, this function may return 0 or a default value depending on how the dashboard management is implemented in the system. |
widget_id: The ID of the widget for which to retrieve the count. |
The count of widgets associated with the specified dashboard. |
|
Method |
|
Returns a specific widget by its ID. This function can be used to access the details of a specific widget in the UI or in plugin code for operations that involve managing or displaying widgets. The function retrieves this information from the UserDashboards object associated with the current user, which manages the dashboards and their widgets for that user. It uses the WidgetById method to get the widget with the specified ID. Additionally, if the widget is a device widget, it checks if the referenced device still exists in the system and updates the widget's features accordingly if it references a parent device with associated devices. If there is an issue retrieving this information, such as if the UserDashboards object is not properly initialized or if the specified widget ID does not exist, this function may return null or a default value depending on how the dashboard management is implemented in the system. |
widget_id: The ID of the widget to retrieve. |
The widget with the specified ID, or null if not found. |
|
Method |
|
Returns a reference to the UserDashboards object for the current user. This function can be used to access the dashboards and their associated widgets for the current user in the UI or in plugin code for operations that involve managing or displaying dashboards. The function retrieves this information from the gDashboardManager, which manages the dashboards for all users in the system, and uses the GetUserDashboards method with the current user's ID to get the UserDashboards object specific to that user. If there is an issue retrieving this information, such as if the gDashboardManager is not properly initialized or if there is an issue with the user ID, this function may return null or a default value depending on how the dashboard management is implemented in the system. |
|
The UserDashboards object for the current user, or null if not found. |
|
Method |
|
Returns a reference to a specific dashboard by its name. This function can be used to access the details of a specific dashboard in the UI or in plugin code for operations that involve managing or displaying dashboards. The function retrieves this information from the gDashboardManager, which manages the dashboards for all users in the system, and uses the GetUserDashboard method with the current user's ID and the specified dashboard name to get the Dashboard object corresponding to that name. If there is an issue retrieving this information, such as if the gDashboardManager is not properly initialized, if there is an issue with the user ID, or if a dashboard with the specified name does not exist for the user, this function may return null or a default value depending on how the dashboard management is implemented in the system. |
dashboard_name: The name of the dashboard to retrieve. |
The Dashboard object with the specified name, or null if not found. |
|
Method |
|
Returns a reference to a specific dashboard by its ID. This function can be used to access the details of a specific dashboard in the UI or in plugin code for operations that involve managing or displaying dashboards. The function retrieves this information from the gDashboardManager, which manages the dashboards for all users in the system, and uses the GetUserDashboardById method with the specified dashboard ID to get the Dashboard object corresponding to that ID. If there is an issue retrieving this information, such as if the gDashboardManager is not properly initialized or if a dashboard with the specified ID does not exist, this function may return null or a default value depending on how the dashboard management is implemented in the system. |
dashboard_id: The ID of the dashboard to retrieve. |
The Dashboard object with the specified ID, or null if not found. |
|
Method |
|
Returns a reference to a specific dashboard by its name. This function can be used to access the details of a specific dashboard in the UI or in plugin code for operations that involve managing or displaying dashboards. The function retrieves this information from the gDashboardManager, which manages the dashboards for all users in the system, and uses the GetUserDashboardByName method with the specified dashboard name to get the Dashboard object corresponding to that name. If there is an issue retrieving this information, such as if the gDashboardManager is not properly initialized or if a dashboard with the specified name does not exist, this function may return null or a default value depending on how the dashboard management is implemented in the system. |
dashboard_name: The name of the dashboard to retrieve. |
The Dashboard object with the specified name, or null if not found. |
|
Method |
|
Return the feature name of a feauture. This excludes the location and the root device name |
sref |
|
|
Method |
|
Returns the properties of a specific feature for a widget. This function can be used to access the details of a feature associated with a widget in the UI or in plugin code for operations that involve managing or displaying widgets and their features. The function retrieves this information from the UserDashboards object associated with the current user, which manages the dashboards and their widgets for that user. It first gets the specified dashboard by name, then retrieves the list of widgets associated with that dashboard, and finally iterates through the widgets to find the one with the specified widget ID. If it finds a device widget with the matching ID, it retrieves the properties of the specified feature reference (fref) from that widget and returns it as a FeatureProperties object. If there is an issue retrieving this information, such as if the UserDashboards object is not properly initialized, if the specified dashboard or widget does not exist, or if the feature reference is invalid, this function may return a default FeatureProperties object with default values depending on how the dashboard management is implemented in the system. |
dashboard_name: The name of the dashboard containing the widget.; widget_id: The ID of the widget containing the feature.; fref: The reference ID of the feature. |
The FeatureProperties object for the specified feature, or a default FeatureProperties object if not found. |
|
Type |
|
Returns a list of custom cards available in the system. This function can be used to display the custom cards in the UI or to access them in plugin code for operations that involve managing or displaying custom cards. The function retrieves this information by reading the HTML files located in the Custom and Internal folders for dashboards, which contain metadata about each card such as name, description, version, author, and preview image. It parses this information from the files and builds a list of card items that can be returned to the caller. If there is an issue retrieving this information, such as if the files are not properly formatted or if there is an issue with file access, this function may return an empty list or a default value depending on how the custom card management is implemented in the system. |
|
|
|
Method |
|
Reads a single custom card file and extracts its metadata to create a cards_list_item object. This function can be used to parse the HTML files that define custom cards for dashboards, which contain metadata such as the card's name, description, version, author, and preview image. The function checks if the specified file exists, and if not, it looks for the file in the Custom and Internal folders for dashboards. It then reads the contents of the file line by line, looking for specific metadata tags (e.g., #name, #description) to populate the properties of the cards_list_item object. If there is an issue reading the file or parsing its contents, this function may return a cards_list_item object with default values depending on how the custom card management is implemented in the system. |
filename: The path to the custom card file. |
A cards_list_item object containing the metadata of the custom card. |
|
Method |
|
Returns a list of custom cards available in the system by reading the HTML files located in the Custom and Internal folders for dashboards. This function can be used to display the custom cards in the UI or to access them in plugin code for operations that involve managing or displaying custom cards. The function iterates through the HTML files in both the Custom and Internal folders, using the read_single_card_file function to extract the metadata for each card and build a list of cards_list_item objects that represent the available custom cards. If there is an issue retrieving this information, such as if the files are not properly formatted or if there is an issue with file access, this function may return an empty list or a default value depending on how the custom card management is implemented in the system. |
|
A list of cards_list_item objects representing the available custom cards. |
|
Method |
|
Saves the width and height of a specific widget. This function can be used to update the dimensions of a widget in the UI or in plugin code for operations that involve managing or displaying widgets. The function retrieves the specified widget from the UserDashboards object associated with the current user using the widget ID, then updates the Width and Height properties of the widget with the new values provided as parameters. Finally, it calls the SaveWidget method of the UserDashboards object to save the updated widget information. If there is an issue saving this information, such as if the UserDashboards object is not properly initialized or if the specified widget ID does not exist, this function may not have any effect depending on how the dashboard management is implemented in the system. |
new_width: The new width of the widget.; new_height: The new height of the widget.; widget_id: The ID of the widget to update. |
|
|
Method |
|
Returns a saved value for a specific widget. This function can be used to retrieve custom values associated with a widget in the UI or in plugin code for operations that involve managing or displaying widgets and their custom data. The function retrieves the specified widget from the UserDashboards object associated with the current user using the widget ID, then calls the GetSavedValue method of the widget to retrieve the value associated with the specified name. If there is an issue retrieving this information, such as if the UserDashboards object is not properly initialized, if the specified widget ID does not exist, or if there is no saved value with the specified name, this function may return an empty string or a default value depending on how the dashboard management is implemented in the system. |
name: The name of the saved value to retrieve.; widget_id: The ID of the widget from which to retrieve the saved value. |
The saved value associated with the specified name, or an empty string if the value does not exist or an error occurs. |
|
Type |
|
Saves a value for a specific widget. This function can be used to store custom values associated with a widget in the UI or in plugin code for operations that involve managing or displaying widgets and their custom data. The function retrieves the specified widget from the UserDashboards object associated with the current user using the widget ID, then calls the SetSavedValue method of the widget to save the value with the specified name. If there is an issue saving this information, such as if the UserDashboards object is not properly initialized, if the specified widget ID does not exist, or if there is an issue with saving the value, this function may not have any effect depending on how the dashboard management is implemented in the system. |
name: The name of the saved value to set.; value: The value to save.; widget_id: The ID of the widget for which to save the value. |
|
|
Method |
|
Removes all saved values for a specific widget. This function can be used to clear custom values associated with a widget in the UI or in plugin code for operations that involve managing or displaying widgets and their custom data. The function retrieves the specified widget from the UserDashboards object associated with the current user using the widget ID, then calls the ClearSavedValues method of the widget to remove all saved values. If there is an issue clearing this information, such as if the UserDashboards object is not properly initialized, if the specified widget ID does not exist, or if there is an issue with clearing the values, this function may not have any effect depending on how the dashboard management is implemented in the system. |
widget_id |
|
|
Method |
|
Returns a dictionary of all saved values for a specific widget. This function can be used to retrieve all custom values associated with a widget in the UI or in plugin code for operations that involve managing or displaying widgets and their custom data. The function retrieves the specified widget from the UserDashboards object associated with the current user using the widget ID, then calls the GetSavedValues method of the widget to retrieve a dictionary containing all saved values, where the keys are the names of the saved values and the values are the corresponding saved values. If there is an issue retrieving this information, such as if the UserDashboards object is not properly initialized, if the specified widget ID does not exist, or if there are no saved values for the widget, this function may return an empty dictionary or a default value depending on how the dashboard management is implemented in the system. |
widget_id |
|
|
Method |
|
Checks if the current value of a feature matches the "On" control use. This function can be used to determine if a specific feature is currently in the "On" state based on its associated controls. The function retrieves the device associated with the specified feature reference (ref) from the DeviceListSync, then gets all controls for that device using the CAPIGetAllControls function. It iterates through the controls to find any that have a ControlUse of _On, and checks if the ControlValue of that control matches the current value of the device (HSdevValue). If it finds a match, it returns true, indicating that the feature is considered "On". If there is an issue retrieving this information, such as if the device does not exist or if there are no controls with a ControlUse of _On, this function may return false depending on how the control management is implemented in the system. |
ref |
True if the feature is currently "On", otherwise False. |
|
Method |
|
Checks if the current value of a feature matches the "Off" control use. This function can be used to determine if a specific feature is currently in the "Off" state based on its associated controls. The function retrieves the device associated with the specified feature reference (ref) from the DeviceListSync, then gets all controls for that device using the CAPIGetAllControls function. It iterates through the controls to find any that have a ControlUse of _Off, and checks if the ControlValue of that control matches the current value of the device (HSdevValue). If it finds a match, it returns true, indicating that the feature is considered "Off". If there is an issue retrieving this information, such as if the device does not exist or if there are no controls with a ControlUse of _Off, this function may return false depending on how the control management is implemented in the system. |
ref |
True if the feature is currently "Off", otherwise False. |
|
Method |
|
Checks if the current value of a feature matches a specific control use. This function can be used to determine if a specific feature is currently in a state associated with a particular control use based on its associated controls. The function retrieves the device associated with the specified feature reference (ref) from the DeviceListSync, then gets all controls for that device using the CAPIGetAllControls function. It iterates through the controls to find any that have a ControlUse matching the specified controluse parameter, and checks if the ControlValue of that control matches the current value of the device (HSdevValue). If it finds a match, it returns true, indicating that the feature is considered to be in the state associated with that control use. If there is an issue retrieving this information, such as if the device does not exist or if there are no controls with the specified ControlUse, this function may return false depending on how the control management is implemented in the system. |
ref; controluse |
True if the feature's current value matches the specified control use, otherwise False. |
|
Type |
|
A simple in-memory cache for web downloads. This can be used to cache the results of web requests for a specified amount of time to reduce the number of requests made and improve performance. The cache is implemented as a dictionary where the keys are the URLs and the values are download_cache_entry objects that contain the downloaded item, the time it was cached, and the lifetime of the cache entry in milliseconds. The web_download_json_to_object function checks if a cached entry exists for the specified URL and if it is still valid based on its lifetime. If a valid cache entry exists, it returns the cached item. If not, it performs a web request to download the JSON data from the URL, deserializes it into an object, stores it in the cache with the current time and specified lifetime, and then returns the downloaded object. If there is an issue with downloading or caching this information, such as if the web request fails or if there is an issue with caching, this function may return null or a default value depending on how the caching mechanism is implemented in the system. |
|
|
|
Method |
|
Downloads JSON data from the specified URL and deserializes it into an object, with optional caching. This function can be used to retrieve data from web APIs or other online sources that return JSON data, and to cache the results for a specified amount of time to reduce the number of requests made and improve performance. The function first checks if there is a valid cache entry for the specified URL, and if so, it returns the cached item. If there is no valid cache entry, it performs a web request to download the JSON data from the URL using the WebUtils.DownloadJsonAsync function, deserializes it into an object using JsonConvert.DeserializeObject, stores it in the cache with the current time and specified lifetime, and then returns the downloaded object. If there is an issue with downloading or caching this information, such as if the web request fails or if there is an issue with caching, this function may return null or a default value depending on how the caching mechanism is implemented in the system. |
url: The URL to download the JSON data from.; useragent: The user agent string to use for the web request.; cache_time_ms: The time in milliseconds to cache the downloaded data. |
The deserialized object from the JSON data, or a cached object if available and valid. |
|
Method |
|
Runs a HomeSeer script and returns the result. This function can be used to execute HomeSeer scripts from the UI or from plugin code, allowing for dynamic execution of scripts based on user interactions or other events. The function takes a string parameter that contains the script to be executed, and it uses the hsiface.RunScript method to run the script. The parameters passed to RunScript indicate that the script should be run with the option to return a result (True) and without showing any message boxes (False). If there is an issue running the script, such as if the script contains errors or if there is an issue with the HomeSeer scripting engine, this function may return null or a default value depending on how script execution is implemented in the system. |
script: The HomeSeer script to be executed. |
The result of the script execution, or null if an error occurs. |
|
Method |
|
Runs a Linux command and returns the result. This function can be used to execute Linux commands from the UI or from plugin code when running on a Linux system, allowing for integration with Linux-based tools and utilities. The function takes a string parameter that contains the command to be executed, and it uses a helper function RunLinuxCommand to run the command and capture its output. If there is an issue running the command, such as if the command is not found or if there is an issue with permissions, this function may return an error message or a default value depending on how command execution is implemented in the system. If the code is not running on a Linux system, it returns a message indicating that it is not running on Linux. |
cmd: The Linux command to be executed. |
The result of the command execution, or an error message if an error occurs. |
|
Method |
|
Returns the system locale in the format of a culture name (e.g., "en-US"). This function can be used to determine the current locale settings of the system, which can be useful for formatting dates, numbers, and other culture-specific data in the UI or in plugin code. The function uses the CultureInfo.CurrentCulture.Name property to retrieve the name of the current culture. If there is an issue retrieving this information, such as if the CultureInfo class is not available or if there is an issue with the current culture settings, this function may return a default value of "en-US" depending on how locale management is implemented in the system. |
|
The current system locale in the format of a culture name (e.g., "en-US"). |
|
Type |
|
A utility class for web-related functions, such as downloading JSON data from a URL. This class can be used |
|
|
|
Method |
|
Downloads JSON data from the specified URL. |
url: The URL to download the JSON from. |
A string containing the JSON data. |