BACnet

From HSYCO
Jump to: navigation, search

BACnet is a protocol developed by ASHRAE for building automation and control networking, specifically designed to meet the communication needs of building automation and control systems for applications such as heating, ventilating, air-conditioning control, lighting control, access control and fire detection systems. HSYCO conforms to a functional subset of the BACnet protocol, as defined in ANSI/ASHRAE Standard 135-2010. HSYCO can only be configured as a BACnet/IP client device. BACnet support is implemented as an I/O Server with a data point representation that you can use in the EVENTS language and Java to read and write BACnet’s objects and properties, and to manage asynchronous notification services.

The BACnet Vendor Identification Number that has been issued by ASHRAE to Home Systems Consulting SpA is 590.

Communication

HSYCO supports BACnet/IP, where the BACnet messaging protocol is transported over standard IP networks, over local networks. Routing of BACnet traffic is currently not supported by the HSYCO BACnet/IP I/O Server. You should configure only one I/O Server for each LAN used for BACnet traffic. Support for multiple BACnet/IP local networks is achieved by configuring one I/O Server for each network.

Note The BACnet I/O Server supports segmented messages, but only for Read-Property-Response messages.

HSYCO Configuration

Add a BACNET I/O Server in the I/O Servers section of the Settings and set its parameters:

Communication

  • IP Address: broadcast IP address of the LAN used for BACnet traffic (e.g. 192.168.1.255)
  • IP Port: TCP/IP port to use, leave blank to use default port 47808.

High Availability

  • Shutdown when inactive: defaults to false.

Options

ID Default Values Description
deviceid 590001 0 ... 4194303 BACnet device identifier assigned to the HSYCO BACnet client
disableverbosedump false true when verbose log is enabled, don’t write IP packets dump to the log files
false when verbose log is enabled, all BACnet IP packets are written to the log files
eventslog false true if the general eventsLog option is also true in System Settings, BACnet events for this gateway are written in the log files
false BACnet events for this gateway are not written in the log files, even if the eventsLog option is true in System Settings
gui false true enables support of the (bacnetutility) Web GUI object
false disables support for the Web GUI

BACnet Utility

The BACnet Utility provides a graphical interface to browse all BACnet/IP devices available on the network, to show all objects of a device, and all properties and values of any object instance.

Datapoints

The following services are supported:

  • Alarm and Event Services:
    • ConfirmedCOVNotification
    • UnconfirmedCOVNotification
    • SubscribeCOV
  • Object Access Services:
    • ReadProperty
    • WriteProperty
  • Remote Device Management Services:
    • Who-Is
    • I-Am


The BACnet I/O Server supports all standard object types and properties for the ReadProperty service, while object’s properties that could be written using the WriteProperty service are listed in the supported object types table.

Following HSYCO’s naming convention for BACnet, all object types and properties are written in lowercase letters with no spaces or underscore characters. For example, Present_Value is written as “presentvalue”, and the binary input object type is written as “binaryinput”.

The BACnet datapoint names always begin with the same format:

<device_id>.<object_type>.<object_id>

where <device_id> is the BACnet device numeric identifier, <object_type> is the object type name with no spaces and all lowercase and <object_id> is the object instance numeric identifier.

Data point names returning properties values also have the object property identifier at the end with no spaces and all lowercase characters:

<device_id>.<object_type>.<object_id>.<property_id>

For example this datapoint

123.analogoutput.1.presentvalue

represents the present value of the analog output BACnet object "1" of the BACnet device "123".

Datapoints Table

