ManagerFlow

Access this instance at HomeyAPIV2.flow.

Extends

Classes

Instance Properties

homey

homey: HomeyAPIV3

The Homey of the Manager.

Type

uri

uri: String

The URI of the Item, e.g. homey:manager:bar.

Type

  • String

Instance Methods

addListener

addListener(event, callback)

Parameters

Name Type Description
event
string
callback
function

connect

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

Connect to this manager's Socket.io namespace.

Returns

Promise.<void>

createAdvancedFlow

(async) createAdvancedFlow(opts): Promise.<HomeyAPIV2.ManagerFlow.AdvancedFlow>

Scopes

homey.flow

HTTP

POST /api/manager/flow/advancedflow

Parameters

Name Type Description
opts
object
advancedflow
*
}

Returns

createFlow

(async) createFlow(opts): Promise.<HomeyAPIV2.ManagerFlow.Flow>

Scopes

homey.flow

HTTP

POST /api/manager/flow/flow

Parameters

Name Type Description
opts
object
flow
*
}

Returns

createFlowFolder

(async) createFlowFolder(opts): Promise.<HomeyAPIV2.ManagerFlow.FlowFolder>

Scopes

homey.flow

HTTP

POST /api/manager/flow/flowfolder

Parameters

Name Type Description
opts
object
flowfolder
*
}

Returns

deleteAdvancedFlow

(async) deleteAdvancedFlow(opts)

Scopes

homey.flow

HTTP

DELETE /api/manager/flow/advancedflow/:id

Parameters

Name Type Description
opts
object
id
string
}

deleteFlow

(async) deleteFlow(opts)

Scopes

homey.flow

HTTP

DELETE /api/manager/flow/flow/:id

Parameters

Name Type Description
opts
object
id
string
}

deleteFlowFolder

(async) deleteFlowFolder(opts)

Scopes

homey.flow

HTTP

DELETE /api/manager/flow/flowfolder/:id

Parameters

Name Type Description
opts
object
id
string
}

destroy

destroy()

Destroy this Manager by cleaning up all references, unbinding event listeners and disconnecting from the Socket.io namespace.

disconnect

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

Disconnect from this manager's Socket.io namespace.

Returns

Promise.<void>

emit

emit(event, …data)

Parameters

Name Type Description
event
string
data
any <repeatable>

getAdvancedFlow

(async) getAdvancedFlow(opts): Promise.<HomeyAPIV2.ManagerFlow.AdvancedFlow>

Scopes

homey.flow.readonly

HTTP

GET /api/manager/flow/advancedflow/:id

Parameters

Name Type Description
opts
object
id
string
}

Returns

getAdvancedFlows

(async) getAdvancedFlows(): Promise.<Object.<string, HomeyAPIV2.ManagerFlow.AdvancedFlow>>

Scopes

homey.flow.readonly

HTTP

GET /api/manager/flow/advancedflow

Returns

Promise.<Object.<string, HomeyAPIV2.ManagerFlow.AdvancedFlow>>

getFlow

(async) getFlow(opts): Promise.<HomeyAPIV2.ManagerFlow.Flow>

Scopes

homey.flow.readonly

HTTP

GET /api/manager/flow/flow/:id

Parameters

Name Type Description
opts
object
id
string
}

Returns

getFlowCardAction

(async) getFlowCardAction(opts): Promise.<HomeyAPIV2.ManagerFlow.FlowCardAction>

Scopes

homey.flow.readonly

HTTP

GET /api/manager/flow/flowcardaction/:uri/:id

Parameters

Name Type Description
opts
object
id
string
uri
string
}

Returns

getFlowCardActions

(async) getFlowCardActions(): Promise.<Object.<string, HomeyAPIV2.ManagerFlow.FlowCardAction>>

Scopes

homey.flow.readonly

HTTP

GET /api/manager/flow/flowcardaction

Returns

Promise.<Object.<string, HomeyAPIV2.ManagerFlow.FlowCardAction>>

getFlowCardAutocomplete

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

Scopes

homey.flow.readonly

HTTP

GET /api/manager/flow/:type/:uri/:id/autocomplete

Parameters

Name Type Description
opts
object
id
string
uri
string
type
string
args
string <optional>
query
string
name
string
}

Returns

