Skip to content

Configuration

Joel Bender edited this page Jun 5, 2019 · 1 revision

BACnet Masquerade Router Configuration

The BACnet Masquerade Router (BMR) application requires more planning than other BACnet networking configuration tools because of the large number of parameters that need to be centrally coordinated. Each site, a supervisory site or a building automation site, will have some communication networking parameters in common.

BMR Configuration In Stages

This section describes a multi-site configuration with the necessary components that are required in each section, along with notes if the parameter value is identical in multiple configuration files, unique within a the entire collection of configurations, or is building automation site specific.

JSON Configuration File

The BMR configuration files are JSON encoded and the documentation in this section will use JSON Path notation to reference the individual pieces. For example:

    {
        "a": 1,
        "b": {
            "c": 2
        },
        "d": [ 3 ],
        "e": [
            {
                "f": 4
            }
        ]
    }

Some sample paths are:

Value Path
1 $.a
2 $.b.c
3 $.d[0]
4 $.e[0].f

Device Addresses

There are three types of BACnet addresses in the configuration; (1) IPv4 addresses, (2) MQTT VLAN addresses, and (3) vitual network addresses.

BACpypes IPv4 Addresses

BACpypes used an extended CIDR notation for IPv4 addresses.

MQTT VLAN Addresses

The current BACnet/MQTT proposal uses 3-octet addresses and these are written in hexidecimal notation such as 0x010203.

Virtual Network Addresses

The virtual network within the BMR uses single octet addresses as unsigned integers in the range 2..254.


Config 1 Config 1

Assume there are two sites, Site A is a supervisory site and Site B is one of the building automation sites that are being supervised.


Site A Configuration

Config 2 Config 2

1: MQTT Broker

Find or create an MQTT broker on a network that can be reached with outbound TCP connections from all of the sites. This may be a cloud service or a physical or virtual machine running the broker software. The broker connection information is in the $.broker section of the configuration file and has these subcomponents:

$.broker.host ...

$.broker.port ...

$.broker.keepalive ...

$.broker.lan ...

The host, port, and lan parameters are identical with all of the configuration files. The keepalive parameter is usually identical.

2: Supervisory Network Number

BACnet network numbering for the supervisory intranet starts with the workstation. There may be multiple BACnet networks already at the site and these network numbers should be gathered together so there will not be any conflicts with new networks assigned to the MQTT network and the BMR virtual networks.

The network number is net1 parameter of the IPv4/MQTT router and does not appear in a BMR configuration file.


Config 3 Config 3

3: MQTT Network Number

This is a new, unused network number that will be reserved for the MQTT broker as a BACnet Virtual Link Layer. This is set in all of the configuration files as $.broker.network and is also used as the net2 parameter of the IPv4/MQTT router.


Config 4 Config 4

4:

The IPv4/MQTT router will have a local IPv4 address in CIDR notation such as 192.168.1.13/24, this is the value of addr1 parameter for the router and does not appear in a BMR configuration file.

5:

The router will also have a BACnet/MQTT virtual network address, a 3-octet value in hexidecimal notation such as 0x010203. This is the addr2 parameter and does not appear in a configuration file. The address must be unique with respect to the MQTT virtual network with all of the routers or BMRs that share the network.


Site B Configuration

Config 5 Config 5

The BMR has two BACnet Devices, an outside device and an inside device.

6: Virtual Network Number

This is the network number of the collection of virtual devices that proxy for real devices. This is the $.vlan.network value and must be unique for the entire BACnet/MQTT network topology.

7:

The outside device has a BACnet/MQTT virtual network address, a 3-octet value in hexidecimal notation such as 0x020304 and must be unique amongst all of the connections to the broker. This is the $.outside._deviceAddress settings value.

8:

The BMR internal router object has a virtual network address 1. This setting does not appear in the configuration file.


Proxy Device Configuration

Config 6 Config 6

9: Proxy Device Identifier

This is the device identifier of the proxy device as it appears to the workstations and other devices at Site A. It is in the value of $.vlan.devices[0].objectIdentifier and must be unique.

For many networks with less than one hundred virtual devices it is common for the device identifier to be the network number times one hundred plus the network address, i.e., "100 * net + addr".

10: Proxy Virtual Network Address

This is the network address of the proxy device as it appears to the workstations and other devices at Site A. It is the value of $.vlan.devices[0]._deviceAddress and must be greater than one (1) which is reserved for the router and unique to all of the other proxy devices within the BMR.

11: Real Device Identifier

This is the device identifier of the real device inside the network of Site B. It is the value of $.vlan.devices._proxyIdentifier and is unique within the BACnet network of Site B.

12: Real Device Network Address

This is the BACnet network address of the real device inside the network of Site B. It is the value of $.vlan.devices[0]._proxyAddress and is unique within the BACnet network of Site B.


Another Proxy Device Configuration

Config 7 Config 7

This proxy device configuration is the settings in the $.vlan.devices[1] object in the configuration.

13: Proxy Device Identifier

Similar to the first proxy device, this identifier is the value of $.vlan.devices[1].objectIdentifier. It must be a different value than (9) above.

14: Proxy Virtual Network Address

Similar to the first proxy device, this is the network address of the proxy device as it appears to the workstations and other devices at Site A. It is the value of $.vlan.devices[0]._deviceAddress and must be greater than one (1) which is reserved for the router and unique to all of the other proxy devices within the BMR.

15: Real Device Identifier

This is similar to the first proxy device, the identifier of the real device and is the value of $.vlan.devices[1].objectIdentifier. It must be a different value than (11) above.

16: Real Device Network Address

Similar to the first proxy device, this is the BACnet network address of the real device inside the network of Site B. It is the value of $.vlan.devices[1]._proxyAddress and is unique within the BACnet network of Site B. By the nature of being a different device in Site B it will have a different value than (12).


Inside Device Configuration

Config 8 Config 8

The inside device object and its communication stack appears as a simple BACnet client to the other devices in Site B. This BACnet device will initiate BACnet requests on behalf of the virtual devices. As a simple device it only responds to Who-Is requests, and Read Property requests of its device object. It will initiate any requests that are sent to the virtual devices by the supervisory workstation.

17: Inside Device Identifier

This device identifier must be unique within Site B, it is the value of $.inside.objectIdentifier.

18: Inside Device Network Address

This IPv4 address is the inside address for the site.