Core API
HomeAutomation.HomeGenie Domain
Automation Module
HomeAutomation.HomeGenie/Automation
This module implements Automation Program Plugins related commands.
Macro.Record
Start capturing all commands received by HomeGenie into a new Wizard Script program that can be then saved and played back.
Syntax
/api/HomeAutomation.HomeGenie/Automation/Macro.Record
GET /api/HomeAutomation.HomeGenie/Automation/Macro.Record
Macro.GetDelay
Get current recording delay settings. Returned delay type can be either None, Mimic or Fixed.
See Macro.SetDelay for an explanation of these value types.
Syntax
/api/HomeAutomation.HomeGenie/Automation/Macro.GetDelay
GET /api/HomeAutomation.HomeGenie/Automation/Macro.GetDelay
Response
[{
DelayType : 'Fixed',
DelayOptions : '1'
}]
Macro.SetDelay
Change current recording delay settings. This will affect the pause that HomeGenie will put between each captured command in the recorded program.
Syntax
/api/HomeAutomation.HomeGenie/Automation/Macro.SetDelay/<delay_type>[/<delay_seconds>]
The <delay_type> can be one of the following:
- None
- No delay between commands
- Mimic
- Same delay as the live recording.
- Fixed
- Use a fixed delay, specified as seconds
GET /api/HomeAutomation.HomeGenie/Automation/Macro.SetDelay/Fixed/1.25
Macro.Save
Stop capturing commands and save the new Wizard Script program with the specified <program_name> name.
Syntax
/api/HomeAutomation.HomeGenie/Automation/Macro.Save/<program_name>
GET /api/HomeAutomation.HomeGenie/Automation/Macro.Save/Garage+Door+Open+Scenario
Macro.Discard
Stop capturing commands and discard the recording session.
Syntax
/api/HomeAutomation.HomeGenie/Automation/Macro.Discard
GET /api/HomeAutomation.HomeGenie/Automation/Macro.Discard
Programs.Run
Run the program with the specified <program_address> address.
Syntax
/api/HomeAutomation.HomeGenie/Automation/Programs.Run/<program_address>
GET /api/HomeAutomation.HomeGenie/Automation/Programs.Run/1000
Response Events
Program.Status
Programs.Break
Stop the program with the specified <program_address> address.
Syntax
/api/HomeAutomation.HomeGenie/Automation/Programs.Break/<program_address>
GET /api/HomeAutomation.HomeGenie/Automation/Programs.Break/1000
Response Events
Program.Status
Programs.Toggle
Run the program with the specified <program_address> address if it is currently stopped, or stop it if it's running.
Syntax
/api/HomeAutomation.HomeGenie/Automation/Programs.Toggle/<program_address>
GET /api/HomeAutomation.HomeGenie/Automation/Programs.Toggle/1000
Response Events
Program.Status
Programs.Restart
Stop and then restart the program with the specified <program_address> address.
Syntax
/api/HomeAutomation.HomeGenie/Automation/Programs.Restart/<program_address>
GET /api/HomeAutomation.HomeGenie/Automation/Programs.Restart/1000
Response Events
Program.Status
Programs.Enable
Enable then program with the specified <program_address> address.
Syntax
/api/HomeAutomation.HomeGenie/Automation/Programs.Enable/<program_address>
GET /api/HomeAutomation.HomeGenie/Automation/Programs.Enable/1000
Response Events
Program.Status
Programs.Disable
Disable then program with the specified <program_address> address.
Syntax
/api/HomeAutomation.HomeGenie/Automation/Programs.Disable/<program_address>
GET /api/HomeAutomation.HomeGenie/Automation/Programs.Disable/1000
Response Events
Program.Status
Programs.List
Get the list of all automation programs along with properties and source code.
Syntax
/api/HomeAutomation.HomeGenie/Automation/Programs.List
GET /api/HomeAutomation.HomeGenie/Automation/Programs.List
Response
[{
...
},{
"ConditionType":1,
"Conditions":[{
"Domain":"HomeAutomation.PhilipsHue",
"Target":"2",
"Property":"Status.Level",
"ComparisonOperator":1,"ComparisonValue":"0"
}],
"Commands":[{
"Domain":"HomeAutomation.PhilipsHue",
"Target":"1",
"CommandString":"Control.Toggle",
"CommandArguments":""
},{
"Domain":"HomeAutomation.HomeGenie",
"Target":"Automation",
"CommandString":"Program.Pause",
"CommandArguments":"0.5"
},{
"Domain":"HomeAutomation.HomeGenie",
"Target":"Automation",
"CommandString":"Program.Repeat",
"CommandArguments":"100"
}],
"ScriptCondition":" // trigger code for C#, Javascript, Python, Ruby program types",
"ScriptSource":" // program code for C#, Javascript, Python, Ruby program types",
"ScriptErrors":"",
"IsRunning":false,
"Features":[], // implemented program feature list
"Domain":"HomeAutomation.HomeGenie.Automation",
"Address":1000,
"Name":"Light 1 blink",
"Description":"Make Light 1 blink when Light 2 is turned on.",
"Group":"Lights",
"ActivationTime":"2014-04-11T18:48:56.637857Z", // UTC Timestamp
"TriggerTime":"2014-04-11T18:48:56.641858Z", // UTC Timestamp
"Type":"Wizard",
"IsEnabled":true
},{
...
}]