1

I am trying to configure bacnet proxy agent in Volttron Project and for some reason i am getting this error in volltron.log when i start the proxy agent:

Can you please guide whether I am doing anything wrong in configuration files ? For IP address of device I have tried three variants in config files:

  1. IPADDRESS/24
  2. IPADDRESS
  3. IPADDRESS:PORT(47808)

Where <> is the ip address of device.

Unfortunately none of these work.

Here is the following description of various files:

============================VOLTTRON LOG================================

2016-06-28 13:55:31,888 (bacnet_proxyagent-0.1 7777) <stderr> 
ERROR: socket.error: [Errno 99] Cannot assign requested address

==========================================================================

=====================BACNET PROXY AGENT CONFIG==========================

"agentid": "bacnet_proxy",

#Maximum APDU legnth accepted
#This setting determines the largest APDU accepted by the Volttron BACnet virtual device.
    #Valid options are 50, 128, 206, 480, 1024 (default), and 1476
    "max_apdu_length": 480,

    #ID of the Device object of the virtual bacnet device.
    #Defaults to 599
    "object_id": 570009,

    #Name of the bacnet network object
    #Defaults to "Volttron BACnet driver"
    #"object_name": "Volttron BACnet driver",

    #Vendor ID of the virtual bacnet device.
    #Defaults to 15
    "vendor_id": 24,

    #Required, use this network interface for the virtual device.
    "device_address": "192.168.1.9"

I ran the volttron/scripts/bacnet/bacnet_scan.py and the following was the result:

Device Address        = <Address 192.168.1.9>
Device Id             = 570009
maxAPDULengthAccepted = 480
segmentationSupported = segmentedBoth
vendorID              = 24
Device Address        = <RemoteStation 5701:37>
Device Id             = 990037
maxAPDULengthAccepted = 480
segmentationSupported = segmentedBoth

vendorID = 24

4

2 回答 2

3

这是一个常见的错误。当您设置 bacnet 代理时,您实际上是在创建一个新的 BACnet 设备并将其放到网络上。然后,VOLTTRON 平台 BACnet 驱动程序使用此设备与网络上的设备进行通信。

该设备与网络上的任何其他设备没有任何共同之处,除了它将通过其进行通信的端口。

从 BACnet 代理文档:

device_address - 绑定到网络端口的地址,在运行 VOLTTRON 的计算机上将通过该网络端口进行 BACnet 通信。这不是任何目标设备的地址。

http://volttron.readthedocs.io/en/develop/core_services/drivers/BACnet-Proxy-Agent.html

例如,如果您的 VOLTTRON 安装在 IP 为 192.168.1.2 的机器上,您可以将其用于 BACnet 代理配置文件中的device_address设置。

它将与您在 volttron/scripts/bacnet/BACpypes.ini 中用于“地址”设置的值相同,以使 bacnet_scan.py 脚本工作。

这是必要的,因为 BACnet 协议使用 UDP 进行所有通信,并且必须打开一个端口来监听响应。

您还必须在代理配置中将“object_id”设置改回 599。根据 bacnet_scan 的输出,使用 570009 会导致与您尝试设置的设备发生冲突。在 BACnet 中,这是设备 ID。BACnet 网络上的所有设备 ID 必须是唯一的。

您希望与之通信的设备的地址用于 MasterDriverAgent 配置中特定设备的配置。

例如,像这样的 MasterDriverAgent 配置:

{
    "agentid": "master_driver",
    "driver_config_list": [
        "/home/volttron/volttron/examples/configurations/drivers/bacnet.config"                 
    ]
}

您可以将目标设备地址放在 bacnet.config 中:

{
    "driver_config": {"device_address": "192.168.1.9",
                      "device_id": 570009},
    "campus": "campus",
    "building": "building",
    "unit": "bacnet1",
    "driver_type": "bacnet",
    "registry_config":"/home/volttron/volttron/examples/configurations/drivers/bacnet.csv",
    "interval": 60,
    "timezone": "UTC"
}
于 2016-06-28T22:49:39.580 回答
2

换句话说,进入代理配置的 device_address 是您的本地地址,因此 bacnet 驱动程序可以绑定到设备上的接口。

于 2016-06-28T22:59:25.733 回答