Bump JSON API version and update api.json

This commit is contained in:
Simon Stürz 2021-06-08 15:52:44 +02:00
parent 81f9889178
commit 856c352a43
2 changed files with 73 additions and 3 deletions

View File

@ -5,7 +5,7 @@ NYMEA_VERSION_STRING=$$system('dpkg-parsechangelog | sed -n -e "s/^Version: //p"
# define protocol versions # define protocol versions
JSON_PROTOCOL_VERSION_MAJOR=5 JSON_PROTOCOL_VERSION_MAJOR=5
JSON_PROTOCOL_VERSION_MINOR=5 JSON_PROTOCOL_VERSION_MINOR=6
JSON_PROTOCOL_VERSION="$${JSON_PROTOCOL_VERSION_MAJOR}.$${JSON_PROTOCOL_VERSION_MINOR}" JSON_PROTOCOL_VERSION="$${JSON_PROTOCOL_VERSION_MAJOR}.$${JSON_PROTOCOL_VERSION_MINOR}"
LIBNYMEA_API_VERSION_MAJOR=7 LIBNYMEA_API_VERSION_MAJOR=7
LIBNYMEA_API_VERSION_MINOR=0 LIBNYMEA_API_VERSION_MINOR=0

View File

@ -1,4 +1,4 @@
5.5 5.6
{ {
"enums": { "enums": {
"BasicType": [ "BasicType": [
@ -377,7 +377,9 @@
"ZigbeeErrorNetworkUuidNotFound", "ZigbeeErrorNetworkUuidNotFound",
"ZigbeeErrorDurationOutOfRange", "ZigbeeErrorDurationOutOfRange",
"ZigbeeErrorNetworkOffline", "ZigbeeErrorNetworkOffline",
"ZigbeeErrorUnknownBackend" "ZigbeeErrorUnknownBackend",
"ZigbeeErrorNodeNotFound",
"ZigbeeErrorForbidden"
], ],
"ZigbeeNetworkState": [ "ZigbeeNetworkState": [
"ZigbeeNetworkStateOffline", "ZigbeeNetworkStateOffline",
@ -385,6 +387,17 @@
"ZigbeeNetworkStateUpdating", "ZigbeeNetworkStateUpdating",
"ZigbeeNetworkStateOnline", "ZigbeeNetworkStateOnline",
"ZigbeeNetworkStateError" "ZigbeeNetworkStateError"
],
"ZigbeeNodeState": [
"ZigbeeNodeStateUninitialized",
"ZigbeeNodeStateInitializing",
"ZigbeeNodeStateInitialized",
"ZigbeeNodeStateHandled"
],
"ZigbeeNodeType": [
"ZigbeeNodeTypeCoordinator",
"ZigbeeNodeTypeRouter",
"ZigbeeNodeTypeEndDevice"
] ]
}, },
"flags": { "flags": {
@ -2058,6 +2071,18 @@
] ]
} }
}, },
"Zigbee.GetNodes": {
"description": "Returns the list of ZigBee nodes from the network the given 'networkUuid' in the system.",
"params": {
"networkUuid": "Uuid"
},
"returns": {
"o:zigbeeNodes": [
"$ref:ZigbeeNode"
],
"zigbeeError": "$ref:ZigbeeError"
}
},
"Zigbee.RemoveNetwork": { "Zigbee.RemoveNetwork": {
"description": "Remove the ZigBee network with the given network uuid.", "description": "Remove the ZigBee network with the given network uuid.",
"params": { "params": {
@ -2067,6 +2092,16 @@
"zigbeeError": "$ref:ZigbeeError" "zigbeeError": "$ref:ZigbeeError"
} }
}, },
"Zigbee.RemoveNode": {
"description": "Remove a ZigBee node with the given 'ieeeAddress' from the network with the given 'networkUuid'. If there is a thing configured for this node, also the thing will be removed from the system. The coordinator node cannot be removed.",
"params": {
"ieeeAddress": "String",
"networkUuid": "Uuid"
},
"returns": {
"zigbeeError": "$ref:ZigbeeError"
}
},
"Zigbee.SetPermitJoin": { "Zigbee.SetPermitJoin": {
"description": "Allow or deny nodes to join the network with the given 'networkUuid' for a specific 'duration' in seconds. The duration value has to be between 0 and 255 seconds. The 'permitJoinDuration' property of ZigBee network object indicates how long permit has been enabled and the 'permitJoiningRemaining' indicates the rest of the time. Those values can be used to show a countdown or progressbar. This method can be recalled for resetting the timeout. If the duration is set to 0 seconds, joining will be disabled immediatly for the entire network. The 'shortAddress' is optional and defaults to the broadcast address 0xfffc for all routers in the network. If the short address matches the address of a router node in the network, only that specific router will be able to allow new nodes to join the network. A new node will join to the router with the best link quality index (LQI).", "description": "Allow or deny nodes to join the network with the given 'networkUuid' for a specific 'duration' in seconds. The duration value has to be between 0 and 255 seconds. The 'permitJoinDuration' property of ZigBee network object indicates how long permit has been enabled and the 'permitJoiningRemaining' indicates the rest of the time. Those values can be used to show a countdown or progressbar. This method can be recalled for resetting the timeout. If the duration is set to 0 seconds, joining will be disabled immediatly for the entire network. The 'shortAddress' is optional and defaults to the broadcast address 0xfffc for all routers in the network. If the short address matches the address of a router node in the network, only that specific router will be able to allow new nodes to join the network. A new node will join to the router with the best link quality index (LQI).",
"params": { "params": {
@ -2534,6 +2569,27 @@
"params": { "params": {
"networkUuid": "Uuid" "networkUuid": "Uuid"
} }
},
"Zigbee.NodeAdded": {
"description": "Emitted whenever a new ZigBee node has joined the network with the given 'networkUuid'.",
"params": {
"networkUuid": "Uuid",
"zigbeeNode": "$ref:ZigbeeNode"
}
},
"Zigbee.NodeChanged": {
"description": "Emitted whenever a ZigBee node has changed.",
"params": {
"networkUuid": "Uuid",
"zigbeeNode": "$ref:ZigbeeNode"
}
},
"Zigbee.NodeRemoved": {
"description": "Emitted whenever a ZigBee node has removed from the network with the given 'networkUuid'.",
"params": {
"networkUuid": "Uuid",
"zigbeeNode": "$ref:ZigbeeNode"
}
} }
}, },
"types": { "types": {
@ -3043,6 +3099,20 @@
"permitJoiningEnabled": "Bool", "permitJoiningEnabled": "Bool",
"permitJoiningRemaining": "Uint", "permitJoiningRemaining": "Uint",
"serialPort": "String" "serialPort": "String"
},
"ZigbeeNode": {
"ieeeAddress": "String",
"lastSeen": "Uint",
"lqi": "Uint",
"manufacturer": "String",
"model": "String",
"networkAddress": "Uint",
"networkUuid": "Uuid",
"reachable": "Bool",
"receiverOnWhileIdle": "Bool",
"state": "$ref:ZigbeeNodeState",
"type": "$ref:ZigbeeNodeType",
"version": "String"
} }
} }
} }