Promise.<any>

getFlowCardCondition

(async) getFlowCardCondition(opts): Promise.<HomeyAPIV2.ManagerFlow.FlowCardCondition>

Scopes

homey.flow.readonly

HTTP

GET /api/manager/flow/flowcardcondition/:uri/:id

Parameters

Name Type Description
opts
object
id
string
uri
string
}

Returns

getFlowCardConditions

(async) getFlowCardConditions(): Promise.<Object.<string, HomeyAPIV2.ManagerFlow.FlowCardCondition>>

Scopes

homey.flow.readonly

HTTP

GET /api/manager/flow/flowcardcondition

Returns

Promise.<Object.<string, HomeyAPIV2.ManagerFlow.FlowCardCondition>>

getFlowCardTrigger

(async) getFlowCardTrigger(opts): Promise.<HomeyAPIV2.ManagerFlow.FlowCardTrigger>

Scopes

homey.flow.readonly

HTTP

GET /api/manager/flow/flowcardtrigger/:uri/:id

Parameters

Name Type Description
opts
object
id
string
uri
string
}

Returns

getFlowCardTriggers

(async) getFlowCardTriggers(): Promise.<Object.<string, HomeyAPIV2.ManagerFlow.FlowCardTrigger>>

Scopes

homey.flow.readonly

HTTP

GET /api/manager/flow/flowcardtrigger

Returns

Promise.<Object.<string, HomeyAPIV2.ManagerFlow.FlowCardTrigger>>

getFlowFolder

(async) getFlowFolder(opts): Promise.<HomeyAPIV2.ManagerFlow.FlowFolder>

Scopes

homey.flow.readonly

HTTP

GET /api/manager/flow/flowfolder/:id

Parameters

Name Type Description
opts
object
id
string
}

Returns

getFlowFolders

(async) getFlowFolders(): Promise.<Object.<string, HomeyAPIV2.ManagerFlow.FlowFolder>>

Scopes

homey.flow.readonly

HTTP

GET /api/manager/flow/flowfolder

Returns

Promise.<Object.<string, HomeyAPIV2.ManagerFlow.FlowFolder>>

getFlows

(async) getFlows(): Promise.<Object.<string, HomeyAPIV2.ManagerFlow.Flow>>

Scopes

homey.flow.readonly

HTTP

GET /api/manager/flow/flow

Returns

Promise.<Object.<string, HomeyAPIV2.ManagerFlow.Flow>>

isConnected

isConnected(): Boolean

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

Returns

Boolean

off

off(event, callback)

Parameters

Name Type Description
event
string
callback
function

on

on(event, callback)

Parameters

Name Type Description
event
string
callback
function

once

once(event, callback)

Parameters

Name Type Description
event
string
callback
function

removeAllListeners

removeAllListeners(eventopt)

Parameters

Name Type Description
event
string <optional>

removeListener

removeListener(event, callback)

Shortcut to EventEmitter#off

Parameters

Name Type Description
event
string
callback
function

runFlowCardAction

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

Scopes

homey.flow

HTTP

POST /api/manager/flow/flowcardaction/:uri/:id/run

Parameters

Name Type Description
opts
object
id
string
uri
string
duration
number <optional>
state
object <optional>
tokens
object <optional>
droptoken
string <optional>
args
object <optional>
}

Returns

Promise.<any>

runFlowCardCondition

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

Scopes

homey.flow

HTTP

POST /api/manager/flow/flowcardcondition/:uri/:id/run

Parameters

Name Type Description
opts
object
id
string
uri
string
state
object <optional>
tokens
object <optional>
droptoken
string <optional>
args
object <optional>
}

Returns

Promise.<any>

shareFlow

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

Scopes

homey.flow.readonly

HTTP

POST /api/manager/flow/flow/:id/share

Parameters

Name Type Description
opts
object
id
string
}

Returns

Promise.<any>

testFlow

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

Scopes

homey.flow

HTTP

POST /api/manager/flow/flow/test

Parameters

Name Type Description
opts
object
sessionId
string <optional>
tokens
object
flow
*
}

Returns

Promise.<any>

triggerAdvancedFlow

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

Scopes

homey.flow.start

HTTP

POST /api/manager/flow/advancedflow/:id/trigger

Parameters

