ManagerLogic

Extends

Classes

Methods

connect

(async) connect(): Promise.<void>

Connect to the realtime namespace.

Returns

Promise.<void>

createVariable

(async) createVariable(opts): Promise.<HomeyAPIV2.ManagerLogic.Variable>

Scopes

homey.logic

HTTP

POST /api/manager/logic/variable/

Parameters

Name Type Description
opts
object
variable
*
}

Returns

deleteVariable

(async) deleteVariable(opts)

Scopes

homey.logic

HTTP

DELETE /api/manager/logic/variable/:id

Parameters

Name Type Description
opts
object
id
string
}

disconnect

(async) disconnect(): Promise.<void>

Disconnect from the realtime namespace.

Returns

Promise.<void>

getVariable

(async) getVariable(opts): Promise.<HomeyAPIV2.ManagerLogic.Variable>

Scopes

homey.logic.readonly

HTTP

GET /api/manager/logic/variable/:id

Parameters

Name Type Description
opts
object
id
string
}

Returns

getVariables

(async) getVariables(): Promise.<HomeyAPIV2.ManagerLogic.Variable>

Scopes

homey.logic.readonly

HTTP

GET /api/manager/logic/variable

Returns

isConnected

isConnected(): Boolean

If this manager's namespace is connected to Socket.io.

Returns

Boolean

triggerWebhook

(async) triggerWebhook(opts): Promise.<any>

Scopes

-

HTTP

GET /api/manager/logic/webhook/:event

Parameters

Name Type Description
opts
object
event
string <optional>
tag
string <optional>
}

Returns

Promise.<any>

updateVariable

(async) updateVariable(opts): Promise.<HomeyAPIV2.ManagerLogic.Variable>

Scopes

homey.logic

HTTP

PUT /api/manager/logic/variable/:id

Parameters

Name Type Description
opts
object
id
string
variable
*
}

Returns

Events

variable.create

.on('variable.create')

Parameters

Name Type Description
variable
HomeyAPIV2.ManagerLogic.Variable

variable.delete

.on('variable.delete')

Parameters

Name Type Description
variable
HomeyAPIV2.ManagerLogic.Variable

variable.update

.on('variable.update')

Parameters

Name Type Description
variable
HomeyAPIV2.ManagerLogic.Variable