volttron csv驱动程序代理故障排除



有人能给我一两个关于volttron 7.0环境的提示吗?在这个环境中,我在尝试让我修改的CSV驱动程序代理脚本在实例ID设置为29的BACnet控制器上上上下调整BACnet设置点时遇到了一些困难。我想我可能在脚本的第182行(point_topic = self.topic + "/" + "ZN-SP"(遇到了一个问题,试图引用这个设置点来调整:(很抱歉格式化(

nt.core ERROR: unhandled exception in periodic callback
Traceback (most recent call last):
File "/var/lib/volttron/volttron/platform/vip/agent/core.py", line 117, in _loopntmethod(*self.args, **self.kwargs)
File "/home/volttron/.volttron/agents/c531de8a-8b84-404c-8a15-5e2075bea98d/CsvDrAgentagent-0.1/CsvDriverAgent/agent.py", line 182, in actuate_point
result = self.vip.rpc.call(
File "src/gevent/event.py", line 305, in gevent._gevent_cevent.AsyncResult.get
File "src/gevent/event.py", line 335, in gevent._gevent_cevent.AsyncResult.get
File "src/gevent/event.py", line 305, in gevent._gevent_cevent.AsyncResult.get
File "src/gevent/event.py", line 305, in gevent._gevent_cevent.AsyncResult.get
File "src/gevent/event.py", line 323, in gevent._gevent_cevent.AsyncResult.get
File "src/gevent/event.py", line 303, in gevent._gevent_cevent.AsyncResult._raisng e_exception
File "/var/lib/volttron/env/lib/python3.8/site-packages/gevent/_compat.py", line
66, in reraise
raise value
tins.KeyError('devices/slipstream_internal/slipstream_hq/29')")

有人能告诉我们如何解决这个问题吗?在这个设备上,如果我进行vctl config get platform.driver devices/slipstream_internal/slipstream_hq/29,它将打印:

{
"driver_config": {
"device_address": "12:29",
"device_id": 29
},
"driver_type": "bacnet",
"registry_config": "config://registry_configs/29.csv"
}

这应该是在BACnet发现过程中为该设备保存的注册表配置。过滤以仅显示ZN-SP:

Reference Point Name,Volttron Point Name,Units,Unit Details,BACnet Object Type,Property,Writable,Index,Write Priority,Notes
ZN-SP,ZN-SP,degreesFahrenheit,69.76 to 72.76 (default 72.5),analogValue,presentValue,TRUE,1103,,Zone Setpoint

非常感谢任何提示。。。用BACnet扫描工具测试这一点,它是可写的。。

设备实例在PlatformDriver中由devices/后面的主题部分映射,因此在本例中,self.topic = 'devices/slipstream_internal/slipstream_hq/29'应为self.topic = 'slipstream_internal/slipstream_hq/29'(这就是您看到上面KeyError的原因(。可能值得查看原始CsvDriverAgent及其配置文件,以更好地了解该模式。举了上面的例子,你的主题看起来不错。此外,我强烈建议您使用vpkg --init创建一个新的控制代理,这样您就不会有CsvDriverAgent的任何遗迹在开发过程中分散您的注意力。创建CsvDriverAgent是为了从磁体的角度演示驱动程序通信,但它不是作为配置的代理的良好基础,并且控制算法故意过于简单且不实用。此外,从头到尾完成代理创建过程可能有助于您建立更牢固的理解基础,既了解VOLTRON Core,也了解您自己的产品。还有另一个参考工具,这里是我们关于BACnet路由器寻址的说明(你在这里得到的似乎是正确的,但参考很好!(

最新更新