Name Type Description
opts
object
id
string
state
* <optional>
}

Returns

Promise.<any>

triggerFlow

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

Scopes

homey.flow.start

HTTP

POST /api/manager/flow/flow/:id/trigger

Parameters

Name Type Description
opts
object
id
string
state
* <optional>
}

Returns

Promise.<any>

updateAdvancedFlow

(async) updateAdvancedFlow(opts): Promise.<HomeyAPIV2.ManagerFlow.AdvancedFlow>

Scopes

homey.flow

HTTP

PUT /api/manager/flow/advancedflow/:id

Parameters

Name Type Description
opts
object
id
string
advancedflow
*
}

Returns

updateFlow

(async) updateFlow(opts): Promise.<HomeyAPIV2.ManagerFlow.Flow>

Scopes

homey.flow

HTTP

PUT /api/manager/flow/flow/:id

Parameters

Name Type Description
opts
object
id
string
flow
*
}

Returns

updateFlowFolder

(async) updateFlowFolder(opts): Promise.<HomeyAPIV2.ManagerFlow.FlowFolder>

Scopes

homey.flow

HTTP

PUT /api/manager/flow/flowfolder/:id

Parameters

Name Type Description
opts
object
id
string
flowfolder
*
}

Returns

Events

advancedflow.create

.on('advancedflow.create')

Parameters

Name Type Description
advancedflow
HomeyAPIV2.ManagerFlow.AdvancedFlow

advancedflow.delete

.on('advancedflow.delete')

Parameters

Name Type Description
advancedflow
HomeyAPIV2.ManagerFlow.AdvancedFlow

advancedflow.update

.on('advancedflow.update')

Parameters

Name Type Description
advancedflow
HomeyAPIV2.ManagerFlow.AdvancedFlow

flow.create

.on('flow.create')

Parameters

Name Type Description
flow
HomeyAPIV2.ManagerFlow.Flow

flow.delete

.on('flow.delete')

Parameters

Name Type Description
flow
HomeyAPIV2.ManagerFlow.Flow

flow.update

.on('flow.update')

Parameters

Name Type Description
flow
HomeyAPIV2.ManagerFlow.Flow

flowcardaction.create

.on('flowcardaction.create')

Parameters

Name Type Description
flowcardaction
HomeyAPIV2.ManagerFlow.FlowCardAction

flowcardaction.delete

.on('flowcardaction.delete')

Parameters

Name Type Description
flowcardaction
HomeyAPIV2.ManagerFlow.FlowCardAction

flowcardaction.update

.on('flowcardaction.update')

Parameters

Name Type Description
flowcardaction
HomeyAPIV2.ManagerFlow.FlowCardAction

flowcardcondition.create

.on('flowcardcondition.create')

Parameters

Name Type Description
flowcardcondition
HomeyAPIV2.ManagerFlow.FlowCardCondition

flowcardcondition.delete

.on('flowcardcondition.delete')

Parameters

Name Type Description
flowcardcondition
HomeyAPIV2.ManagerFlow.FlowCardCondition

flowcardcondition.update

.on('flowcardcondition.update')

Parameters

Name Type Description
flowcardcondition
HomeyAPIV2.ManagerFlow.FlowCardCondition

flowcardtrigger.create

.on('flowcardtrigger.create')

Parameters

Name Type Description
flowcardtrigger
HomeyAPIV2.ManagerFlow.FlowCardTrigger

flowcardtrigger.delete

.on('flowcardtrigger.delete')

Parameters

Name Type Description
flowcardtrigger
HomeyAPIV2.ManagerFlow.FlowCardTrigger

flowcardtrigger.update

.on('flowcardtrigger.update')

Parameters

Name Type Description
flowcardtrigger
HomeyAPIV2.ManagerFlow.FlowCardTrigger

flowfolder.create

.on('flowfolder.create')

Parameters

Name Type Description
flowfolder
HomeyAPIV2.ManagerFlow.FlowFolder

flowfolder.delete

.on('flowfolder.delete')

Parameters

Name Type Description
flowfolder
HomeyAPIV2.ManagerFlow.FlowFolder

flowfolder.update

.on('flowfolder.update')

Parameters

Name Type Description
flowfolder
HomeyAPIV2.ManagerFlow.FlowFolder