Search code examples
pythonmodbus-tcpvolttron

How to integrate VOLTTRON with Opal-RT?


I am trying to connect Opal-Rt device to VOLTTRON platform using MODBUS TCP/IP communication. I have installed Listener Agent and Master Driver Agent with device configuration as follows:

{
"driver_config": {"device_address": "192.168.*.*"},
"driver_type": "modbus",
"registry_config":"config://registers.csv",
"interval":60,
"timezone":"UTC"
}

All I am trying to do is to listen to the data published to the message bus at regular interval and write it to the CSV file. What would be the configuration for Actuator Agent? And, how can I launch the actuator agent with provided agent's configuration file?

After installing Actuator agent, how can I request a task schedule to a specific topic for a specific timeslot?

Thank you


Solution

  • Rabindra,

    For this use case you needn't use an actuator agent at all. The master driver can be configured with N number of devices using configurations similar to the one you provided.

    What is missing from your post is whether or not you've included a registry configuration. The 'registry_config' value above should reference a CSV defining the relationship the driver should have to individual registers on the simulated devices on OPAL-RT. See the following documentation:

    Readthedocs Modbus Configuration

    Additionally, I strongly recommend switching from the basic Modbus driver to the Modbus_TK driver. It's a bit more robust and full-featured. You can read more about that here:

    Readthedocs Modbus_TK Configuration

    After configuring the devices per the included links, you can install a CSVHistorian from <VOLTTRON_ROOT>/examples to store the device data to a CSV.