BACnet: Read Node

The BACnet: Read Node allows you to read multiple properties across multiple objects from your BACnet device. This node is only available in Edge Workflows.

Configuration

There are three main properties that require configuration for this node.

Connection Config

BACnet Read Node Configuration

The Connection Configuration property contains three fields:

  • Host Template: (Required) A string template for the IP address at which the device resides.
  • Port Template: (Optional) A string template or integer for the HTTP port. It defaults to port 47808.
  • APDU Timeout Template: (Optional) A string template or integer to determine the time in milliseconds until a transaction should be interpreted as an error.

Read Instructions

BACnet Read Node Instructions

Read Instructions can be specified in one of two ways, and it is required that one Read Instruction option is configured.

  • Array of Template Strings: For each Read Instruction, fill out the following input configuration fields, all of which support templating. You must define at least one instruction:

    • Object Type: (Required) This field can either be an integer or a template but it must resolve to a valid object type value.
    • Object Instance: (Required) This field can either be an integer or a template but it must resolve to a valid instance number. This should resolve to an integer between 0 to 4,194,302 inclusive.
    • Object Property ID: (Required) This field can either be an integer or a template but it must resolve to a valid property identifier value.
    • Result Key: (Required) The key at which to store the result of this read operation. This key will exist on the Result Path defined below the instructions. This can resolve to any string except errors, since that key is reserved for any errors that occur during reads.
  • Payload Path: Enter a payload path that resolves to an array of Read Instructions to be run on this node. The following are the object properties that each object in the array should contain for successful attempts:

    • type: (Required) This field can either be a integer or a template but it must resolve to a valid object type value.
    • instance: (Required) This field can either be an integer or a template but it must resolve to a valid instance number. This should resolve to an integer between 0 to 4,194,302 inclusive.
    • propertyId: (Required) This field can either be an integer or a template but it must resolve to a valid property identifier value.
    • key: (Required) The key (Result Key) at which to store the result of this read operation. This key exists on the Result Path defined below the instructions. This can resolve to any string except errors, since that key is reserved for any errors that occur during reads.

The following is an example of an array:

[
  {
    "type": 0,
    "instance": 8,
    "propertyId": 3,
    "key": "bacnetReadKey1"
  }
]

Result

BACnet Read Node Result

The results of each read instruction will be placed in an object at the Result Path (a payload path) at each instruction’s Result Key. Each key should be uniquely named so the node does not overwrite another read result.

If the key is not present in the Destination Path of the payload, the read has failed, and a list of errors at the Destination Path under the errors key displays. Because of this, this node prevents Result Keys from resolving to the errors path.

Each key should be uniquely named so the node does not overwrite another read result.

If the key is not present, the read failed, and there is a list of errors at the Destination Path under errors. Because of this, this node prevents Result Keys from resolving to the errors path.

Node Example

The following is an example of a successful read, where type is 0, instance is 0, propertyId is 85, result key is key1 and the Destination Path is destination:

"destination": {
  "key1": [
    {
      "id": 85,
      "index": 4294967295,
      "value": [ { "value": 71.9000015258789, "type": 4 } ]
    }
  ]
}

Node Errors

The following is an example of a failure to read, where a resultKey should have been bacnetKey1, and the destination path is destination.bacnetReadOutput:

"destination": {
  "bacnetReadOutput": {
    "success": false,
    "errors":{
      "type": "BACNET_READ_ERROR",
      "message": "Something useful to help you fix the issue."
    }
  }
}

References

Was this page helpful?


Still looking for help? You can also search the Losant Forums or submit your question there.