BACnet/IP

BACnet (Building Automation and Control Networks) is a data communication protocol for building automation and control - HVAC, lighting, access control and similar building services. BACnet/IP carries BACnet traffic over UDP/IP, typically on the well-known port 47808.
The Go driver is the complete implementation: it reads and writes object properties, discovers devices on the network, and subscribes to change-of-value (COV) notifications. The Java driver is a passive listener: it joins the network and reports the COV notifications it observes, but has no working tag address syntax, so a subscription cannot be narrowed to a single object - every registered consumer receives all COV notifications seen on the network and has to filter them itself.
Supported Operations
| Name | Value | Description |
|---|---|---|
read | Go only. Reads one or more object properties via a tag address. | |
write | Go only. Writes one or more object properties, optionally at a given priority. | |
subscribe | Go and Java. Go subscribes to COV notifications for an object; Java receives all COV traffic broadcast on the network and cannot narrow it to a single object, since it has no working tag address syntax. |
Neither driver supports browse. The Go driver does support device discovery (WhoIs/IAm, Discoverer.go) - a separate PLC4X operation, reached through the discovery API rather than a browse request, that finds devices on the network rather than enumerating objects on one.
Connection String
BACnet/IP has the following connection string format:
bacnet-ip:{transport}://{ip-address}:{port}?{options}The only supported transport is udp:
bacnet-ip:udp://192.168.178.101:47808Connection String Options
Name
Type
Default Value
Required
Description
Name
BACnet/IP
Code
bacnet-ip
Maven Dependency
<dependency>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4j-driver-bacnet</artifactId>
<version>1.0.0</version>
</dependency>Default Transport
udp
Supported Transports
udp
Config options:
ede-file-path
FILE
Path to the location of a single EDE file, that contains the descriptor for the target device.
ede-directory-path
FILE
Path to the directory used for storing multiple EDE files. These files contain the descriptors for the possible target devices.
Transport config options:
udp
udp.local-address
STRING
Local address to bind to. If not set, binds to all interfaces.
udp.local-port
INT
0
Local port to bind to. 0 uses ephemeral port.
udp.read-timeout-ms
INT
0
Socket read timeout in milliseconds. 0 means no timeout.
udp.max-packet-size
INT
65507
Maximum UDP packet size in bytes.
udp.send-buffer-size
INT
0
Send buffer size in bytes. 0 uses system default.
udp.receive-buffer-size
INT
0
Receive buffer size in bytes. 0 uses system default.
udp.broadcast
BOOLEAN
false
Enable SO_BROADCAST for sending broadcast packets.
udp.reuse-address
BOOLEAN
false
Enable SO_REUSEADDR to allow multiple bindings to the same address/port.
udp.share-socket
BOOLEAN
false
Share the underlying UDP socket across multiple transport instances. When true, instances with the same localAddress:localPort will share a socket. This is useful for protocols where multiple logical connections share one UDP port.
udp.multicast-ttl
INT
1
Time-to-live for multicast packets (1-255).
Tag Addresses
Addressing is implemented in Go only. The Java driver receives broadcast traffic as subscriptions and has no working tag address syntax. See the protocol support matrix for what each implementation does.
General Format
<objectType>,<objectInstance>/<propertyIdentifier>[<arrayIndex>]{<writePriority>}[&<propertyIdentifier>[<arrayIndex>]{<writePriority>}]*objectType
A BACnet object type, either by name (ANALOG_INPUT, ANALOG_VALUE, ANALOG_OUTPUT, …) or as a numeric proprietary type identifier.
objectInstance
The object’s numeric instance number.
propertyIdentifier
One or more property identifiers, joined by &, each by name (PRESENT_VALUE, OBJECT_NAME, DESCRIPTION, UNITS, PRIORITY_ARRAY, …) or as a numeric proprietary property identifier.
[arrayIndex]
Optional. Selects a single element of an array-valued property. This is not the unified array notation - it addresses one scalar element of a BACnet array property, not a run of consecutive values.
{writePriority}
Optional, write only. The BACnet priority (1-16) at which the write is issued.
Data Types
BACnet tags carry no :{data-type} suffix. The value’s type is determined from the object and property being read or written, not selected on the address.
Examples
| Address | Meaning |
|---|---|
ANALOG_INPUT,1/PRESENT_VALUE | present value of analog input 1 |
12345,7/4242 | proprietary property 4242 of proprietary object type 12345, instance 7 |
ANALOG_VALUE,2/PRESENT_VALUE[3] | element 3 of analog value `2’s present-value array |
ANALOG_OUTPUT,1/PRESENT_VALUE{8} | write the present value of analog output 1 at priority 8 |
ANALOG_OUTPUT,5/PRESENT_VALUE[2]{16} | write element 2 of analog output 5’s present-value array, at priority `16 |
ANALOG_INPUT,1/PRESENT_VALUE&OBJECT_NAME&UNITS | present value, object name and units of analog input 1 in one read |
ANALOG_VALUE,5/PRESENT_VALUE[1]&PRIORITY_ARRAY[16] | element 1 of the present-value array and element 16 of the priority array of analog value 5 |
Table 1. Examples
评论
登录后参与评论
KnowForge