Skip to content

Associations API

Marcus Davies edited this page Jun 16, 2022 · 5 revisions

The Associations API allows you to manage automations between specific devices,
using the Z-Wave Associations Specification. The commands make use of an AssociationAddress object detailed below.

/* The Association Address Object */
{
    nodeId: Number,
    endpoint: Number /* (optional - defaults to 0) */
}

getAssociationGroups

Obtains the Association Groups, for the specified Address

let Message = {
    payload: {
        mode: "AssociationsAPI",
        method: "getAssociationGroups",
        params: [<AssociationAddress>]
    }
}
return Message

getAllAssociationGroups

Obtains all the Association Groups, for the specified node

let Message = {
    payload: {
        mode: "AssociationsAPI",
        method: "getAllAssociationGroups",
        params: [<NodeID>]
    }
}
return Message

getAssociations

Obtains the current Associations, for the specified address

let Message = {
    payload: {
        mode: "AssociationsAPI",
        method: "getAssociations",
        params: [<AssociationAddress>]
    }
}
return Message

getAllAssociations

Obtains all the Associations, for the specified node

let Message = {
    payload: {
        mode: "AssociationsAPI",
        method: "getAllAssociations",
        params: [<NodeID>]
    }
}
return Message

addAssociations

Adds the collection of Associations, to the specified address and Group ID

let Message = {
    payload: {
        mode: "AssociationsAPI",
        method: "addAssociations",
        params: [<AssociationAddress>,<GroupID>,[<AssociationAddress>,<AssociationAddress>]]
    }
}
return Message

removeAssociations

Removes the the collection of Associations from the Association Address and Group ID

let Message = {
    payload: {
        mode: "AssociationsAPI",
        method: "removeAssociations",
        params: [<AssociationAddress>,<GroupID>,[<AssociationAddress>,<AssociationAddress>]]
    }
}
return Message

removeNodeFromAllAssociations

Removes the specified node, form all associations

let Message = {
    payload: {
        mode: "AssociationsAPI",
        method: "removeNodeFromAllAssociations",
        params: [<NodeID>]
    }
}
return Message