Author: HCA Central Version: 3 Added to Library: 11-Nov-23 HCAVersion needed: 17.0.56 Keywords: Utility
Package Description: What's new?
8-Apr-23 Was too slow on client-server if the design contains lots of devices and programs. Now faster.
Important! After importing this package, Open the Alert Manager and using the button at the bottom of the Summary tab, assign as the program to execute on any alert: "Health Check - Handler for any alert"
Program Description: Creates the detail section of the Alert Report for one type of alert
Parameters:
Name | Type | Description | Default |
---|---|---|---|
Path | Value | Path to the report file | |
AlertCode | Value | Alert code to generate details section for |
Program Description: Creates a HTML report in the HCA Documents folder after reading the alert log. Counts by alert, the number that occurred in the last 24 hours, last week, and last month.
This program can be started from the HCA UI by right-click start. If you do that, popups display showing any problems and when the report is complete. If you want to run the program in a schedule, then start it from a program using the Start-Program element and set the "Quiet" parameter to 1. That eliminates those popups.
Uses 27 global variables.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
Quiet | Value | If 0 - which is the default - shows popups if there are problems and when done | 0 |
HideNonAlerts | Value | If 0 - shows all alerts even if an alert has zero counts, if non-zero shows only those alerts with a count | 1 |
Global Variable Use:
Name | Description |
---|---|
HC_AlertCode27 | Used by the Health Check report generator |
HC_AlertCode26 | Used by the Health Check report generator |
HC_AlertCode25 | Used by the Health Check report generator |
HC_AlertCode24 | Used by the Health Check report generator |
HC_AlertCode23 | Used by the Health Check report generator |
HC_AlertCode22 | Used by the Health Check report generator |
HC_AlertCode21 | Used by the Health Check report generator |
HC_AlertCode20 | Used by the Health Check report generator |
HC_AlertCode19 | Used by the Health Check report generator |
HC_AlertCode18 | Used by the Health Check report generator |
HC_AlertCode17 | Used by the Health Check report generator |
HC_AlertCode16 | Used by the Health Check report generator |
HC_AlertCode15 | Used by the Health Check report generator |
HC_AlertCode14 | Used by the Health Check report generator |
HC_AlertCode13 | Used by the Health Check report generator |
HC_AlertCode12 | Used by the Health Check report generator |
HC_AlertCode11 | Used by the Health Check report generator |
HC_AlertCode10 | Used by the Health Check report generator |
HC_AlertCode9 | Used by the Health Check report generator |
HC_AlertCode8 | Used by the Health Check report generator |
HC_AlertCode7 | Used by the Health Check report generator |
HC_AlertCode6 | Used by the Health Check report generator |
HC_AlertCode5 | Used by the Health Check report generator |
HC_AlertCode4 | Used by the Health Check report generator |
HC_AlertCode3 | Used by the Health Check report generator |
HC_AlertCode2 | Used by the Health Check report generator |
HC_AlertCode1 | Used by the Health Check report generator |
Program Description: Creates a report that shows any devices that have not been controlled or received from in the last 30 days. Also any programs not executed in the last 'n' days.
The tag "DaysPast" contains as its value the number of days in the past to check that the device or program hasn't been used. This defaults to 30.
This program can be started from the HCA UI by right-click start. If you do that, popups display showing when the report is complete. If you want to run the program in a schedule, then start it from a program using the Start-Program element and set the "Quiet" parameter to 1. That eliminates any popups.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
Quiet | Value | If 0 - which is the default - shows popup when done | 0 |
Program Description: Creates the image of the elapsed time from a time mark until the current time.
Displays as "x days x minutes x hours x seconds". And does this in a way that prevent ugly results like "0 minutes" and "1 minutes".
Use the Start-Program element to pass as argument 1 the time mark. The second argument tells if the image should include seconds. If omitted or is set to zero then seconds are omitted from the image. Any other value provides seconds in the image. Pick a variable to assign the result to.
Example: x = _now();
<delay 1 minute 10 seconds>
Start-Program with argument x and result assigned to variable "theImage". The variable "theImage" is set to "1 minute 10 seconds"
Return value: A string with the image elapsed time from the time mark until now
Parameters:
Name | Type | Description | Default |
---|---|---|---|
TimeMark | Value | A date-Time when something happened | |
withSeconds | Value | Should seconds be included in the image? | 0 |
Program Description: Implements an array using a comma separated list. This function is supplied with the name of a variable - MUST BE GLOBAL - and an element number - zero based - and returns that element.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
VarName | Value | Global variable name | |
iElement | Value | Element index. 0 is the first element, 1 is the second, etc. | 0 |
Program Description: Implements an array using a comma separated list. This function is supplied with the name of a variable - MUST BE GLOBAL - and an element number - zero based - and increments that element.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
VarName | Value | Name of the Global Variable | |
iElement | Value | Element index. 0 is the first element, 1 is the second, etc. | 0 |
Program Description: Implements an array using a comma separated list. This function is supplied with the name of a variable - MUST BE GLOBAL - and an element number - zero based - and sets that element.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
VarName | Value | Name of global variable | |
iElement | Value | Element index. 0 is the first element, 1 is the second, etc. | 0 |
Data | Value | Value to set the iTh element to | 0 |
Program Description: Implements an array using a comma separated list. This function is supplied with the name of a variable - MUST BE GLOBAL. Provided with the count of elements in the array sets them all to zero.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
VarName | Value | Name of the Global Variable | |
ItemCount | Value | Count of elements in the array | 1 |
Program Description: Creates a log file entry for any alert generated by the system. You must open the Alert manager and assign this program as the program to execute on any alert. There is a button for that at the bottom of the Alert summary tab.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
Code | Value | Alert code - See documentation for encoding | |
Text | Value | Extra info about alert if available | |
Count | Value | Alert count | |
ObjectName | Value | Name of object if alert applies to a specific object | |
AlertImage | Value | Alert in a readable form | |
Color | Value | Alert Color text - Red or Yellow |
Program Description: Deletes HC_Day, HC_Month, HC_Year from all device and program objects.
Program Description: Increments an element of an array stored as a tag on a device or program
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ObjName | Value | Name of the device or program | |
When | Value | 0 = Day, 1 = Week, 2 = Month | 0 |
AlertCode | Value | Alert code 1-27 |