ID Value R/W Description
<device_id>.<object_type>.<object_id> readproperty:<property_id> W executes the ReadProperty Service request, reading the <property_id> property of the <device_id>.<object_type>.<object_id> object
<device_id>.<object_type>.<object_id>.<property_id> <value> R the <property_id> property <value> read from <device_id>.<object_type>.<object_id> object, formatted according to the application datatype
<device_id>.<object_type>.<object_id>[<N>] readproperty:<property_id> W executes the ReadProperty Service request, reading the <property_id> property of the <device_id>.<object_type>.<object_id> object at index [<N>]
<device_id>.<object_type>.<object_id>.<property_id>[<N>] <value> R the <property_id> property <value> read from <device_id>.<object_type>.<object_id> object, formatted according to the application datatype. (if this property is an array of values)
<device_id>.<object_type>.<object_id> writeproperty:<property_id>:<value> W executes the WriteProperty Service request, writing <value> in the <property_id> property of <device_id>.<object_type>.<object_id> object , without specifying the priority
<device_id>.<object_type>.<object_id> writeproperty/<P>:<property_id>:<value> W executes the WriteProperty Service request, writing <value> in the <property_id> property of <device_id>.<object_type>.<object_id> object , specifying the priority <P>, as a number from 1 to 16
<device_id>.<object_type>.<object_id> writeproperty/<P>:<property_id> W cancel the last value set at priority <P> in the <property_id> property of <device_id>.<object_type>.<object_id>
<device_id>.<object_type>.<object_id>[<N>] writeproperty:<property_id>:<value> W executes the WriteProperty Service request, writing <value> in the <property_id> property array index <N> of <device_id>.<object_type>.<object_id> object , without specifying the priority
<device_id>.<object_type>.<object_id>[<N>] writeproperty/<P>:<property_id>:<value> W executes the WriteProperty Service request, writing <value> in the <property_id> property array index <N> of <device_id>.<object_type>.<object_id> object , specifying the priority <P>, as a number from 1 to 16
<device_id>.<object_type>.<object_id>[<N>] writeproperty/<P>:<property_id> W cancel the last value set at priority <P> in the <property_id> property of <device_id>.<object_type>.<object_id> object
<device_id>.<object_type>.<object_id> subscribecov W sends a SubscribeCOV request with an indefinite lifetime for <device_id>.<object_type>.<object_id> object
<device_id>.<object_type>.<object_id> subscribecov:confirmed W sends a SubscribeCOV request with an indefinite lifetime and the confirmed notifications option enabled for <device_id>.<object_type>.<object_id> object
<device_id>.<object_type>.<object_id> subscribecov:unconfirmed W sends a SubscribeCOV request with an indefinite lifetime and the confirmed notifications option disabled for <device_id>.<object_type>.<object_id> object
<device_id>.<object_type>.<object_id> subscribecov:cancel W sends a SubscribeCOV cancellation request for <device_id>.<object_type>.<object_id> object

Supported Object Types

Object Type Writable Properties
accumulator
  • description
  • devicetype
  • presentvalue
  • pulserate
  • valuebeforechange
  • valueset
analoginput
  • description
  • devicetype
  • covincrement
  • presentvalue
analogoutput
  • description
  • devicetype
  • covincrement
  • presentvalue
  • relinquishdefault
analogvalue
  • description
  • covincrement
  • presentvalue
  • relinquishdefault
averaging
  • attemptedsamples
  • description
  • windowinterval
  • windowsamples
binaryinput
  • activetext
  • description
  • devicetype
  • inactivetext
  • presentvalue
binaryoutput
  • activetext
  • description
  • devicetype
  • inactivetext
  • presentvalue
  • relinquishdefault
binaryvalue
  • activetext
  • description
  • inactivetext
  • presentvalue
  • relinquishdefault
command
  • description
  • presentvalue
lifesafetypoint
  • description
  • devicetype
  • mode
  • reliability
  • trackingvalue
lifesafetyzone
  • description
  • devicetype
  • mode
  • reliability
  • trackingvalue
loop
  • covincrement
  • description
multistateinput
  • description
  • devicetype
  • presentvalue
multistateoutput
  • description
  • devicetype
  • presentvalue
  • relinquishdefault
multistatevalue
  • description
  • presentvalue
program
  • description
  • programchange
pulseconverter
  • adjustvalue
  • covincrement
  • description
  • presentvalue
accessdoor
  • description
  • dooralarmstate
  • doorstatus
  • lockstatus
  • presentvalue
  • relinquishdefault
loadcontrol
  • description
  • enable
  • requestedshedlevel (as Real number)

Supported Application Datatypes

Tag# Description HSYCO Data Type
0 Null null
1 Boolean 0: false

1: true

2 Unsigned Integer 0 ... (232 - 1)
3 Signed Integer -231 ... (231 - 1)
4 Real (IEEE-754 floating point) floating point number (with decimal point separator)
5 Double (IEEE-754 double precision floating point) double precision floating point number (with decimal point separator)
6 Octet String the hexadecimal representation of byte values, for example: “3b0ac2ff”
7 Character String a string. The default character set is UTF-8. Additional supported character sets are: ISO-8859-1, UCS-2, EUC-JP
8 Bit String a string representing a sequence of bit values, for example: “111010001”
9 Enumerated 0 ... (232 - 1)
10 Date <yyyy>/<mm>/<dd>[/<dow>]

