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

volttron csv driver agent troubleshoot

任何人都可以给我一两个关于 volttron 7.0 环境的提示,我在尝试让我修改的 CSV driver agent script 工作以在 BACnet 控制器上上下调整 BACnet 设定点时遇到一些麻烦实例 ID 设置为 29。我想我可能在尝试引用此设置点进行调整的脚本的第 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)。可能值得检查一下 original CsvDriverAgent and it's config file to get a better feel for that pattern. Your point topic looks good, given the examples above. Additionally, I strongly recommend that you use vpkg --init to create a new control agent, that way you don't have any relics of the CsvDriverAgent to distract you as you develop. The CsvDriverAgent was created to demonstrate driver communication from the standpoint of the agnet, but it is not a very good basis for an agent as the configuration, and control algorithm are intentionally overly simple and not practical. Additionally, going through the agent creation process start to finish is likely to help you build out a stronger foundation of understanding, both of VOLTTRON Core, but also of your own product. And just to have another reference tool, here's our instructions on BACnet router addressing(您在这里看到的确实正确,但参考文献很好!)