Program icon

Program

Program executes custom logical operations. Useful for custom automation processes.

Program

Program executes custom logical operations. Useful for custom automation processes. Program task could be one of the most advanced, most used and most powerful tasks in bOS as it allows almost limitless communication between tasks/devices and allows endless customisations of your building.

Program task can be enabled and disabled by setting the Enabled setting under Values tab. The Restart On Retrigger setting defines the behaviour of the program execution when program is executed while previous execution is still running (e.g. can happen when program is using delays). If Restart On Retrigger is true the previous task is terminated and the program is executed from the beginning. If Restart On Retrigger is false the trigger will be ignored and the previous task will execute without interruption.

Programs can be executed manually or with triggers. Each trigger contains an input value and triggering condition. Multiple triggering conditions can be entered in the Triggers list. Program is executed when any trigger condition is met.

Picture 1: Program task node

Triggers

Trigger contains an object value and triggering condition. Conditions can be value comparisons (=, <, <=, >=, >) or value changes (ValueChanged). Triggers can be edited in the trigger editor form.

Picture 2: Trigger form

Conditions for triggering are rechecked with each update of the object value. By default the trigger is only triggered the first time the condition is met. If the same condition is met on next value update (i.e. device sends the same value two times in succession) trigger is not triggered. Setting the Allow Retrigger option enables running the task even when the same condition is met repeatedly with each value update.

Commands

Several different commands can be used for implementing different logical operations and command sequences. Command are edited in the command tree editor.

Set value

Sets output value to a constant value or to the value of an object. Calculation function can also be assigned to variable (e.g. +1 will give your object increased value by 1).

Picture 3: Set value form

Run

Executes object function. Can be used to control different devices, start other tasks or execute different value options within the device or task.

Picture 4: Run form

If, Else

If Checks the condition where input property is compared to a constant value or to a value of an object. The settings of the if command can be edited in If editor form. Any combination of subcommands can be inserted below the If command. Subcommands are executed when conditions are met. Else is executed if conditions for If command were not met. Else can only be inserted after If command.

Picture 5: If form

Delay

Delays the program execution for a constant time or a delay defined by an input value linked to an object.

Picture 6: Delay form

Http request

Http Request Is used to execute commands on devices that support http API calls. Devices and other programs can be controlled with this command (i.e. XBMC, IP cameras, DVRs and other automation systems). Commands can be executed using Basic Authentication, Username and Password. Optionally the Username and Password settings can be injected into the URL string. If the POST Data is empty the call is executed using the HTTP GET command. If POST Data is filled the call is executed using HTTP POST command. Custom Headers (e.g. custom SOAP headers) and Content Type can be used with the call HTTP POST. Text strings for URL and POST Data can include value parameters. Parameters can be added by clicking on the "..." button.

Picture 7: Http request form

Exit

Exits the program execution. Exit can be used to terminate the program when certain condition is met (e.g. in an If command).

Restart

Restarts the program execution after a constant time or a delay defined by an input value linked to an object.

Abort Commands

Abort Commands are executed on program abort. Program is aborted when Running property is set to false or by calling the Abort() function. Program is also aborted on configuration restart when uploading the configuration. Commands are executed only if abort is called when program is still running. This can happen if a main program is waiting for some delay (Delay command is used).

User Interface

Enabled, Running and Blocked values can be inserted into themes via Boolean control. Run and Abort functions can be called via RunFunction control.

Examples

Download example from our Library: Program

Example 1: Send alert to user

  1. Add trigger.

  2. Select input object (e.g. DSC zone, KNX DPT, Analog Threshold).

  3. Select object value.

  4. Set condition to Equals.

  5. Set value to True.

  6. Add Run command.

  7. Select the node of the user you want to notify (select Users node if you want to notify all users).

  8. Select the SendAlert function.

  9. Insert text.

  10. To filter the sequential sending of the alert messages, make sure Restart On Retrigger option is not set. Optionally a delay command in the end of the program (i.e. block sending of messages for a certain period).

Example 2: Mode selection

  1. Add trigger.

  2. Select input object (e.g. Integer variable for mode selection).

  3. Select object value.

  4. Set condition to OnChange.

  5. Add If commands for each mode.

  6. Add commands (e.g. Run command calling a Scene) under If commands for each mode.

Example 3: Trigger a program with a KNX push button which sends only true values

  1. Add trigger.

  2. Select input object (KNX data point for push button)

  3. Select object value (value).

  4. Set condition to Equals.

  5. Set value to True.

  6. Check Allow Retrigger option (because button sends only true values).

  7. Add commands (e.g call Run() function from a Scene task)

Example 4: Pulse output

  1. Add trigger.

  2. Select input object (KNX data point)

  3. Select object value.

  4. Set condition to Equals.

  5. Set value to True.

  6. Add Delay command.

  7. Add Set Value command, which sets the input object back to false value.

This website uses cookies

We use cookies to personalize content, use live chat, provide social media features and to analyze our traffic. We also share information about your use of our site with analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.