Why doesn't changing a device name update the data points?
-
Perhaps but we could be haggling over terminology and not usage of the value.
In my situation, I have a pilot project with 80 devices each with 12 MQTT sensor values. It would seem to be a much larger maintenance and organization problem to have each device contained in its own data source, which all connect to the same MQTT broker.
-
Hi pyeager,
There are situations where it could make sense and others where it may not (like publishing a whole site over a persistent publisher - should all those points have the name of the receiver?) so the better behavior is to make you update the points you would like updated. Data sources don't have device names, they have data source names.
Another example may be a Modbus IP data source, polling a gateway that has multiple Modbus RTU devices behind it. Note that dataSourceName is available in RQL queries, also.
Have you seen the bulk data point editor in the new UI? It makes changing all the device names for the points on a data source quite simple.
In the old UI, you could simply export the JSON for the points from the data sources page and do a simple find / replace. So, simple solutions exist if you wish to rename all the points' device names.
-
Data sources don't have device names, they have data source names.
That is a bit of semantic argument, disagreed with by your own code.
In any case, a data source has a name, whatever you call it.
When you add data points to that data source, the data point includes the data source name.
It seems to make sense that if a data source is renamed, the data source name in it's data points should change also.
Why does it matter?
Replicating a machine might easily be done by copying the data sources and renaming them. If I have to recreate each one from scratch, I'm going to have to look for another vendor.
If scripts are written to search for a data point named "foo" on a data source named "bar", then the current setup requires that if copies are made, the data sources and each of their associated data points must be edited.
This is not efficient.
Edit:
Furthermore, if I copy data source "bar" to another one named "bar2", the current situation creates two sets of data points having the same device name (or data source name) and the same name. There would be two data points named "foo" with the data source name "bar".
-
@iperry said in Why doesn't changing a device name update the data points?:
Perhaps but we could be haggling over terminology and not usage of the value.
In my situation, I have a pilot project with 80 devices each with 12 MQTT sensor values. It would seem to be a much larger maintenance and organization problem to have each device contained in its own data source, which all connect to the same MQTT broker.
I am using Modbus I/P devices.
Each device is a "data source".
Each device has multiple inputs and outputs.
Where do you suggest that each input or output data point reside, if not in the data source on which it physically resides?
-
Hi @pyeager
If each of your devices physically reside on a different modbus network, then I would agree that having each device within its own data source would make sense.
When I started out with another pilot, all of the modbus devices were on the same network, i.e. same host/port, so I used the same organization as I described previously. I had multiple devices with the same set of data points in one data source.
When I first created the data points for the devices, I was a little confused when the device name was defaulted to the data source name. However, it seemed to me that "device name" of the point should relate to the data point and not to the data source. For me, it seemed the data source should be a group of points related by their physical source. The naming was arbitrary.
-
@iperry said in Why doesn't changing a device name update the data points?:
For me, it seemed the data source should be a group of points related by their physical source. The naming was arbitrary.
That is precisely what I am trying to maintain - data points related by their physical source.
The physical source is a Modbus I/P device at a unique IP address. Maintaining a relationship between the data points and the data source is desirable.
The problem comes when I rename the physical data source. The name of the data source recorded in each data point doesn't change. This breaks queries by data source name and data point name.
One might say "well then, don't rename anything". That might be convenient for the developers, but no so much for this user.
There are multiple "machines" in our system (around 100 for full implementation). For each machine, there is a Modbus I/P data source that controls the machine, and a virtual data source that keeps track of process variables that don't live on the Modbus I/P device. Scripts access the two data sources and their respective data points by name.
To create a new machine, it is quite convenient to simply copy the data sources and rename them. Requiring that all the data points be edited seems a unnecessary waste of effort. If data sources are copied and renamed, and the data points are not edited, queries by data source name and data point name now return two results - one for the original data source an done for the copy.
I makes sense to me that, at least in the case of Modbus I/P and virtual data sources, renaming a data source should update the data source name saved in the data point. I can't imagine an advantage to that not happening.
-
@phildunlap said in Why doesn't changing a device name update the data points?:
Have you seen the bulk data point editor in the new UI? It makes changing all the device names for the points on a data source quite simple.
In the old UI, you could simply export the JSON for the points from the data sources page and do a simple find / replace. So, simple solutions exist if you wish to rename all the points' device names.No matter how easy it is, it makes no sense to have to do it each time a Modbus I/P or virtual data source is copied. Bear in mind that I have to train others to do this.
-
Just adding my 2 cents here.
I am assuming that the automatic renaming was not created in Mango so as to keep the flexibility and power of configuring the data sources and data points to your own individual configuration styles. As for our organisation, I too have to train my colleagues to set up the logging systems and we also have situations where the customer wants a name changed, has moved the logger to another site or wants to set up an identical system on a new site.
Since Mango uses the XID to identify the various parts of the system, we make sure the XID’s are very generic, i.e. logger/device id – channel number such as 0001-an1. This way we can change the names to a user friendly description without changing the overall structure of the logging system.
Just as PhilDunlap said, to make editing the sources and point easier we always export the JSON file, edit the text with a simple find/replace and import the configuration. As long as the XID’s are not changed everything will work. We have also started to use the Bulk Editor in Mango 3. We rarely edit the data sources directly except to tweak a few settings.
We also have several data sources set up as templates and again we copy the JSON file and edit the data source names, data point names and the this time the XID’s to create new logging systems. We find this quicker to set up and easier to teach. It eliminates a lot of clicking back and forth.
Cheers,
Brian -
@pyeager said in Why doesn't changing a device name update the data points?:
Call me crazy, but it seems sensible for the device name for a data point to match the device name of the data source of which it is a part.
I doubt anyone disagrees with you here but it is definitely not the only naming convention of points. Using the bulk configurator to set all the points to the same name is extremely easy and quick. Imagine someone has used a different naming convention where there are a number of different device names and they get overwritten by changing the data source name. That could really ruin a person day and be disastrous in a production environment.
Secondly, in the new UI, there is no option to copy a data source. You need to export it, change it and then import it.
-
That is a bit of semantic argument, disagreed with by your own code.
You have posted a picture of the data points tab on the data sources page in the old UI with a column called "Device Name." Not sure what point you're going for there. Of course it's a semantic argument - data sources have one name field, points have two, and they're all distinct things.
In any case, a data source has a name, whatever you call it.
When you add data points to that data source, the data point includes the data source name.
It seems to make sense that if a data source is renamed, the data source name in it's data points should change also.- Data source names are available for RQL queries (device names are, too).
- It is simple to change all the device name values for a set of points from the bulk editor page.
- It is simple to change all the device names in a CSV or JSON export.
- You can create templates of devices you deploy a lot, to make deployment easier.
- Unconditionally mandating the device name match the data source name would cause issues in the situations laid out in the first post, including receivers of published points, BACnet sources polling lots of devices on the network, Modbus devices polling multiple slaves through an IP serial gateway device.
To create a new machine, it is quite convenient to simply copy the data sources and rename them. Requiring that all the data points be edited seems a unnecessary waste of effort. If data sources are copied and renamed, and the data points are not edited, queries by data source name and data point name now return two results - one for the original data source an done for the copy.
In the old UI there is a copy function. There will be in the new UI at some point. The copy function provides a device name field on the data source that will change the device name of all the points upon saving the new data source (note that then it is gone afterward from the data source's config), which it sounds like is what you want. I would expect this functionality to continue when it comes into the new UI, although perhaps it will be optional, since there are plenty of instances where having all the points have the name of the data source would not be desirable.
No matter how easy it is, it makes no sense to have to do it each time a Modbus I/P or virtual data source is copied. Bear in mind that I have to train others to do this.
How have you been copying it? There are a ton of simple ways and it is categorically irrational to disregard however easy it is. I can write you a scripting data source that will ensure all data points are always named with the data source name as their device name if you'd like.
-
@phildunlap said in Why doesn't changing a device name update the data points?:
How have you been copying it? There are a ton of simple ways and it is categorically irrational to disregard however easy it is.
It is irrational to claim that I am disregarding anything. Did I claim that it was not simple to copy data sources?
It is quite simple to copy data sources using the legacy web interface. I don't think I need to explain to you how is is done. Indeed, if the copy is given a new name before saving, all of the data points have the correct data source name.
The point of my original question deals with renaming data sources appearing unnecessarily difficult, not copying data sources.
I can write you a scripting data source that will ensure all data points are always named with the data source name as their device name if you'd like.
I am quite capable of writing such a script myself, thank you. It just seems like something that should not be necessary,
-
It is irrational to claim that I am disregarding anything.
I do not think you addressed how there are other data source types where it makes far more sense for them to differ. Nor took consolation in that dataSourceName is available as a querying tool. But what I'm saying is irrational - that is, impossible to reason with - is not addressing the merits of the design, it was also disregarding the simple solutions to what you were attempting to bring about: the renaming of the device name of all the points.
Did I claim that it was not simple to copy data sources?
It is quite simple to copy data sources using the legacy web interface. I don't think I need to explain to you how is is done. Indeed, if the copy is given a new name before saving, all of the data points have the correct data source name.You said this, which i quoted for context:
To create a new machine, it is quite convenient to simply copy the data sources and rename them. Requiring that all the data points be edited seems a unnecessary waste of effort. If data sources are copied and renamed, and the data points are not edited, queries by data source name and data point name now return two results - one for the original data source an done for the copy.
Maybe I misunderstood
If data sources are copied and renamed, and the data points are not edited, queries by data source name and data point name now return two results - one for the original data source an done for the copy
to imply your copying strategy (because there are multiple) was not getting the points the device name you sought.
Perhaps also I should quote
Why does it matter?
Replicating a machine might easily be done by copying the data sources and renaming them. If I have to recreate each one from scratch, I'm going to have to look for another vendor.
I am quite capable of writing such a script myself, thank you. It just seems like something that should not be necessary,
Might I recommend the data source audit event? You can get the data source name from the
var eventMessage = event.getMessage();
If you want to engage the discussion of its function on other data sources, maybe this thread wouldn't be fraying. But, I would say from your first response to me in this thread it is clear you have been on a course toward what you already believed should be so, which is why you did not engage the reasoning then or now, which is irrationality defined.No matter how easy it is, it makes no sense to have to do it each time a Modbus I/P or virtual data source is copied. Bear in mind that I have to train others to do this.
The point of my original question deals with renaming data sources appearing unnecessarily difficult, not copying data sources.
Here's some visual aids for the necessary few clicks and typing required additionally:
You brought the spice to this thread. You didn't appreciate the first response was someone else saying they appreciate the current functionality. I would encourage you to rethink the combativeness you seem to think belongs here, and the lack of engagement with the responses the thread got.