Helper Class Reference  1.4
HomeGenie - Automation Programs API
Public Member Functions | Properties | List of all members
ProgramHelperBase Class Reference

Program Helper Base class.
Class instance accessor: Program More...

Inheritance diagram for ProgramHelperBase:
ProgramHelper

Public Member Functions

ProgramHelperBase Say (string sentence, string locale=null, bool goAsync=false)
 Playbacks a synthesized voice message from speaker. More...
 
ProgramHelperBase Play (string waveUrl)
 Playbacks a wave file. More...
 
Thread RunAsyncTask (Utility.AsyncFunction functionBlock)
 Executes a function asynchronously. More...
 
void Run (string programId, string options=null)
 Executes the specified Automation Program. More...
 
ProgramHelperBase WaitFor (string programId)
 Waits for the given program to complete execution. More...
 
ProgramHelper WithAddress (int programAddress)
 Returns a reference to the ProgramHelper of a program. More...
 
ProgramHelper WithName (string programName)
 Returns a reference to the ProgramHelper of a program. More...
 

Properties

NLog.Logger Log [get]
 Gets the logger object. More...
 

Detailed Description

Program Helper Base class.
Class instance accessor: Program

Member Function Documentation

◆ Say()

ProgramHelperBase Say ( string  sentence,
string  locale = null,
bool  goAsync = false 
)

Playbacks a synthesized voice message from speaker.

Parameters
sentenceMessage to output.
localeLanguage locale string (eg. "en-US", "it-IT", "en-GB", "nl-NL",...). (optional)
goAsyncIf true, the command will be executed asynchronously. (optional, default = false)

Example:

Program.Say("The garage door has been opened", "en-US");

◆ Play()

ProgramHelperBase Play ( string  waveUrl)

Playbacks a wave file.

Parameters
waveUrlURL of the audio wave file to play.

◆ RunAsyncTask()

Thread RunAsyncTask ( Utility.AsyncFunction  functionBlock)

Executes a function asynchronously.

Returns
The Thread object of this asynchronous task.
Parameters
functionBlockFunction name or inline delegate.

◆ Run()

void Run ( string  programId,
string  options = null 
)

Executes the specified Automation Program.

Parameters
programIdProgram name or ID.
optionsProgram options. (optional)

◆ WaitFor()

ProgramHelperBase WaitFor ( string  programId)

Waits for the given program to complete execution.

Returns
ProgramHelper.
Parameters
programIdProgram address or name.

◆ WithAddress()

ProgramHelper WithAddress ( int  programAddress)

Returns a reference to the ProgramHelper of a program.

Returns
ProgramHelper.
Parameters
programAddressProgram address (id).

◆ WithName()

ProgramHelper WithName ( string  programName)

Returns a reference to the ProgramHelper of a program.

Returns
ProgramHelper.
Parameters
programNameProgram name.

Property Documentation

◆ Log

NLog.Logger Log
get

Gets the logger object.

The logger object.


The documentation for this class was generated from the following file: