Actions
Framework
getGuiSettings
getGuiSettings() -> guiSettings : object
Get the GUI config options
Result
-
guiSettings
(object)
-
config
(object)
-
defaults
(object)
HTTP-Request
GET /api/config/settings/gui
guiSettings
(object)
-
config
(object) -
defaults
(object)
restart
restart() -> void :
Restart pimatic
Result
-
void
HTTP-Request
POST /api/restart
void
getConfig
getConfig([password : string]) -> config : object
Get the config, fields will be blank if no password was provided
Parameters
-
password
(string, optional)
Result
-
config
(object)
: The config
HTTP-Request
GET /api/config
password
(string, optional)
-
config
(object) : The config
HTTP-Request
GET /api/config
updateConfig
updateConfig(config : object)undefined
Update the config
Parameters
-
config
(object)
HTTP-Request
POST /api/config
config
(object)
Rules
addRuleByString
addRuleByString(ruleId : string, rule : object, [force : boolean])undefined
Add a rule by a string
Parameters
-
ruleId
(string)
-
rule
(object)
-
name
(string)
-
ruleString
(string)
-
active
(boolean, optional)
-
logging
(boolean, optional)
-
force
(boolean, optional)
HTTP-Request
POST /api/rules/:ruleId
ruleId
(string)
rule
(object)
-
name
(string) -
ruleString
(string) -
active
(boolean, optional) -
logging
(boolean, optional)
force
(boolean, optional)
updateRuleByString
updateRuleByString(ruleId : string, rule : object)undefined
Update a rule by a string
Parameters
-
ruleId
(string)
-
rule
(object)
-
name
(string, optional)
-
ruleString
(string, optional)
-
active
(boolean, optional)
-
logging
(boolean, optional)
HTTP-Request
PATCH /api/rules/:ruleId
ruleId
(string)
rule
(object)
-
name
(string, optional) -
ruleString
(string, optional) -
active
(boolean, optional) -
logging
(boolean, optional)
removeRule
removeRule(ruleId : string)undefined
Remove the rule with the given ID
Parameters
-
ruleId
(string)
HTTP-Request
DELETE /api/rules/:ruleId
ruleId
(string)
getRules
getRules() -> rules : array
List all rules
Result
-
rules
(array)
HTTP-Request
GET /api/rules
rules
(array)
getRuleById
getRuleById(ruleId : string) -> rule : object
List all rules
Parameters
-
ruleId
(string)
Result
-
rule
(object)
HTTP-Request
GET /api/rules/:ruleId
ruleId
(string)
-
rule
(object)
HTTP-Request
GET /api/rules/:ruleId
getRuleActionsHints
getRuleActionsHints(actionsInput : string) -> hints : object
Get hints for the rule actions input field
Parameters
-
actionsInput
(string)
Result
-
hints
(object)
-
actions
(array)
-
tokens
(array)
-
autocomplete
(array)
-
errors
(array)
-
warnings
(array)
-
format
(array)
HTTP-Request
POST /api/rules-parser/get-actions-hints
actionsInput
(string)
-
hints
(object)-
actions
(array) -
tokens
(array) -
autocomplete
(array) -
errors
(array) -
warnings
(array) -
format
(array)
-
HTTP-Request
POST /api/rules-parser/get-actions-hints
getRuleConditionHints
getRuleConditionHints(conditionInput : string) -> hints : object
Get hints for the rule condition input field
Parameters
-
conditionInput
(string)
Result
-
hints
(object)
-
predicates
(array)
-
tokens
(array)
-
autocomplete
(array)
-
errors
(array)
-
warnings
(array)
-
format
(array)
HTTP-Request
POST /api/rules-parser/get-condition-hints
conditionInput
(string)
-
hints
(object)-
predicates
(array) -
tokens
(array) -
autocomplete
(array) -
errors
(array) -
warnings
(array) -
format
(array)
-
HTTP-Request
POST /api/rules-parser/get-condition-hints
getPredicatePresets
getPredicatePresets() -> presets : array
Get predicates the user can choose from
Result
-
presets
(array)
HTTP-Request
GET /api/rules-parser/get-predicate-presets
presets
(array)
getPredicateInfo
getPredicateInfo(input : string, [predicateProviderClass : string]) -> result : array
Get predicates info
Parameters
-
input
(string)
-
predicateProviderClass
(string, optional)
Result
-
result
(array)
HTTP-Request
GET /api/rules-parser/get-predicate-info
input
(string)
predicateProviderClass
(string, optional)
-
result
(array)
HTTP-Request
GET /api/rules-parser/get-predicate-info
executeAction
executeAction(actionString : string, [simulate : boolean], [logging : string]) -> message : string
Execute a rule action by a given string
Parameters
-
actionString
(string)
: The action to execute
-
simulate
(boolean, optional)
: If it is true then only simulate the action.
-
logging
(string, optional)
: Log result message
Result
-
message
(string)
HTTP-Request
POST /api/execute-action
actionString
(string)
: The action to execute
simulate
(boolean, optional)
: If it is true then only simulate the action.
logging
(string, optional)
: Log result message
-
message
(string)
HTTP-Request
POST /api/execute-action
updateRuleOrder
updateRuleOrder(ruleOrder : array) -> ruleOrder : array
Update the order of all rules
Parameters
-
ruleOrder
(array)
Result
-
ruleOrder
(array)
HTTP-Request
POST /api/rules
ruleOrder
(array)
-
ruleOrder
(array)
HTTP-Request
POST /api/rules
Variables
getVariables
getVariables() -> variables : array
List all variables
Result
-
variables
(array)
HTTP-Request
GET /api/variables
variables
(array)
updateVariable
updateVariable(name : string, type : string, valueOrExpression : string, [unit : string]) -> variable : object
Update a variable value or expression
Parameters
-
name
(string)
-
type
(string)
-
valueOrExpression
(string)
-
unit
(string, optional)
Result
-
variable
(object)
HTTP-Request
PATCH /api/variables/:name
name
(string)
type
(string)
valueOrExpression
(string)
unit
(string, optional)
-
variable
(object)
HTTP-Request
PATCH /api/variables/:name
addVariable
addVariable(name : string, type : string, valueOrExpression : string, [unit : string]) -> variable : object
Add a value or expression variable
Parameters
-
name
(string)
-
type
(string)
-
valueOrExpression
(string)
-
unit
(string, optional)
Result
-
variable
(object)
HTTP-Request
POST /api/variables/:name
name
(string)
type
(string)
valueOrExpression
(string)
unit
(string, optional)
-
variable
(object)
HTTP-Request
POST /api/variables/:name
getVariableByName
getVariableByName(name : string) -> variable : object
Get infos about a variable
Parameters
-
name
(string)
Result
-
variable
(object)
HTTP-Request
GET /api/variables/:name
name
(string)
-
variable
(object)
HTTP-Request
GET /api/variables/:name
removeVariable
removeVariable(name : string) -> variable : object
Remove a variable
Parameters
-
name
(string)
Result
-
variable
(object)
HTTP-Request
DELETE /api/variables/:name
name
(string)
-
variable
(object)
HTTP-Request
DELETE /api/variables/:name
updateVariableOrder
updateVariableOrder(variableOrder : array) -> variableOrder : array
Update the order of all variables
Parameters
-
variableOrder
(array)
Result
-
variableOrder
(array)
HTTP-Request
POST /api/variables
variableOrder
(array)
-
variableOrder
(array)
HTTP-Request
POST /api/variables
Devices
getDevices
getDevices() -> devices : array
List all devices.
Result
-
devices
(array)
: Array of all devices.
-
device
(object)
-
id
(string)
: A user chosen string, used to identify that device.
-
name
(string)
: A user chosen string that should be used to display the device.
-
template
(string)
: Name of the template, that should be used to display the device.
-
attributes
(array)
: List of all attributes of the device.
-
actions
(array)
: List of all actions of the device.
-
config
(object)
: Config of the device, without default values.
-
configDefaults
(object)
: Default values for the config options.
HTTP-Request
GET /api/devices
devices
(array)
: Array of all devices.
-
device
(object)-
id
(string) : A user chosen string, used to identify that device. -
name
(string) : A user chosen string that should be used to display the device. -
template
(string) : Name of the template, that should be used to display the device. -
attributes
(array) : List of all attributes of the device. -
actions
(array) : List of all actions of the device. -
config
(object) : Config of the device, without default values. -
configDefaults
(object) : Default values for the config options.
-
getDeviceById
getDeviceById(deviceId : string) -> device : object
Retrieve a device by a given ID.
Parameters
-
deviceId
(string)
: The ID of the device that should be returned.
Result
-
device
(object)
: The requested device or null if the device was not found.
-
id
(string)
: A user chosen string, used to identify that device.
-
name
(string)
: A user chosen string that should be used to display the device.
-
template
(string)
: Name of the template, that should be used to display the device.
-
attributes
(array)
: List of all attributes of the device.
-
actions
(array)
: List of all actions of the device.
-
config
(object)
: Config of the device, without default values.
-
configDefaults
(object)
: Default values for the config options.
HTTP-Request
GET /api/devices/:deviceId
deviceId
(string)
: The ID of the device that should be returned.
-
device
(object) : The requested device or null if the device was not found.-
id
(string) : A user chosen string, used to identify that device. -
name
(string) : A user chosen string that should be used to display the device. -
template
(string) : Name of the template, that should be used to display the device. -
attributes
(array) : List of all attributes of the device. -
actions
(array) : List of all actions of the device. -
config
(object) : Config of the device, without default values. -
configDefaults
(object) : Default values for the config options.
-
HTTP-Request
GET /api/devices/:deviceId
updateDeviceOrder
updateDeviceOrder(deviceOrder : array) -> deviceOrder : array
Update the order of all devices
Parameters
-
deviceOrder
(array)
Result
-
deviceOrder
(array)
HTTP-Request
POST /api/devices
deviceOrder
(array)
-
deviceOrder
(array)
HTTP-Request
POST /api/devices
getDeviceClasses
getDeviceClasses() -> deviceClasses : array
List all registered device classes.
Result
-
deviceClasses
(array)
HTTP-Request
GET /api/device-class
deviceClasses
(array)
getDeviceConfigSchema
getDeviceConfigSchema(className : string) -> configSchema : object
Get the config schema of a device class.
Parameters
-
className
(string)
Result
-
configSchema
(object)
HTTP-Request
GET /api/device-class/:className
className
(string)
-
configSchema
(object)
HTTP-Request
GET /api/device-class/:className
addDeviceByConfig
addDeviceByConfig(deviceConfig : object) -> device : object
Add a device by config values
Parameters
-
deviceConfig
(object)
Result
-
device
(object)
-
id
(string)
: A user chosen string, used to identify that device.
-
name
(string)
: A user chosen string that should be used to display the device.
-
template
(string)
: Name of the template, that should be used to display the device.
-
attributes
(array)
: List of all attributes of the device.
-
actions
(array)
: List of all actions of the device.
-
config
(object)
: Config of the device, without default values.
-
configDefaults
(object)
: Default values for the config options.
HTTP-Request
POST /api/device-config
deviceConfig
(object)
-
device
(object)-
id
(string) : A user chosen string, used to identify that device. -
name
(string) : A user chosen string that should be used to display the device. -
template
(string) : Name of the template, that should be used to display the device. -
attributes
(array) : List of all attributes of the device. -
actions
(array) : List of all actions of the device. -
config
(object) : Config of the device, without default values. -
configDefaults
(object) : Default values for the config options.
-
HTTP-Request
POST /api/device-config
updateDeviceByConfig
updateDeviceByConfig(deviceConfig : object) -> device : object
Update a device by config values
Parameters
-
deviceConfig
(object)
Result
-
device
(object)
-
id
(string)
: A user chosen string, used to identify that device.
-
name
(string)
: A user chosen string that should be used to display the device.
-
template
(string)
: Name of the template, that should be used to display the device.
-
attributes
(array)
: List of all attributes of the device.
-
actions
(array)
: List of all actions of the device.
-
config
(object)
: Config of the device, without default values.
-
configDefaults
(object)
: Default values for the config options.
HTTP-Request
PATCH /api/device-config
deviceConfig
(object)
-
device
(object)-
id
(string) : A user chosen string, used to identify that device. -
name
(string) : A user chosen string that should be used to display the device. -
template
(string) : Name of the template, that should be used to display the device. -
attributes
(array) : List of all attributes of the device. -
actions
(array) : List of all actions of the device. -
config
(object) : Config of the device, without default values. -
configDefaults
(object) : Default values for the config options.
-
HTTP-Request
PATCH /api/device-config
removeDevice
removeDevice(deviceId : string) -> device : object
Remove a device from the framework an config
Parameters
-
deviceId
(string)
Result
-
device
(object)
-
id
(string)
: A user chosen string, used to identify that device.
-
name
(string)
: A user chosen string that should be used to display the device.
-
template
(string)
: Name of the template, that should be used to display the device.
-
attributes
(array)
: List of all attributes of the device.
-
actions
(array)
: List of all actions of the device.
-
config
(object)
: Config of the device, without default values.
-
configDefaults
(object)
: Default values for the config options.
HTTP-Request
DELETE /api/device-config/:deviceId
deviceId
(string)
-
device
(object)-
id
(string) : A user chosen string, used to identify that device. -
name
(string) : A user chosen string that should be used to display the device. -
template
(string) : Name of the template, that should be used to display the device. -
attributes
(array) : List of all attributes of the device. -
actions
(array) : List of all actions of the device. -
config
(object) : Config of the device, without default values. -
configDefaults
(object) : Default values for the config options.
-
HTTP-Request
DELETE /api/device-config/:deviceId
callDeviceAction
callDeviceAction(deviceId : string, actionName : string)undefined
Calls the action of the given device
Parameters
-
deviceId
(string)
-
actionName
(string)
HTTP-Request
GET /api/device/:deviceId/:actionName
deviceId
(string)
actionName
(string)
Groups
getGroups
getGroups() -> groups : array
List all groups.
Result
-
groups
(array)
-
group
(object)
HTTP-Request
GET /api/groups
groups
(array)
-
group
(object)
removeGroup
removeGroup(groupId : string) -> removed : object
Remove group
Parameters
-
groupId
(string)
Result
-
removed
(object)
HTTP-Request
DELETE /api/groups/:groupId
groupId
(string)
-
removed
(object)
HTTP-Request
DELETE /api/groups/:groupId
addGroup
addGroup(groupId : string, group : object) -> group : object
Add a group
Parameters
-
groupId
(string)
-
group
(object)
Result
-
group
(object)
HTTP-Request
POST /api/groups/:groupId
groupId
(string)
group
(object)
-
group
(object)
HTTP-Request
POST /api/groups/:groupId
updateGroup
updateGroup(groupId : string, group : object) -> group : object
Update a group
Parameters
-
groupId
(string)
-
group
(object)
-
name
(optional)
-
devicesOrder
(array, optional)
-
variablesOrder
(array, optional)
-
rulesOrder
(array, optional)
Result
-
group
(object)
HTTP-Request
PATCH /api/groups/:groupId
groupId
(string)
group
(object)
-
name
(optional) -
devicesOrder
(array, optional) -
variablesOrder
(array, optional) -
rulesOrder
(array, optional)
-
group
(object)
HTTP-Request
PATCH /api/groups/:groupId
addDeviceToGroup
addDeviceToGroup(groupId : string, deviceId : string) -> deviceItem : object
Add a device to a group
Parameters
-
groupId
(string)
-
deviceId
(string)
Result
-
deviceItem
(object)
HTTP-Request
POST /api/groups/:groupId/devices/:deviceId
groupId
(string)
deviceId
(string)
-
deviceItem
(object)
HTTP-Request
POST /api/groups/:groupId/devices/:deviceId
removeDeviceFromGroup
removeDeviceFromGroup(groupId : string, deviceId : string) -> group : object
Remove a device from a group
Parameters
-
groupId
(string)
-
deviceId
(string)
Result
-
group
(object)
HTTP-Request
DELETE /api/groups/:groupId/devices/:deviceId
groupId
(string)
deviceId
(string)
-
group
(object)
HTTP-Request
DELETE /api/groups/:groupId/devices/:deviceId
addRuleToGroup
addRuleToGroup(groupId : string, ruleId : string, [position : number]) -> group : object
Add a rule to a group
Parameters
-
groupId
(string)
-
ruleId
(string)
-
position
(number, optional)
Result
-
group
(object)
HTTP-Request
POST /api/groups/:groupId/rules/:ruleId
groupId
(string)
ruleId
(string)
position
(number, optional)
-
group
(object)
HTTP-Request
POST /api/groups/:groupId/rules/:ruleId
removeRuleFromGroup
removeRuleFromGroup(groupId : string, ruleId : string) -> group : object
Remove a rule from a group
Parameters
-
groupId
(string)
-
ruleId
(string)
Result
-
group
(object)
HTTP-Request
DELETE /api/groups/:groupId/rules/:ruleId
groupId
(string)
ruleId
(string)
-
group
(object)
HTTP-Request
DELETE /api/groups/:groupId/rules/:ruleId
updateRuleGroupOrder
updateRuleGroupOrder(groupId : string, ruleOrder : array) -> group : object
Add a rule to a group
Parameters
-
groupId
(string)
-
ruleOrder
(array)
Result
-
group
(object)
HTTP-Request
POST /api/groups/:groupId/rules
groupId
(string)
ruleOrder
(array)
-
group
(object)
HTTP-Request
POST /api/groups/:groupId/rules
addVariableToGroup
addVariableToGroup(groupId : string, variableName : string, [position : number]) -> group : object
Add a variable to a group
Parameters
-
groupId
(string)
-
variableName
(string)
-
position
(number, optional)
Result
-
group
(object)
HTTP-Request
POST /api/groups/:groupId/variables/:variableName
groupId
(string)
variableName
(string)
position
(number, optional)
-
group
(object)
HTTP-Request
POST /api/groups/:groupId/variables/:variableName
updateDeviceGroupOrder
updateDeviceGroupOrder(groupId : string, deviceOrder : array) -> group : object
Update device order in group
Parameters
-
groupId
(string)
-
deviceOrder
(array)
Result
-
group
(object)
HTTP-Request
POST /api/groups/:groupId/devices
groupId
(string)
deviceOrder
(array)
-
group
(object)
HTTP-Request
POST /api/groups/:groupId/devices
removeVariableFromGroup
removeVariableFromGroup(groupId : string, variableName : string) -> group : object
Remove a variable from a group
Parameters
-
groupId
(string)
-
variableName
(string)
Result
-
group
(object)
HTTP-Request
DELETE /api/groups/:groupId/variables/:variableName
groupId
(string)
variableName
(string)
-
group
(object)
HTTP-Request
DELETE /api/groups/:groupId/variables/:variableName
updateVariableGroupOrder
updateVariableGroupOrder(groupId : string, variableOrder : array) -> group : object
Update variable order in group
Parameters
-
groupId
(string)
-
variableOrder
(array)
Result
-
group
(object)
HTTP-Request
POST /api/groups/:groupId/variables
groupId
(string)
variableOrder
(array)
-
group
(object)
HTTP-Request
POST /api/groups/:groupId/variables
updateGroupOrder
updateGroupOrder(groupOrder : array) -> groupOrder : array
Update the order of all groups
Parameters
-
groupOrder
(array)
Result
-
groupOrder
(array)
HTTP-Request
POST /api/groups
groupOrder
(array)
-
groupOrder
(array)
HTTP-Request
POST /api/groups
Pages
getPages
getPages() -> pages : array
List all pages.
Result
-
pages
(array)
-
page
(object)
-
id
(string)
: A user chosen string, used to identify the page.
-
name
(string)
: A user chosen string that should be used to display the page.
-
devices
(array)
: List of all device ids that should be displayed on that page
-
deviceItem
(object)
-
deviceId
(string)
: The id of the device to display at that position
HTTP-Request
GET /api/pages
pages
(array)
-
page
(object)-
id
(string) : A user chosen string, used to identify the page. -
name
(string) : A user chosen string that should be used to display the page. -
devices
(array) : List of all device ids that should be displayed on that page-
deviceItem
(object)-
deviceId
(string) : The id of the device to display at that position
-
-
-
getPageById
getPageById(pageId : string) -> page : object
Get a page by ID
Parameters
-
pageId
(string)
: The ID of the page that should be returned.
Result
-
page
(object)
: The requested page or null if the page was not found.
-
id
(string)
: A user chosen string, used to identify the page.
-
name
(string)
: A user chosen string that should be used to display the page.
-
devices
(array)
: List of all device ids that should be displayed on that page
-
deviceItem
(object)
-
deviceId
(string)
: The id of the device to display at that position
HTTP-Request
GET /api/pages/:pageId
pageId
(string)
: The ID of the page that should be returned.
-
page
(object) : The requested page or null if the page was not found.-
id
(string) : A user chosen string, used to identify the page. -
name
(string) : A user chosen string that should be used to display the page. -
devices
(array) : List of all device ids that should be displayed on that page-
deviceItem
(object)-
deviceId
(string) : The id of the device to display at that position
-
-
-
HTTP-Request
GET /api/pages/:pageId
removePage
removePage(pageId : string) -> removed : object
Remove a page.
Parameters
-
pageId
(string)
: The ID of the page that should be removed.
Result
-
removed
(object)
: The removed page.
-
id
(string)
: A user chosen string, used to identify the page.
-
name
(string)
: A user chosen string that should be used to display the page.
-
devices
(array)
: List of all device ids that should be displayed on that page
-
deviceItem
(object)
-
deviceId
(string)
: The id of the device to display at that position
HTTP-Request
DELETE /api/pages/:pageId
pageId
(string)
: The ID of the page that should be removed.
-
removed
(object) : The removed page.-
id
(string) : A user chosen string, used to identify the page. -
name
(string) : A user chosen string that should be used to display the page. -
devices
(array) : List of all device ids that should be displayed on that page-
deviceItem
(object)-
deviceId
(string) : The id of the device to display at that position
-
-
-
HTTP-Request
DELETE /api/pages/:pageId
addPage
addPage(pageId : string, page : object) -> page : object
Add a page.
Parameters
-
pageId
(string)
: The ID of the page that should be added.
-
page
(object)
: Object with ID and name of the page to create.
-
name
(string)
: A user chosen string that should be used to display the page.
Result
-
page
(object)
: The created page.
-
id
(string)
: A user chosen string, used to identify the page.
-
name
(string)
: A user chosen string that should be used to display the page.
-
devices
(array)
: List of all device ids that should be displayed on that page
-
deviceItem
(object)
-
deviceId
(string)
: The id of the device to display at that position
HTTP-Request
POST /api/pages/:pageId
pageId
(string)
: The ID of the page that should be added.
page
(object)
: Object with ID and name of the page to create.
-
name
(string) : A user chosen string that should be used to display the page.
-
page
(object) : The created page.-
id
(string) : A user chosen string, used to identify the page. -
name
(string) : A user chosen string that should be used to display the page. -
devices
(array) : List of all device ids that should be displayed on that page-
deviceItem
(object)-
deviceId
(string) : The id of the device to display at that position
-
-
-
HTTP-Request
POST /api/pages/:pageId
updatePage
updatePage(pageId : string, page : object) -> page : object
Update a page name or device order.
Parameters
-
pageId
(string)
: The ID of the page to change.
-
page
(object)
: An object with properties that should be updated.
-
name
(string, optional)
: The new name to set.
-
devicesOrder
(array, optional)
: Array of ordered deviceIDs.
-
deviceId
(string)
Result
-
page
(object)
: The updated page.
-
id
(string)
: A user chosen string, used to identify the page.
-
name
(string)
: A user chosen string that should be used to display the page.
-
devices
(array)
: List of all device ids that should be displayed on that page
-
deviceItem
(object)
-
deviceId
(string)
: The id of the device to display at that position
HTTP-Request
PATCH /api/pages/:pageId
pageId
(string)
: The ID of the page to change.
page
(object)
: An object with properties that should be updated.
-
name
(string, optional) : The new name to set. -
devicesOrder
(array, optional) : Array of ordered deviceIDs.-
deviceId
(string)
-
-
page
(object) : The updated page.-
id
(string) : A user chosen string, used to identify the page. -
name
(string) : A user chosen string that should be used to display the page. -
devices
(array) : List of all device ids that should be displayed on that page-
deviceItem
(object)-
deviceId
(string) : The id of the device to display at that position
-
-
-
HTTP-Request
PATCH /api/pages/:pageId
addDeviceToPage
addDeviceToPage(pageId : string, deviceId : string) -> page : object
Add a page
Parameters
-
pageId
(string)
-
deviceId
(string)
Result
-
page
(object)
HTTP-Request
POST /api/pages/:pageId/devices/:deviceId
pageId
(string)
deviceId
(string)
-
page
(object)
HTTP-Request
POST /api/pages/:pageId/devices/:deviceId
removeDeviceFromPage
removeDeviceFromPage(pageId : string, deviceId : string) -> page : object
Remove a device from a group.
Parameters
-
pageId
(string)
-
deviceId
(string)
Result
-
page
(object)
HTTP-Request
DELETE /api/pages/:pageId/devices/:deviceId
pageId
(string)
deviceId
(string)
-
page
(object)
HTTP-Request
DELETE /api/pages/:pageId/devices/:deviceId
updatePageOrder
updatePageOrder(pageOrder : array) -> pageOrder : array
Update the order of all pages
Parameters
-
pageOrder
(array)
Result
-
pageOrder
(array)
HTTP-Request
POST /api/pages
pageOrder
(array)
-
pageOrder
(array)
HTTP-Request
POST /api/pages
Plugins
getInstalledPluginsWithInfo
getInstalledPluginsWithInfo() -> plugins : array
List all installed plugins
Result
-
plugins
(array)
HTTP-Request
GET /api/plugins
plugins
(array)
searchForPluginsWithInfo
searchForPluginsWithInfo() -> plugins : array
Search for available plugins
Result
-
plugins
(array)
HTTP-Request
GET /api/available-plugins
plugins
(array)
getOutdatedPlugins
getOutdatedPlugins() -> outdatedPlugins : array
Get outdated plugins
Result
-
outdatedPlugins
(array)
HTTP-Request
GET /api/outdated-plugins
outdatedPlugins
(array)
isPimaticOutdated
isPimaticOutdated() -> outdated :
Is pimatic outdated
Result
-
outdated
HTTP-Request
GET /api/outdated-pimatic
outdated
installUpdatesAsync
installUpdatesAsync(modules : array) -> status : any
Install updates without awaiting result
Parameters
-
modules
(array)
Result
-
status
(any)
HTTP-Request
POST /api/update-async
modules
(array)
-
status
(any)
HTTP-Request
POST /api/update-async
addPluginsToConfig
addPluginsToConfig(pluginNames : array) -> added : array
Add plugins to config
Parameters
-
pluginNames
(array)
Result
-
added
(array)
HTTP-Request
POST /api/config/plugins
pluginNames
(array)
-
added
(array)
HTTP-Request
POST /api/config/plugins
removePluginsFromConfig
removePluginsFromConfig(pluginNames : array) -> removed : array
Remove plugins from config
Parameters
-
pluginNames
(array)
Result
-
removed
(array)
HTTP-Request
DELETE /api/config/plugins
pluginNames
(array)
-
removed
(array)
HTTP-Request
DELETE /api/config/plugins
getUpdateProcessStatus
getUpdateProcessStatus() -> info : object
Get update status
Result
-
info
(object)
HTTP-Request
GET /api/update-process
info
(object)
Database
queryMessages
queryMessages([criteria : object]) -> messages : array
List log messages
Parameters
-
criteria
(object, optional)
-
level
(any, optional)
-
levelOp
(string, optional)
-
after
(date, optional)
-
before
(date, optional)
-
limit
(number, optional)
Result
-
messages
(array)
HTTP-Request
GET /api/database/messages
criteria
(object, optional)
-
level
(any, optional) -
levelOp
(string, optional) -
after
(date, optional) -
before
(date, optional) -
limit
(number, optional)
-
messages
(array)
HTTP-Request
GET /api/database/messages
deleteMessages
deleteMessages([criteria : object])undefined
Delete messages older than the given date
Parameters
-
criteria
(object, optional)
-
level
(any, optional)
-
levelOp
(string, optional)
-
after
(date, optional)
-
before
(date, optional)
-
limit
(number, optional)
HTTP-Request
DELETE /api/database/messages
criteria
(object, optional)
-
level
(any, optional) -
levelOp
(string, optional) -
after
(date, optional) -
before
(date, optional) -
limit
(number, optional)
addDeviceAttributeLogging
addDeviceAttributeLogging(deviceId : string, attributeName : string, time : number|boolean|string|array|date|object)undefined
Enable or disable logging for an device attribute
Parameters
-
deviceId
(string)
-
attributeName
(string)
-
time
(number|boolean|string|array|date|object)
deviceId
(string)
attributeName
(string)
time
(number|boolean|string|array|date|object)
queryMessagesTags
queryMessagesTags([criteria : object]) -> tags : array
List all tags from the matching messages
Parameters
-
criteria
(object, optional)
-
level
(any, optional)
-
levelOp
(string, optional)
-
after
(date, optional)
-
before
(date, optional)
-
limit
(number, optional)
Result
-
tags
(array)
HTTP-Request
GET /api/database/messages/tags
criteria
(object, optional)
-
level
(any, optional) -
levelOp
(string, optional) -
after
(date, optional) -
before
(date, optional) -
limit
(number, optional)
-
tags
(array)
HTTP-Request
GET /api/database/messages/tags
queryMessagesCount
queryMessagesCount([criteria : object]) -> count : number
Count of all matches matching the criteria
Parameters
-
criteria
(object, optional)
-
level
(any, optional)
-
levelOp
(string, optional)
-
after
(date, optional)
-
before
(date, optional)
-
limit
(number, optional)
Result
-
count
(number)
HTTP-Request
GET /api/database/messages/count
criteria
(object, optional)
-
level
(any, optional) -
levelOp
(string, optional) -
after
(date, optional) -
before
(date, optional) -
limit
(number, optional)
-
count
(number)
HTTP-Request
GET /api/database/messages/count
queryDeviceAttributeEvents
queryDeviceAttributeEvents([criteria : object]) -> events : array
Get logged values of device attributes
Parameters
-
criteria
(object, optional)
-
deviceId
(string|array, optional)
-
attributeName
(string|array, optional)
-
after
(date, optional)
-
before
(date, optional)
-
order
(string, optional)
-
orderDirection
(string, optional)
-
offset
(number, optional)
-
limit
(number, optional)
Result
-
events
(array)
HTTP-Request
GET /api/database/device-attributes/
criteria
(object, optional)
-
deviceId
(string|array, optional) -
attributeName
(string|array, optional) -
after
(date, optional) -
before
(date, optional) -
order
(string, optional) -
orderDirection
(string, optional) -
offset
(number, optional) -
limit
(number, optional)
-
events
(array)
HTTP-Request
GET /api/database/device-attributes/
queryDeviceAttributeEventsCount
queryDeviceAttributeEventsCount() -> count : number
Get count of saved device attributes events
Result
-
count
(number)
HTTP-Request
GET /api/database/device-attributes/count
count
(number)
queryDeviceAttributeEventsCounts
queryDeviceAttributeEventsCounts() -> counts : array
Get count of saved device attributes per atrtibute
Result
-
counts
(array)
HTTP-Request
GET /api/database/device-attributes/counts
counts
(array)
queryDeviceAttributeEventsDevices
queryDeviceAttributeEventsDevices() -> devices : array
Get all device attribute infos in database
Result
-
devices
(array)
HTTP-Request
GET /api/database/device-attributes/devices
devices
(array)
queryDeviceAttributeEventsInfo
queryDeviceAttributeEventsInfo() -> deviceAttributes : array
Get all device attribute infos in database
Result
-
deviceAttributes
(array)
HTTP-Request
GET /api/database/device-attributes-info
deviceAttributes
(array)
querySingleDeviceAttributeEvents
querySingleDeviceAttributeEvents(deviceId : string, attributeName : string, [criteria : object]) -> events : array
Get logged values of device attributes
Parameters
-
deviceId
(string)
-
attributeName
(string)
-
criteria
(object, optional)
-
after
(date, optional)
-
before
(date, optional)
-
groupByTime
(number, optional)
-
order
(string, optional)
-
orderDirection
(string, optional)
-
offset
(number, optional)
-
limit
(number, optional)
Result
-
events
(array)
HTTP-Request
GET /api/database/device-attributes/:deviceId/:attributeName
deviceId
(string)
attributeName
(string)
criteria
(object, optional)
-
after
(date, optional) -
before
(date, optional) -
groupByTime
(number, optional) -
order
(string, optional) -
orderDirection
(string, optional) -
offset
(number, optional) -
limit
(number, optional)
-
events
(array)
HTTP-Request
GET /api/database/device-attributes/:deviceId/:attributeName
getDeviceAttributeLogging
getDeviceAttributeLogging() -> attributeLogging : array
Get device attribute logging times table
Result
-
attributeLogging
(array)
attributeLogging
(array)
setDeviceAttributeLogging
setDeviceAttributeLogging(attributeLogging : array)undefined
Set device attribute logging times table
Parameters
-
attributeLogging
(array)
attributeLogging
(array)
getDeviceAttributeLoggingTime
getDeviceAttributeLoggingTime(deviceId : string, attributeName : string) -> timeInfo : object
Get device attribute logging times table
Parameters
-
deviceId
(string)
-
attributeName
(string)
Result
-
timeInfo
(object)
deviceId
(string)
attributeName
(string)
-
timeInfo
(object)
runVacuum
runVacuum()undefined
Run the sqlite3 vacuum pragma
HTTP-Request
GET /api/database/vacuum
checkDatabase
checkDatabase() -> problems : array
Check database and config integrity
Result
-
problems
(array)
HTTP-Request
GET /api/database/check
problems
(array)
deleteDeviceAttribute
deleteDeviceAttribute(id : number)undefined
Delete a device attribute from the database
Parameters
-
id
(number)
HTTP-Request
DELETE /api/database/device-attribue/by-id
id
(number)
updateDeviceAttribute
updateDeviceAttribute(id : number)undefined
Updates a device attribute info in database
Parameters
-
id
(number)
HTTP-Request
PATCH /api/database/device-attribue/by-id
id
(number)