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": { "enums": {
"BasicType": [ "BasicType": [
@ -41,6 +41,9 @@
"CreateMethodAuto", "CreateMethodAuto",
"CreateMethodDiscovery" "CreateMethodDiscovery"
], ],
"DebugError": [
"DebugErrorNoError"
],
"DiscoveryType": [ "DiscoveryType": [
"DiscoveryTypePrecise", "DiscoveryTypePrecise",
"DiscoveryTypeWeak" "DiscoveryTypeWeak"
@ -64,6 +67,17 @@
"InputTypeUrl", "InputTypeUrl",
"InputTypeMacAddress" "InputTypeMacAddress"
], ],
"LoggingCategoryType": [
"LoggingCategoryTypeSystem",
"LoggingCategoryTypePlugin",
"LoggingCategoryTypeCustom"
],
"LoggingLevel": [
"LoggingLevelCritical",
"LoggingLevelWarning",
"LoggingLevelInfo",
"LoggingLevelDebug"
],
"MediaBrowserIcon": [ "MediaBrowserIcon": [
"MediaBrowserIconNone", "MediaBrowserIconNone",
"MediaBrowserIconPlaylist", "MediaBrowserIconPlaylist",
@ -819,6 +833,28 @@
"configurationError": "$ref:ConfigurationError" "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": { "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.", "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": { "params": {
@ -2375,6 +2411,13 @@
"id": "String" "id": "String"
} }
}, },
"Debug.LoggingCategoryLevelChanged": {
"description": "Emitted whenever a logging category has changed the logging level.",
"params": {
"level": "$ref:LoggingLevel",
"name": "String"
}
},
"Integrations.EventTriggered": { "Integrations.EventTriggered": {
"description": "Emitted whenever an Event is triggered.", "description": "Emitted whenever an Event is triggered.",
"params": { "params": {
@ -2881,6 +2924,11 @@
"r:timestamp": "Uint", "r:timestamp": "Uint",
"r:values": "Object" "r:values": "Object"
}, },
"LoggingCategory": {
"level": "$ref:LoggingLevel",
"name": "String",
"type": "$ref:LoggingCategoryType"
},
"ModbusRtuMaster": { "ModbusRtuMaster": {
"baudrate": "Uint", "baudrate": "Uint",
"connected": "Bool", "connected": "Bool",

View File

@ -699,7 +699,9 @@ void TestJSONRPC::enableDisableNotifications_legacy()
QStringList expectedNamespaces; QStringList expectedNamespaces;
if (enabled == "true") { 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()); std::sort(expectedNamespaces.begin(), expectedNamespaces.end());