You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a registry file has multiple entries with the same Volttron Point Name field:
The driver silently discards the register created from the first row, replacing it with the duplicate
The web API, when parsing device configurations, returns an error that a node with the topic ending in the duplicate point name cannot be created.
In the first case, if other fields in the registry rows do not match, this may lead to unexpected behavior which the user should be made aware of (e.g., they think they are polling one point, but in fact are polling another). Raising an exception and stopping instantiation of a driver for this device might be merited, but could break existing deployments. A warning should probably, at least be logged.
In the second case, the error prevents the devices endpoint from working at all. The error should be caught and handled, with more meaningful error being logged. It may not be feasible, however, to both return an error to the user of the endpoint and to avoid raising the exception without changing the API. Probably, it should just result in a warning in the log (on the server side) without stopping the endpoint from completing its task (and thus not passing the error to the client).
To Reproduce
Create a fake (or other) driver with a duplicate point names in the registry table (the default fake driver config can be used with this):
Point Name,Volttron Point Name,Units,Units Details,Writable,Starting Value,Type,Notes
OutsideAirTemperature1,OutsideAirTemperature1,F,-100 to 300,FALSE,50,float,CO2 Reading 0.00-2000.0 ppm
OutsideAirTemperature1,OutsideAirTemperature1,F,-100 to 300,FALSE,500,float,CO2 Reading 0.00-2000.0 ppm
Start the driver, and observe that there are no warnings, but this is returned by the listener:
Driver side: Something should at least alert the user of the malformed registry file. If these points referenced different registers on the device, it would not be clear to the user that one of the points was not polled, nor which was, in fact, polled.
Web side: A warning should be logged for the owner of the server, and the endpoint should ignore the duplicate name.
Additional context
This problem is not likely to occur in the new driver, since it uses TopicTree as an internal data structure. It will therefore be unable to ignore the duplicate entry without extra logic. It should still be checked to make sure it fails with a meaningful error to the user when loading the bad configuration.
The text was updated successfully, but these errors were encountered:
Describe the bug
When a registry file has multiple entries with the same Volttron Point Name field:
In the first case, if other fields in the registry rows do not match, this may lead to unexpected behavior which the user should be made aware of (e.g., they think they are polling one point, but in fact are polling another). Raising an exception and stopping instantiation of a driver for this device might be merited, but could break existing deployments. A warning should probably, at least be logged.
In the second case, the error prevents the devices endpoint from working at all. The error should be caught and handled, with more meaningful error being logged. It may not be feasible, however, to both return an error to the user of the endpoint and to avoid raising the exception without changing the API. Probably, it should just result in a warning in the log (on the server side) without stopping the endpoint from completing its task (and thus not passing the error to the client).
To Reproduce
Create a fake (or other) driver with a duplicate point names in the registry table (the default fake driver config can be used with this):
Start the driver, and observe that there are no warnings, but this is returned by the listener:
[{'OutsideAirTemperature1': 500.0},
{'OutsideAirTemperature1': {'type': 'integer',
'tz': 'US/Pacific',
'units': 'F'}}]
Expected behavior
Additional context
This problem is not likely to occur in the new driver, since it uses TopicTree as an internal data structure. It will therefore be unable to ignore the duplicate entry without extra logic. It should still be checked to make sure it fails with a meaningful error to the user when loading the bad configuration.
The text was updated successfully, but these errors were encountered: