Closed ToSa27 closed 4 years ago
@ToSa27
Hi
I am having a bit of trouble reproducing this.
Config:
Node-RED Node:
could you include
msg._forceGetConfig=true;
in your message to force the node to refresh the configuration?
I also looked into the code and it enumerates accross all data sources.
model.dataSources.forEach(function(elem) {
elem.dataPoints.forEach(function(elem2) {
dataPointIdArray.push(elem2.id);
valueArray.push(elem2.type.toString());
});
});
Btw, this seems to work too (just 2nd datasource...)
@ToSa27 One more question :) Are you by any chance using TIMESTAMP or BIG_STRING data points in your configuration?
@sn0wcat Adding msg._forceGetConfig=true;
fixed it. The second data source was definitely created after the NodeRed flow was setup so this makes some sense but even after quite some time it still failed. Without forcing it, will the config ever be pulled again e.g. on a given frequency or is there a way to manually trigger a one-time refresh (other than removing and re-adding the node)?
I'm not using TIMESTAMP or BIG_STRING.
@ToSa27 the node pulls the data source once from the mindsphere and never again unless you force it. you should remove the msg._forceGetConfig now, to minimize the load on the system.
I am planning to change the node configuration a bit now that the agents actually can get list of assets from Mindsphere (we will provide a dialog where you can select the assets and the agent will automatically create data source config and mappings for them). For that I have to touch that code anyhow, I will see if I can do here a bit more ...
If more than one data source is defined on the Mindsphere side and data is pushed for a data point that is not in the first data source, the "Validate datapoints before sending" fails claiming that the data point ID is not part of the list of valid IDs (and the list provided in the error message is the list of data point IDs from the first data source only). Diasbling this validation resolves the issue but is obviously not intended behaviour.
To Reproduce Steps to reproduce the behavior:
Expected behavior The validation should check for valid data point IDs from all available data sources in that agent.
Desktop (please complete the following information):