VOLTTRON调用set_point报KeyError: '500001'问题排查求助
排查与修复步骤
修正set_point的topic参数格式
你当前传入的meter_topic仅使用了500001/input-power-meter,但VOLTTRON中设备的完整路径是devices/slipstream_internal/slipstream_hq/500001,Actuator的set_point接口要求传入完整设备路径+点位名的组合。修改后的topic应如下:meter_topic = "devices/slipstream_internal/slipstream_hq/500001/input-power-meter"替换后重新调用接口即可。
验证设备配置有效性
用以下命令确认设备配置已正确存储:vctl config get platform.driver devices/slipstream_internal/slipstream_hq/500001同时检查registry配置文件,确保
input-power-meter点位存在:vctl config get platform.driver registry_configs/500001.csv确保platform_driver加载配置
重启platform_driver agent,让新配置生效:vctl restart platform.driver查看agent日志确认设备实例初始化成功:
vctl log platform.driver日志中应出现类似
Successfully initialized device: devices/slipstream_internal/slipstream_hq/500001的提示。检查写入权限
确认你的rtuloadshedagent拥有该设备的写入权限,在权限配置文件中添加对应条目:{"allow": [{"identity": "rtuloadshedagent-0.1", "object": "devices/slipstream_internal/slipstream_hq/500001", "action": "write"}]}然后更新权限存储:
vctl config store platform.actuator permissions <权限文件名>.json
内容的提问来源于stack exchange,提问作者bbartling
相关产品推荐
相关产品推荐

