我试图在伏尔坦项目中配置bacnet代理,由于某些原因,我在启动代理代理时在volltron.log中得到了这个错误:
你能指导我在配置文件中是否做错了什么吗?对于设备的IP地址,我尝试了配置文件中的三个变体:
其中<>是设备的ip地址。
不幸的是,这些都不起作用。
以下是对各种文件的描述:
============================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代理代理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"我运行了volttron/scripts/bacnet/bacnet_scan.py,其结果如下:
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 = segmentedBothvendorID = 24
发布于 2016-06-28 22:49:39
这是一个常见的错误。当您设置bacnet代理时,本质上您正在创建一个新的BACnet设备并将其放到网络上。然后,VOLTTRON平台BACnet驱动程序使用此设备与网络上的设备进行通信。
该设备将与网络上的任何其他设备没有任何共同之处,除非它将通过该端口进行通信。
来自BACnet代理文档:
device_address -绑定到将在运行VOLTTRON的计算机上进行BACnet通信的网络端口的地址。这是,而不是,任何目标设备的地址。
服务/驱动程序/BACnet-Proxy-Agent.html
例如,如果您的VOLTTRON安装在IP为192.168.1.2的机器上,您将在BACnet代理配置文件中使用它作为BACnet设置。
它将与您在volttron/scripts/bacnet/BACpypes.ini中使用的值相同,用于"address“设置,以使bacnet_scan.py脚本工作。
这是必要的,BACnet协议使用UDP进行所有通信,并且必须打开一个端口来侦听响应。
您还必须将代理配置中的"object_id“设置更改为599。基于使用570009的bacnet_scan输出的将导致与您试图安装的设备发生冲突。用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-28 22:59:25
换句话说,进入代理配置的device_address是您的本地地址,以便bacnet驱动程序可以绑定到设备上的接口。
https://stackoverflow.com/questions/38086466
复制相似问题