mirror of https://github.com/nymea/nymea.git
623 lines
19 KiB
JSON
623 lines
19 KiB
JSON
11
|
|
{
|
|
"methods": {
|
|
"Actions.ExecuteAction": {
|
|
"description": "Execute a single action.",
|
|
"params": {
|
|
"actionTypeId": "Uuid",
|
|
"deviceId": "Uuid",
|
|
"o:params": [
|
|
"$ref:Param"
|
|
]
|
|
},
|
|
"returns": {
|
|
"deviceError": "$ref:DeviceError"
|
|
}
|
|
},
|
|
"Actions.GetActionType": {
|
|
"description": "Get the ActionType for the given ActionTypeId",
|
|
"params": {
|
|
"actionTypeId": "Uuid"
|
|
},
|
|
"returns": {
|
|
"deviceError": "$ref:DeviceError",
|
|
"o:actionType": {
|
|
"id": "Uuid",
|
|
"name": "Uuid",
|
|
"paramTypes": [
|
|
"$ref:ParamType"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"Devices.AddConfiguredDevice": {
|
|
"description": "Add a configured device with a setupMethod of SetupMethodJustAdd. For devices with a setupMethod different than SetupMethodJustAdd, use PairDevice. Use deviceDescriptorId or deviceParams, depending on the createMethod of the device class. CreateMethodJustAdd takes the parameters you want to have with that device. CreateMethodDiscovery requires the use of a deviceDescriptorId.",
|
|
"params": {
|
|
"deviceClassId": "Uuid",
|
|
"o:deviceDescriptorId": "Uuid",
|
|
"o:deviceParams": [
|
|
"$ref:Param"
|
|
]
|
|
},
|
|
"returns": {
|
|
"deviceError": "$ref:DeviceError",
|
|
"o:deviceId": "Uuid"
|
|
}
|
|
},
|
|
"Devices.ConfirmPairing": {
|
|
"description": "Confirm an ongoing pairing. In case of SetupMethodEnterPin also provide the pin in the params.",
|
|
"params": {
|
|
"o:secret": "String",
|
|
"pairingTransactionId": "Uuid"
|
|
},
|
|
"returns": {
|
|
"deviceError": "$ref:DeviceError",
|
|
"o:deviceId": "Uuid"
|
|
}
|
|
},
|
|
"Devices.GetActionTypes": {
|
|
"description": "Get action types for a specified deviceClassId.",
|
|
"params": {
|
|
"deviceClassId": "Uuid"
|
|
},
|
|
"returns": {
|
|
"actionTypes": [
|
|
"$ref:ActionType"
|
|
]
|
|
}
|
|
},
|
|
"Devices.GetConfiguredDevices": {
|
|
"description": "Returns a list of configured devices.",
|
|
"params": {
|
|
},
|
|
"returns": {
|
|
"devices": [
|
|
"$ref:Device"
|
|
]
|
|
}
|
|
},
|
|
"Devices.GetDiscoveredDevices": {
|
|
"description": "Performs a device discovery and returns the results. This function may take a while to return.",
|
|
"params": {
|
|
"deviceClassId": "Uuid",
|
|
"o:discoveryParams": [
|
|
"$ref:Param"
|
|
]
|
|
},
|
|
"returns": {
|
|
"deviceError": "$ref:DeviceError",
|
|
"o:deviceDescriptors": [
|
|
"$ref:DeviceDescriptor"
|
|
]
|
|
}
|
|
},
|
|
"Devices.GetEventTypes": {
|
|
"description": "Get event types for a specified deviceClassId.",
|
|
"params": {
|
|
"deviceClassId": "Uuid"
|
|
},
|
|
"returns": {
|
|
"eventTypes": [
|
|
"$ref:EventType"
|
|
]
|
|
}
|
|
},
|
|
"Devices.GetPluginConfiguration": {
|
|
"description": "Get a plugin's params.",
|
|
"params": {
|
|
"pluginId": "Uuid"
|
|
},
|
|
"returns": {
|
|
"deviceError": "$ref:DeviceError",
|
|
"o:configuration": [
|
|
"$ref:Param"
|
|
]
|
|
}
|
|
},
|
|
"Devices.GetPlugins": {
|
|
"description": "Returns a list of loaded plugins.",
|
|
"params": {
|
|
},
|
|
"returns": {
|
|
"plugins": [
|
|
"$ref:Plugin"
|
|
]
|
|
}
|
|
},
|
|
"Devices.GetStateTypes": {
|
|
"description": "Get state types for a specified deviceClassId.",
|
|
"params": {
|
|
"deviceClassId": "Uuid"
|
|
},
|
|
"returns": {
|
|
"stateTypes": [
|
|
"$ref:StateType"
|
|
]
|
|
}
|
|
},
|
|
"Devices.GetStateValue": {
|
|
"description": "Get the value of the given device and the given stateType",
|
|
"params": {
|
|
"deviceId": "Uuid",
|
|
"stateTypeId": "Uuid"
|
|
},
|
|
"returns": {
|
|
"deviceError": "$ref:DeviceError",
|
|
"o:value": "Variant"
|
|
}
|
|
},
|
|
"Devices.GetStateValues": {
|
|
"description": "Get all the state values of the given device.",
|
|
"params": {
|
|
"deviceId": "Uuid"
|
|
},
|
|
"returns": {
|
|
"deviceError": "$ref:DeviceError",
|
|
"o:values": [
|
|
{
|
|
"stateTypeId": "Uuid",
|
|
"value": "Variant"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"Devices.GetSupportedDevices": {
|
|
"description": "Returns a list of supported Device classes, optionally filtered by vendorId.",
|
|
"params": {
|
|
"o:vendorId": "Uuid"
|
|
},
|
|
"returns": {
|
|
"deviceClasses": [
|
|
"$ref:DeviceClass"
|
|
]
|
|
}
|
|
},
|
|
"Devices.GetSupportedVendors": {
|
|
"description": "Returns a list of supported Vendors.",
|
|
"params": {
|
|
},
|
|
"returns": {
|
|
"vendors": [
|
|
"$ref:Vendor"
|
|
]
|
|
}
|
|
},
|
|
"Devices.PairDevice": {
|
|
"description": "Pair a device. Use this for DeviceClasses with a setupMethod different than SetupMethodJustAdd.Use deviceDescriptorId or deviceParams, depending on the createMethod of the device class. CreateMethodJustAdd takes the parameters you want to have with that device. CreateMethodDiscovery requires the use of a deviceDescriptorId. If success is true, the return values will contain a pairingTransactionId, a displayMessage and the setupMethod. Depending on the setupMethod you should either proceed with AddConfiguredDevice or PairDevice.",
|
|
"params": {
|
|
"deviceClassId": "Uuid",
|
|
"o:deviceDescriptorId": "Uuid",
|
|
"o:deviceParams": [
|
|
"$ref:Param"
|
|
]
|
|
},
|
|
"returns": {
|
|
"deviceError": "$ref:DeviceError",
|
|
"o:displayMessage": "String",
|
|
"o:pairingTransactionId": "Uuid",
|
|
"o:setupMethod": "$ref:SetupMethod"
|
|
}
|
|
},
|
|
"Devices.RemoveConfiguredDevice": {
|
|
"description": "Remove a device from the system.",
|
|
"params": {
|
|
"deviceId": "Uuid",
|
|
"o:removePolicyList": [
|
|
{
|
|
"policy": "$ref:RemovePolicy",
|
|
"ruleId": "Uuid"
|
|
}
|
|
]
|
|
},
|
|
"returns": {
|
|
"deviceError": "$ref:DeviceError"
|
|
}
|
|
},
|
|
"Devices.SetPluginConfiguration": {
|
|
"description": "Set a plugin's params.",
|
|
"params": {
|
|
"configuration": [
|
|
"$ref:Param"
|
|
],
|
|
"pluginId": "Uuid"
|
|
},
|
|
"returns": {
|
|
"deviceError": "$ref:DeviceError"
|
|
}
|
|
},
|
|
"Events.GetEventType": {
|
|
"description": "Get the EventType for the given eventTypeId.",
|
|
"params": {
|
|
"eventTypeId": "Uuid"
|
|
},
|
|
"returns": {
|
|
"deviceError": "$ref:DeviceError",
|
|
"o:eventType": "$ref:EventType"
|
|
}
|
|
},
|
|
"JSONRPC.Introspect": {
|
|
"description": "Introspect this API.",
|
|
"params": {
|
|
},
|
|
"returns": {
|
|
"methods": "Object",
|
|
"types": "Object"
|
|
}
|
|
},
|
|
"JSONRPC.SetNotificationStatus": {
|
|
"description": "Enable/Disable notifications for this connections.",
|
|
"params": {
|
|
"enabled": "Bool"
|
|
},
|
|
"returns": {
|
|
"enabled": "Bool"
|
|
}
|
|
},
|
|
"JSONRPC.Version": {
|
|
"description": "Version of this Guh/JSONRPC interface.",
|
|
"params": {
|
|
},
|
|
"returns": {
|
|
"protocol version": "String",
|
|
"version": "String"
|
|
}
|
|
},
|
|
"Logging.GetLogEntries": {
|
|
"description": "Get the LogEntries matching the given filter.",
|
|
"params": {
|
|
},
|
|
"returns": {
|
|
"loggingError": "$ref:LoggingError",
|
|
"o:logEntries": [
|
|
"$ref:LogEntry"
|
|
]
|
|
}
|
|
},
|
|
"Rules.AddRule": {
|
|
"description": "Add a rule. You can describe rules by one or many EventDesciptors and a StateEvaluator. Note that onlyone of either eventDescriptor or eventDescriptorList may be passed at a time. A rule can be created but left disabled,meaning it won't actually be executed until set to enabled. If not given, enabled defaults to true.",
|
|
"params": {
|
|
"actions": [
|
|
"$ref:Action"
|
|
],
|
|
"o:enabled": "Bool",
|
|
"o:eventDescriptor": "$ref:EventDescriptor",
|
|
"o:eventDescriptorList": [
|
|
"$ref:EventDescriptor"
|
|
],
|
|
"o:stateEvaluator": "$ref:StateEvaluator"
|
|
},
|
|
"returns": {
|
|
"o:ruleId": "Uuid",
|
|
"ruleError": "$ref:RuleError"
|
|
}
|
|
},
|
|
"Rules.DisableRule": {
|
|
"description": "Disable a rule. The rule won't be triggered by it's events or state changes while it is disabled.",
|
|
"params": {
|
|
"ruleId": "Uuid"
|
|
},
|
|
"returns": {
|
|
"ruleError": "$ref:RuleError"
|
|
}
|
|
},
|
|
"Rules.EnableRule": {
|
|
"description": "Enabled a rule that has previously been disabled.",
|
|
"params": {
|
|
"ruleId": "Uuid"
|
|
},
|
|
"returns": {
|
|
"ruleError": "$ref:RuleError"
|
|
}
|
|
},
|
|
"Rules.FindRules": {
|
|
"description": "Find a list of rules containing any of the given parameters.",
|
|
"params": {
|
|
"deviceId": "Uuid"
|
|
},
|
|
"returns": {
|
|
"ruleIds": [
|
|
"Uuid"
|
|
]
|
|
}
|
|
},
|
|
"Rules.GetRuleDetails": {
|
|
"description": "Get details for the rule identified by ruleId",
|
|
"params": {
|
|
"ruleId": "Uuid"
|
|
},
|
|
"returns": {
|
|
"o:rule": "$ref:Rule",
|
|
"ruleError": "$ref:RuleError"
|
|
}
|
|
},
|
|
"Rules.GetRules": {
|
|
"description": "Get all configured rules",
|
|
"params": {
|
|
},
|
|
"returns": {
|
|
"ruleIds": [
|
|
"Uuid"
|
|
]
|
|
}
|
|
},
|
|
"Rules.RemoveRule": {
|
|
"description": "Remove a rule",
|
|
"params": {
|
|
"ruleId": "Uuid"
|
|
},
|
|
"returns": {
|
|
"ruleError": "$ref:RuleError"
|
|
}
|
|
},
|
|
"States.GetStateType": {
|
|
"description": "Get the StateType for the given stateTypeId.",
|
|
"params": {
|
|
"stateTypeId": "Uuid"
|
|
},
|
|
"returns": {
|
|
"deviceError": "$ref:DeviceError",
|
|
"o:stateType": "$ref:StateType"
|
|
}
|
|
}
|
|
},
|
|
"notifications": {
|
|
"Devices.StateChanged": {
|
|
"description": "Emitted whenever a State of a device changes.",
|
|
"params": {
|
|
"deviceId": "Uuid",
|
|
"stateTypeId": "Uuid",
|
|
"value": "Variant"
|
|
}
|
|
},
|
|
"Events.EventTriggered": {
|
|
"description": "Emitted whenever an Event is triggered.",
|
|
"params": {
|
|
"event": "$ref:Event"
|
|
}
|
|
},
|
|
"Logging.LogEntryAdded": {
|
|
"description": "Emitted whenever an entry is appended to the logging system.",
|
|
"params": {
|
|
"logEntry": "$ref:LogEntry"
|
|
}
|
|
}
|
|
},
|
|
"types": {
|
|
"Action": {
|
|
"actionTypeId": "Uuid",
|
|
"deviceId": "Uuid",
|
|
"o:params": [
|
|
"$ref:Param"
|
|
]
|
|
},
|
|
"ActionType": {
|
|
"id": "Uuid",
|
|
"name": "Uuid",
|
|
"paramTypes": [
|
|
"$ref:ParamType"
|
|
]
|
|
},
|
|
"BasicType": [
|
|
"Uuid",
|
|
"String",
|
|
"Int",
|
|
"Double",
|
|
"Bool",
|
|
"Variant",
|
|
"Object"
|
|
],
|
|
"CreateMethod": [
|
|
"CreateMethodUser",
|
|
"CreateMethodAuto",
|
|
"CreateMethodDiscovery"
|
|
],
|
|
"Device": {
|
|
"deviceClassId": "Uuid",
|
|
"id": "Uuid",
|
|
"name": "String",
|
|
"params": [
|
|
"$ref:Param"
|
|
],
|
|
"setupComplete": "Bool"
|
|
},
|
|
"DeviceClass": {
|
|
"actionTypes": [
|
|
"$ref:ActionType"
|
|
],
|
|
"createMethods": [
|
|
"$ref:CreateMethod"
|
|
],
|
|
"discoveryParamTypes": [
|
|
"$ref:ParamType"
|
|
],
|
|
"eventTypes": [
|
|
"$ref:EventType"
|
|
],
|
|
"id": "Uuid",
|
|
"name": "String",
|
|
"paramTypes": [
|
|
"$ref:ParamType"
|
|
],
|
|
"setupMethod": "$ref:SetupMethod",
|
|
"stateTypes": [
|
|
"$ref:StateType"
|
|
],
|
|
"vendorId": "Uuid"
|
|
},
|
|
"DeviceDescriptor": {
|
|
"description": "String",
|
|
"id": "Uuid",
|
|
"title": "String"
|
|
},
|
|
"DeviceError": [
|
|
"DeviceErrorNoError",
|
|
"DeviceErrorPluginNotFound",
|
|
"DeviceErrorDeviceNotFound",
|
|
"DeviceErrorDeviceClassNotFound",
|
|
"DeviceErrorActionTypeNotFound",
|
|
"DeviceErrorStateTypeNotFound",
|
|
"DeviceErrorEventTypeNotFound",
|
|
"DeviceErrorDeviceDescriptorNotFound",
|
|
"DeviceErrorMissingParameter",
|
|
"DeviceErrorInvalidParameter",
|
|
"DeviceErrorSetupFailed",
|
|
"DeviceErrorDuplicateUuid",
|
|
"DeviceErrorCreationMethodNotSupported",
|
|
"DeviceErrorSetupMethodNotSupported",
|
|
"DeviceErrorHardwareNotAvailable",
|
|
"DeviceErrorHardwareFailure",
|
|
"DeviceErrorAsync",
|
|
"DeviceErrorDeviceInUse",
|
|
"DeviceErrorPairingTransactionIdNotFound"
|
|
],
|
|
"Event": {
|
|
"deviceId": "Uuid",
|
|
"eventTypeId": "Uuid",
|
|
"o:params": [
|
|
"$ref:Param"
|
|
]
|
|
},
|
|
"EventDescriptor": {
|
|
"deviceId": "Uuid",
|
|
"eventTypeId": "Uuid",
|
|
"o:paramDescriptors": [
|
|
"$ref:ParamDescriptor"
|
|
]
|
|
},
|
|
"EventType": {
|
|
"id": "Uuid",
|
|
"name": "String",
|
|
"paramTypes": [
|
|
"$ref:ParamType"
|
|
]
|
|
},
|
|
"LogEntry": {
|
|
"loggingLevel": "$ref:LoggingLevel",
|
|
"o:active": "Bool",
|
|
"o:deviceId": "Uuid",
|
|
"o:errorCode": "String",
|
|
"o:eventType": "$ref:LoggingEventType",
|
|
"o:typeId": "Uuid",
|
|
"o:value": "String",
|
|
"source": "$ref:LoggingSource",
|
|
"timestamp": "Int"
|
|
},
|
|
"LoggingError": [
|
|
"LoggingErrorNoError",
|
|
"LoggingErrorLogEntryNotFound"
|
|
],
|
|
"LoggingEventType": [
|
|
"LoggingEventTypeTrigger",
|
|
"LoggingEventTypeActiveChange"
|
|
],
|
|
"LoggingLevel": [
|
|
"LoggingLevelInfo",
|
|
"LoggingLevelAlert"
|
|
],
|
|
"LoggingSource": [
|
|
"LoggingSourceSystem",
|
|
"LoggingSourceEvents",
|
|
"LoggingSourceActions",
|
|
"LoggingSourceStates",
|
|
"LoggingSourceRules"
|
|
],
|
|
"Param": {
|
|
"name": "String",
|
|
"value": "$ref:BasicType"
|
|
},
|
|
"ParamDescriptor": {
|
|
"name": "String",
|
|
"operator": "$ref:ValueOperator",
|
|
"value": "$ref:BasicType"
|
|
},
|
|
"ParamType": {
|
|
"name": "String",
|
|
"o:allowedValues": [
|
|
"Variant"
|
|
],
|
|
"o:defaultValue": "Variant",
|
|
"o:maxValue": "Variant",
|
|
"o:minValue": "Variant",
|
|
"type": "$ref:BasicType"
|
|
},
|
|
"Plugin": {
|
|
"id": "Uuid",
|
|
"name": "String",
|
|
"params": [
|
|
"$ref:Param"
|
|
]
|
|
},
|
|
"RemovePolicy": [
|
|
"RemovePolicyCascade",
|
|
"RemovePolicyUpdate"
|
|
],
|
|
"Rule": {
|
|
"actions": [
|
|
"$ref:Action"
|
|
],
|
|
"enabled": "Bool",
|
|
"eventDescriptors": [
|
|
"$ref:EventDescriptor"
|
|
],
|
|
"id": "Uuid",
|
|
"stateEvaluator": "$ref:StateEvaluator"
|
|
},
|
|
"RuleError": [
|
|
"RuleErrorNoError",
|
|
"RuleErrorInvalidRuleId",
|
|
"RuleErrorRuleNotFound",
|
|
"RuleErrorDeviceNotFound",
|
|
"RuleErrorEventTypeNotFound",
|
|
"RuleErrorActionTypeNotFound",
|
|
"RuleErrorInvalidParameter",
|
|
"RuleErrorMissingParameter"
|
|
],
|
|
"SetupMethod": [
|
|
"SetupMethodJustAdd",
|
|
"SetupMethodDisplayPin",
|
|
"SetupMethodEnterPin",
|
|
"SetupMethodPushButton"
|
|
],
|
|
"State": {
|
|
"deviceId": "Uuid",
|
|
"stateTypeId": "Uuid",
|
|
"value": "Variant"
|
|
},
|
|
"StateDescriptor": {
|
|
"deviceId": "Uuid",
|
|
"operator": "$ref:ValueOperator",
|
|
"stateTypeId": "Uuid",
|
|
"value": "Variant"
|
|
},
|
|
"StateEvaluator": {
|
|
"o:childEvaluators": [
|
|
"$ref:StateEvaluator"
|
|
],
|
|
"o:operator": "$ref:StateOperator",
|
|
"o:stateDescriptor": "$ref:StateDescriptor"
|
|
},
|
|
"StateOperator": [
|
|
"StateOperatorAnd",
|
|
"StateOperatorOr"
|
|
],
|
|
"StateType": {
|
|
"defaultValue": "Variant",
|
|
"id": "Uuid",
|
|
"name": "String",
|
|
"type": "$ref:BasicType"
|
|
},
|
|
"ValueOperator": [
|
|
"ValueOperatorEquals",
|
|
"ValueOperatorNotEquals",
|
|
"ValueOperatorLess",
|
|
"ValueOperatorGreater",
|
|
"ValueOperatorLessOrEqual",
|
|
"ValueOperatorGreaterOrEqual"
|
|
],
|
|
"Vendor": {
|
|
"id": "Uuid",
|
|
"name": "String"
|
|
}
|
|
}
|
|
}
|