Rename input breaks it on local emoncms version: low-write 10.1.0

I just installed the latest emoncms SD image on my RasPi 3B and started setting things up.

When I went to inputs, a bunch were there - all five of my nodes were represented with fresh data. I assume that the inputs were created automatically when the data came in. I set up a few of them with feeds.

But then, I realized that in my previous installation, my inputs had names I had assigned, so I wanted to do that here. I discovered that I could change the name by checking the box by the input, hitting the edit icon, changing the name, and saving it.

I did this with two inputs.

Then I noticed that my inputs had no data, but new inputs had appeared, each with the old name, and had data. The feeds for my renamed inputs also now show stale data, and the new inputs have no feeds.

Hence, it appears that renaming an input disconnects it from the data coming in, and when that data appears, since it is unrecognized, new inputs are created.

Is this a known bug? Is there a way around it other than hacking the SQL database or something?

This is expected behaviour as you are not changing the name at source, if data arrives as node “abc” and auto creates a node “abc”, when you change that input to “xyz” in emoncms, your data will still be arriving as “abc”.

You do not say where the data originates from, so for now I will assume it’s emonpi/emonTx/emonTH type dat, coming in via emonhub. If that is the case you can change the names in the [nodes] section of emonhub.conf (in the emoncms webpage or by editing the file at /etc/emonhub/emonhub.conf manually) to use the names of your choice.

As before, the change in names will create new inputs, but this is where the ability to edit the input names comes in as you can now edit your existing inputs to attach them to the new inputs.

Thank you. I suggest perhaps a warning when one tries that. I didn’t know that the name, as opposed to the numeric node number and input number, was the primary key.

Regards

BTW - thanks. This does look like a quite useful feature.