i'm trying to connect a device via modbus tcp, i configurated the store with the driver configuration, driver registry and the platform driver agent. the problem is that i'm not receiving any value from device only the message good. what can be maybe the problem? Thanks in advance!
2023-01-19 15:35:00,002 (platform_driveragent-4.0 6551) platform_driver.driver DEBUG: my_campus/my_building/my_device next scrape scheduled: 2023-01-19 14:36:00+00:00
2023-01-19 15:35:00,002 (platform_driveragent-4.0 6551) platform_driver.driver DEBUG: scraping device: my_campus/my_building/my_device
2023-01-19 15:35:02,460 () volttron.platform.main DEBUG: Handling subsystem with frames: ['platform.auth', '', 'VIP1', '', '1674138785.000000.8771946805800.000000', 'pubsub', 'publish', 'heartbeat/platform.auth', {'bus': '', 'headers': {'TimeStamp': '2023-01-19T14:35:02.458512+00:00', 'min_compatible_version': '3.0', 'max_compatible_version': ''}, 'message': 'GOOD'}] user_id: platform.auth
2023-01-19 15:35:02,462 (listeneragent-3.3 6550) __main__ INFO: Peer: pubsub, Sender: platform.auth:, Bus: , Topic: heartbeat/platform.auth, Headers: {'TimeStamp': '2023-01-19T14:35:02.458512+00:00', 'min_compatible_version': '3.0', 'max_compatible_version': ''}, Message: 'GOOD'
2023-01-19 15:35:02,466 () volttron.platform.main DEBUG: Handling subsystem with frames: ['config.store', '', 'VIP1', '', '1674138785.000000.8771946805764.000000', 'pubsub', 'publish', 'heartbeat/config.store', {'bus': '', 'headers': {'TimeStamp': '2023-01-19T14:35:02.466177+00:00', 'min_compatible_version': '3.0', 'max_compatible_version': ''}, 'message': 'GOOD'}] user_id: config.store
2023-01-19 15:35:02,467 (listeneragent-3.3 6550) __main__ INFO: Peer: pubsub, Sender: config.store:, Bus: , Topic: heartbeat/config.store, Headers: {'TimeStamp': '2023-01-19T14:35:02.466177+00:00', 'min_compatible_version': '3.0', 'max_compatible_version': ''}, Message: 'GOOD'
i checked the driver register, the driver configuration (ip adress) and that the device ready to communicate with volttron
UPDATE after csv config new call:
That is the error code for not scraping the device
2023-02-01 22:35:40,004 (platform_driveragent-4.0 2198) platform_driver.driver DEBUG: my_campus/my_building/my_device next scrape scheduled: 2023-02-01 21:36:00+00:00
2023-02-01 22:35:40,005 (platform_driveragent-4.0 2198) platform_driver.driver DEBUG: scraping device: my_campus/my_building/my_device
2023-02-01 22:35:40,169 (platform_driveragent-4.0 2198) platform_driver.driver ERROR: Failed to scrape my_campus/my_building/my_device:
Traceback (most recent call last):
File "/home/—/.volttron/agents/3ada9813-464a-450e-83d2-261283198323/platform_driveragent-4.0/platform_driver/driver.py", line 244, in periodic_read
results = self.interface.scrape_all()
File "/home/—/.volttron/agents/3ada9813-464a-450e-83d2-261283198323/platform_driveragent-4.0/platform_driver/interfaces/__init__.py", line 607, in scrape_all
result = self._scrape_all()
File "/home/—/.volttron/agents/3ada9813-464a-450e-83d2-261283198323/platform_driveragent-4.0/platform_driver/interfaces/modbus.py", line 326, in _scrape_all
result_dict.update(self.scrape_byte_registers(client, True))
File "/home/—/.volttron/agents/3ada9813-464a-450e-83d2-261283198323/platform_driveragent-4.0/platform_driver/interfaces/modbus.py", line 288, in scrape_byte_registers
value = register.parse_value(start, result)
File "/home/—/.volttron/agents/3ada9813-464a-450e-83d2-261283198323/platform_driveragent-4.0/platform_driver/interfaces/modbus.py", line 148, in parse_value
raise ValueError('Not enough data to parse')
ValueError: Not enough data to parse
and that is my config store
{"config":{"type":"json","modified":"2023-02-01T21:18:46.930864+00:00","data":"{\n \"driver_scrape_interval\": 0.05,\n \"publish_breadth_first_all\": false,\n \"publish_depth_first\": false,\n \"publish_breadth_first\": false\n}\n"},
"modbus_registry.csv":{"type":"csv","modified":"2023-02-01T21:19:14.587095+00:00","data":"Reference Point Name,Volttron Point Name,Units,Units Details,Modbus Register,Writable,Point Address,Default Value,Notes\nVoltage_Output_UV_RMS,Voltage_Output_UV_RMS,V,-3.4E+38-3.4E+38,>f,FALSE,26078,,VOLTAGE PHASE U-V\nVoltage_Output_VW_RMS,Voltage_Output_VW_RMS,V,-3.4E+38-3.4E+38,>f,FALSE,26080,,VOLTAGE PHASE V-W\nVoltage_Output_WU_RMS,Voltage_Output_WU_RMS,V,-3.4E+38-3.4E+38,>f,FALSE,26082,,VOLTAGE PHASE W-U\n"},
"devices/my_campus/my_building/my_device":{"type":"json","modified":"2023-02-01T21:19:35.269587+00:00","data":"{\n \"driver_config\": {\"device_address\": \"172.16.0.82\",\n \"port\": 502,\n \"slave_id\": 10},\n \"driver_type\": \"modbus\",\n \"registry_config\":\"config://modbus_registry.csv\",\n \"interval\": 20,\n \"timezone\": \"UTC\",\n \"heart_beat_point\": \"heartbeat\"\n}\n"}}
Generally, if you are seeing neither polling results nor errors from the driver, it means that a registry file wasn't found for device (this will fail silently -- with the exception, I believe, of a single warning message when the driver first starts). It will not generate an error on every poll because the device will never be scheduled for polling.
It appears, from the configuration store entry you pasted above, that the registry file is stored in the configuration store with the key "registry_configs/modbus_registry.csv". In the device configuration, though, it is referenced as: "config://modbus_registry.csv".
Try changing your device configuration to reference it with the full key name used in the configuration store (i.e., "registry_config": "config://registry_configs/modbus_registry.csv"). Alternately, you could remove and store the registry file again as just "modbus_registry.csv".
Though it has been something of a convention to store registry files with names starting in "registry_configs/..." there is not actually anything special about naming them this way. The name it is saved with in the config store simply needs to be the same as that in the device configuration file.