volttron

volttron troubleshoot rpc call get_point


Any chance for a tip on how to troubleshoot a simple get_point rpc call to a BACnet device? Something I am doing on the rpc call throws this error: 'DriverAgent\' object has no attribute \'interface\'

This is my device: vctl config get platform.driver registry_configs/33333.csv

That prints:

[
  {
    "Reference Point Name": "signal_payload",
    "Volttron Point Name": "signal_payload",
    "Units": "percent",
    "Unit Details": "(default 0.0)",
    "BACnet Object Type": "analogValue",
    "Property": "presentValue",
    "Writable": "FALSE",
    "Index": "0",
    "Write Priority": "",
    "Notes": "Open ADR Payload Signal"
  },
  {
    "Reference Point Name": "int_signal_duration",
    "Volttron Point Name": "int_signal_duration",
    "Units": "percent",
    "Unit Details": "(default 0.0)",
    "BACnet Object Type": "analogValue",
    "Property": "presentValue",
    "Writable": "FALSE",
    "Index": "1",
    "Write Priority": "",
    "Notes": "Integer Signal Duration"
  }
]

device address: vctl config get platform.driver devices/slipstream_internal/slipstream_hq/33333 this will print:

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

I think I have something wrong in my agent code in the dr_level = self.vip.rpc.call as shown in the snip below as the code errors out right after the ACTUATOR AGENT SCHEDULE SUCCESS:

dr_status = self.vip.rpc.call(
    'platform.actuator', 'request_new_schedule', self.agent_id, 'my_test', 'HIGH', schedule_bac0_request).get(
    timeout=4)

_log.info(f'*** [Setter Agent INFO] *** - ACTUATOR AGENT SCHEDULE SUCCESS')

dr_level = self.vip.rpc.call('platform.actuator','get_point', dr_topic, point="signal_payload").get(timeout=15)

the dr_topic is slipstream_internal/slipstream_hq/33333

Any ideas to try greatly appreciated...

Full traceback:

2021-06-15 14:36:27,597 (actuatoragent-1.0 403031) __main__ DEBUG: handle_get: slipstream_internal/slipstream_hq/33333
2021-06-15 14:36:27,598 (master_driveragent-4.0 403069) volttron.platform.vip.agent.subsystems.rpc ERROR: unhandled exception in JSON-RPC method 'get_point':
Traceback (most recent call last):
  File "/var/lib/volttron/volttron/platform/vip/agent/subsystems/rpc.py", line 158, in method
    return method(*args, **kwargs)
  File "/home/volttron/.volttron/agents/55fbfb56-beac-4e6d-a201-1ab17b11d42b/master_driveragent-4.0/master_driver/agent.py", line 448, in get_point
    return self.instances[path].get_point(point_name, **kwargs)
  File "/home/volttron/.volttron/agents/55fbfb56-beac-4e6d-a201-1ab17b11d42b/master_driveragent-4.0/master_driver/driver.py", line 341, in get_point
    return self.interface.get_point(point_name, **kwargs)
AttributeError: 'DriverAgent' object has no attribute 'interface'

2021-06-15 14:36:27,599 (actuatoragent-1.0 403031) volttron.platform.vip.agent.subsystems.rpc ERROR: unhandled exception in JSON-RPC method 'get_point':
Traceback (most recent call last):
  File "/var/lib/volttron/volttron/platform/vip/agent/subsystems/rpc.py", line 158, in method
    return method(*args, **kwargs)
  File "/home/volttron/.volttron/agents/8f4ee1c0-74cb-4070-8a8c-57bf9bea8a71/actuatoragent-1.0/actuator/agent.py", line 897, in get_point
    return self.vip.rpc.call(self.driver_vip_identity, 'get_point', path,
  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._raise_exception
  File "/var/lib/volttron/env/lib/python3.8/site-packages/gevent/_compat.py", line 66, in reraise
    raise value
volttron.platform.jsonrpc.RemoteError: builtins.AttributeError("'DriverAgent' object has no attribute 'interface'")


2021-06-15 14:36:27,600 (setteroccvavagent-0.1 471606) volttron.platform.vip.agent.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 _loop
    method(*self.args, **self.kwargs)
  File "/home/volttron/.volttron/agents/9c13ec66-7d7a-4f3d-a607-409a82e012ed/setteroccvavagent-0.1/setteroccvav/agent.py", line 252, in raise_setpoints_up
    dr_level = self.vip.rpc.call('platform.actuator','get_point', dr_topic, point="signal_payload").get(timeout=4)
  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._raise_exception
  File "/var/lib/volttron/env/lib/python3.8/site-packages/gevent/_compat.py", line 66, in reraise
    raise value
volttron.platform.jsonrpc.RemoteError: volttron.platform.jsonrpc.RemoteError('builtins.AttributeError("\'DriverAgent\' object has no attribute \'interface\'")')

Solution

  • Actually what seemed to fix this is I restarted the actuator agent, bacnet proxy, and masteragent all at the same time. Was it maybe the master agent that needed a restart?

    UPDATE

    IF YOU HAD TO CHANGE SOMETHING IN THE CONFIG STORE FOR A DEVICE, for example make a BACnet point writeable instead of read ONLY; and something got fat fingered incorrectly this will ALSO CAUSE THE SAME ERROR! And also hard to troubleshoot.

    For example on a live system if you had to modify something like this through vctl:

    vctl config edit platform.driver registry_configs/1100.csv
    

    And you create a syntax error with a fat finger this will also throw the same error!!!!!