Update JSON RPC API to 8.2

This commit is contained in:
Simon Stürz 2024-12-20 10:06:03 +01:00
parent ffaa53b04d
commit 8744903325
2 changed files with 52 additions and 2 deletions

View File

@ -1,4 +1,4 @@
8.1
8.2
{
"enums": {
"BasicType": [
@ -41,6 +41,9 @@
"CreateMethodAuto",
"CreateMethodDiscovery"
],
"DebugError": [
"DebugErrorNoError"
],
"DiscoveryType": [
"DiscoveryTypePrecise",
"DiscoveryTypeWeak"
@ -64,6 +67,17 @@
"InputTypeUrl",
"InputTypeMacAddress"
],
"LoggingCategoryType": [
"LoggingCategoryTypeSystem",
"LoggingCategoryTypePlugin",
"LoggingCategoryTypeCustom"
],
"LoggingLevel": [
"LoggingLevelCritical",
"LoggingLevelWarning",
"LoggingLevelInfo",
"LoggingLevelDebug"
],
"MediaBrowserIcon": [
"MediaBrowserIconNone",
"MediaBrowserIconPlaylist",
@ -819,6 +833,28 @@
"configurationError": "$ref:ConfigurationError"
}
},
"Debug.GetLoggingCategories": {
"description": "Get all available logging categories.",
"params": {
},
"permissionScope": "PermissionScopeAdmin",
"returns": {
"loggingCategories": [
"$ref:LoggingCategory"
]
}
},
"Debug.SetLoggingCategoryLevel": {
"description": "Set the logging category with the given name to the given logging level.",
"params": {
"level": "$ref:LoggingLevel",
"name": "String"
},
"permissionScope": "PermissionScopeAdmin",
"returns": {
"debugError": "$ref:DebugError"
}
},
"Integrations.AddThing": {
"description": "Add a new thing to the system. Only things with a setupMethod of SetupMethodJustAdd can be added this way. For things with a setupMethod different than SetupMethodJustAdd, use PairThing. Things with CreateMethodJustAdd require all parameters to be supplied here. Things with CreateMethodDiscovery require the use of a thingDescriptorId. For discovered things, params are not required and will be taken from the ThingDescriptor, however, they may be overridden by supplying thingParams.",
"params": {
@ -2375,6 +2411,13 @@
"id": "String"
}
},
"Debug.LoggingCategoryLevelChanged": {
"description": "Emitted whenever a logging category has changed the logging level.",
"params": {
"level": "$ref:LoggingLevel",
"name": "String"
}
},
"Integrations.EventTriggered": {
"description": "Emitted whenever an Event is triggered.",
"params": {
@ -2881,6 +2924,11 @@
"r:timestamp": "Uint",
"r:values": "Object"
},
"LoggingCategory": {
"level": "$ref:LoggingLevel",
"name": "String",
"type": "$ref:LoggingCategoryType"
},
"ModbusRtuMaster": {
"baudrate": "Uint",
"connected": "Bool",

View File

@ -699,7 +699,9 @@ void TestJSONRPC::enableDisableNotifications_legacy()
QStringList expectedNamespaces;
if (enabled == "true") {
expectedNamespaces << "NetworkManager" << "Integrations" << "System" << "Rules" << "Logging" << "Tags" << "AppData" << "JSONRPC" << "Configuration" << "Scripts" << "Users" << "Zigbee" << "ZWave" << "ModbusRtu";
expectedNamespaces << "NetworkManager" << "Integrations" << "System" << "Rules" << "Logging" << "Tags"
<< "AppData" << "JSONRPC" << "Configuration" << "Scripts" << "Users" << "Zigbee"
<< "ZWave" << "ModbusRtu" << "Debug";
}
std::sort(expectedNamespaces.begin(), expectedNamespaces.end());