<yyyy> is the year number; a * character is a wildcard matching any year, or an unspecified value.

<mm> is the month number, with January as 1; a * character is a wildcard matching any month, or an unspecified value; “odd” represent all odd months; “even” represent all even months.

<dd> is the day number, starting from 1 for the first day of the month; a * character is a wildcard matching any day, or an unspecified value; “odd” represent all odd days; “even” represent all even days; “last” represent the last day of the month.

<dow> is the week day, and is only present if set to a day of the week, and not to the wildcard/unspecified value; days are represented as “mon”, “tue”, “wed”, “thu”, “fri”, “sat”, “sun”

11 Time <hh>:<mm>:<ss>.<ff>

<hh> is the hour, using a 24-hour clock from 0 to 23; a * character is a wildcard matching any hour, or an unspecified value.

<mm> is the minute, from 0 through 59; a * character is a wildcard matching any minute, or an unspecified value.

<ss> is the seconds, from 0 through 59; a * character is a wildcard matching any second, or an unspecified value.

<ff> is the hundreds of seconds number, from 0 to 99; a * character is a wildcard matching any fraction of second, or an unspecified value.

12 BACnetObjectIdentifier <object_type>.<object_id>

<object_type> is represented with the type name for supported types, and with the BACnet object type number for unsupported objects.

<object_id> is the object instance number

Examples

Reading the present value of an object

TIME : IO bac.123.analogoutput.1 = readproperty:presentvalue
IO bac.123.analogoutput.1.presentvalue : uiset mydata.text = IO bac.123.analogoutput.1.presentvalue

The first line executes the ReadProperty service to poll device 123 for the value of the Present Value property of object type Analog Input, instance 1. The second line sets a text object of the Web interface with the value read from the BACnet device.

Reading several values at once

HSYCOSTART : PROGRAMTIMER readbacnet = repeat 10
PROGRAMTIMER readbacnet : IO bac.123.analogoutput.1 bac.123.analogoutput.2 = readproperty:presentvalue
IO bac.123.analogoutput.1.presentvalue : uiset mydata1.text = IO bac.123.analogoutput.1.presentvalue
IO bac.123.analogoutput.2.presentvalue : uiset mydata2.text = IO bac.123.analogoutput.2.presentvalue

The second line is a compact form for issuing the ReadProperty service for multiple objects. The first line shows how to create a programtimer instance that is executed every 10 seconds.

Writing the present value of an object

USER bac = 5 : IO bac.21.pulseconverter.0 = writeproperty:adjustvalue:-3
TIME : IO bac.21.analogvalue.0 = writeproperty/14:presentvalue: $myvalue

The first line sets the Adjust Value property of object type Pulse Converter, object instance 0 in device 21 to the value -3. The second line is similar, but this time the priority is set to 14. Also note that the value after “presentvalue:” is from a variable. To ensure that the variable name is translated to its value, leave a space before the variable name. This way the EVENTS interpreter will automatically concatenate the strings, also replacing the variable name with its value.

Subscribe for change of value notifications

TIME : IO bac.21.analoginput.0 bac.21.binaryinput.2 = subscribecov
TIME : IO bac.21.binaryvalue.0 = subscribecov:unconfirmed

The first line sends a SubscribeCOV request, with confirmed notifications, for two distinct objects. The second line also sends a SubscribeCOV request, but with unconfirmed notifications. This is a less reliable notification mechanism, but more efficient in terms of network usage and devices workload.

Cancel change of value notifications

TIME : IO bac.21.analoginput.0 bac.21.binaryinput.2 = subscribecov:cancel

This command cancels the previous change of value notification request.

Release Notes

3.4.0

  • added support for segmented messages, limited to Read-Property-Response

3.3.0

  • added support for the Relinquish_Default property
  • the BACnet Utility is now fully integrated in the Manager tools

3.1.0

  • initial release


BACnet is a registered trademark of the American Society of Heating, Refrigerating and Air-Conditioning Engineers, Inc.