We are trying to implement a MasterDriverAgent in VOLTTRON that communicates with a simulated pymodbus asynchronous server on a remote machine within a local network. From the VOLTTRON log, it looks like the agent never calls the modbus.py interface class. The last message on the bus is related to the scalability test and then it goes silent. At each scrape interval it then displays a heartbeat with 'context':None
I updated the config with the scripts/update_master_driver_config.py
script but still get that message in the log about the old style configuration being unsupported.
Here is my master_driver.agent config file:
{
"agentid": "master_driver",
"driver_config_list": [
"/home/volttron/volttron/services/core/MasterDriverAgent/master_driver/test_modbus_plant1.config",
"/home/volttron/volttron/services/core/MasterDriverAgent/master_driver/test_modbus_rt_ctrl_blk1.config"
]
}
and my device config file:
{
"driver_config": {"device_address": "10.0.1.19",
"port": 1060,
"slave_id": 0},
"plant": "plant1",
"unit": "device1",
"driver_type": "modbus",
"registry_config":"/home/volttron/volttron/volttron/drivers/plant1.csv",
"interval": 30,
"timezone": "UTC",
"heart_beat_point": "ESMMode"
}
I also have the registry config file at the location specified in the device config file.
Here is the output of the VOLTTRON log in DEBUG mode ( I left out the listener agent heartbeats ).
2017-05-01 21:57:51,830 (master_driveragent-3.1.1 9513) master_driver.agent WARNING: Master driver configured with old setting. This is no longer supported.
2017-05-01 21:57:51,831 (master_driveragent-3.1.1 9513) master_driver.agent WARNING: Use the script "scripts/update_master_driver_config.py" to convert the configuration.
2017-05-01 21:57:51,832 (master_driveragent-3.1.1 9513) volttron.platform.vip.agent.core DEBUG: address: ipc://@/home/volttron/.volttron/run/vip.socket
2017-05-01 21:57:51,833 (master_driveragent-3.1.1 9513) volttron.platform.vip.agent.core DEBUG: identity: platform.driver
2017-05-01 21:57:51,833 (master_driveragent-3.1.1 9513) volttron.platform.vip.agent.core DEBUG: agent_uuid: 12fb6f87-ec81-48be-819b-57d9e7a41bd6
2017-05-01 21:57:51,834 (master_driveragent-3.1.1 9513) volttron.platform.vip.agent.core DEBUG: severkey: None
2017-05-01 21:57:51,851 () volttron.platform.auth INFO: authentication success: domain='vip', address='localhost:1000:1000:9513', mechanism='CURVE', credentials=['e1xxY8-YkuA1t46q2Vlmvw8gjuQcegB6fypwB4XeX24'], user_id='platform.driver'
2017-05-01 21:57:51,857 (master_driveragent-3.1.1 9513) volttron.platform.vip.agent.core INFO: Connected to platform: router: 404e0ff7-6f6b-4913-a368-ac995444f1bd version: 1.0 identity: platform.driver
2017-05-01 21:57:51,858 (master_driveragent-3.1.1 9513) volttron.platform.vip.agent.core DEBUG: Running onstart methods.
2017-05-01 21:57:51,865 (listeneragent-3.2 9483) listener.agent DEBUG: Peer: 'pubsub', Sender: 'platform.driver':, Bus: u'', Topic: 'heartbeat/MasterDriverAgent/12fb6f87-ec81-48be-819b-57d9e7a41bd6', Headers: {'Date': '2017-05-02T04:57:51.859139+00:00', 'max_compatible_version': u'', 'min_compatible_version': '3.0'}, Message: {'status': 'GOOD', 'last_updated': '2017-05-02T04:57:51.835134+00:00', 'context': None}
2017-05-01 21:57:51,871 (master_driveragent-3.1.1 9513) volttron.platform.vip.agent.subsystems.configstore DEBUG: Processing callbacks for affected files: {'config': 'NEW'}
2017-05-01 21:57:51,871 (master_driveragent-3.1.1 9513) master_driver.agent INFO: maximum concurrently open sockets limited to 3276 (derived from system limits)
2017-05-01 21:57:51,871 (master_driveragent-3.1.1 9513) master_driver.agent INFO: maximum concurrent driver publishes limited to 10000
.
.
.
2017-05-01 16:30:25,489 (listeneragent-3.2 7710) listener.agent DEBUG: Peer: 'pubsub', Sender: 'platform.driver':, Bus: u'', Topic: 'heartbeat/MasterDriverAgent/5cfc8abc-6e7d-42be-b7c1-d234bb3ea05f', Headers: {'Date': '2017-05-01T23:30:25.486351+00:00', 'max_compatible_version': u'', 'min_compatible_version': '3.0'}, Message: {'status': 'GOOD', 'last_updated': '2017-05-01T23:29:25.464609+00:00', 'context': None}
I feel like I am missing a big piece of the driver framework here but have been hitting a wall for a while now. I can usually tell where the problem is from an error message in the log but there is none provided in this case.
I can communicate between the two machines using a basic TCP server/client script and also using pymodbus example async server/client scripts ( although I do get an Unhanded error in Deferred
, I believe there is communication happening since I am getting activity on the output of both machines. Not so with the MasterDriverAgent ).
My next step might be to try to implement a basic Test Agent and place a simple pymodbus client inside it and see if I can get any communication happening. Or..is there a simulated device within VOLTTRON that has been tested to talk to the MasterDriverAgent and publish to the bus? I think that this might help me isolate the problem. I apologize if my problem is too vague, I tried to be as specific as I could.
If you could help shed any light on this problem, I would appreciate it.