0

Can you call an RPC endpoint from outside VOLTTRON? If so what all entails the authentication to call a VOLTTRON agent RPC endpoint?

For example I created an agent with the agent creation wizard that includes an RPC endpoint method like this when the wizard tool generates the agent:

@RPC.export
def rpc_method(self, arg1, arg2, kwarg1=None, kwarg2=None):
    """
    RPC method
    May be called from another agent via self.core.rpc.call
    """
    return self.setting1 + arg1 - arg2

Here's another SO post about how to use RPC but I think this RPC calls within the framework itself and not an RPC call from outside: How to use RPC with Volttron

Is there any RPC testing tools like REST API testing tools or python packages I could use? Would I need to a 'vctl auth add' for authentication for outside of VOLTTRON?

bbartling
  • 3,288
  • 9
  • 43
  • 88

1 Answers1

0

In order to call from outside volttron there has to be an agent connection established in order to use the rpc functionality. A good example of this is the examples/StandaloneListener. Once the connection is established to a volttron then you can call rpc functions allowed.

Craig
  • 949
  • 1
  • 5
  • 13