Access this instance at HomeyAPIV2.backup
.
Extends
Instance Properties
homey
homey: HomeyAPIV3uri
uri: StringThe 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
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
emit
emit(event, …data)Parameters
Name | Type | Description |
---|---|---|
event
|
string | |
data
|
any
<repeatable> |
getOptionAutomaticBackupsEnabled
(async) getOptionAutomaticBackupsEnabled(): Promise.<any>Scopes
SYSTEM
HTTP
GET /api/manager/backup/option/automaticBackupsEnabled
Returns
getOptionLastSuccessfulBackup
(async) getOptionLastSuccessfulBackup(): Promise.<any>Scopes
SYSTEM
HTTP
GET /api/manager/backup/option/lastSuccessfulBackup
Returns
getState
(async) getState(): Promise.<any>Scopes
SYSTEM_READONLY
HTTP
GET /api/manager/backup/state
Returns
isConnected
isConnected(): BooleanIf this manager's namespace is connected to Socket.io.
Returns
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 |
scheduleBackup
(async) scheduleBackup(): Promise.<any>Scopes
homey.system
HTTP
POST /api/manager/backup/backup/
Returns
setOptionAutomaticBackupsEnabled
(async) setOptionAutomaticBackupsEnabled(opts): Promise.<any>Scopes
SYSTEM
HTTP
PUT /api/manager/backup/option/automaticBackupsEnabled
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
value
|
boolean | |
|
Returns
setOptionLastSuccessfulBackup
(async) setOptionLastSuccessfulBackup(opts): Promise.<any>Scopes
-
HTTP
PUT /api/manager/backup/option/lastSuccessfulBackup
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
value
|
string | |
|
Returns
unsetOptionAutomaticBackupsEnabled
(async) unsetOptionAutomaticBackupsEnabled(): Promise.<any>Scopes
SYSTEM
HTTP
DELETE /api/manager/backup/option/automaticBackupsEnabled
Returns
unsetOptionLastSuccessfulBackup
(async) unsetOptionLastSuccessfulBackup(): Promise.<any>Scopes
-
HTTP
DELETE /api/manager/backup/option/lastSuccessfulBackup