Refresh advertised device name if not overriden


#1

When we add a new device and do not override its name, the advertised name gets used, as per explained in the dialog help message :

Unfortunately, the advertised name gets copied (found this topic about that), resulting in the same as if the user wrote it himself in the dialog. Therefore, if a remote device later changes its advertised name, the change won’t reflect on existing devices, forcing us to manually change the name on every device manually to either :

  • The new advertised name directly ;
  • An empty name, so that the new advertised name gets used at the next handshake.

I experienced this on a small cluster (3-4 devices) and it already annoyed me quite a bit (had to wait for some of the devices to get powered on to make the change ; remember which devices I already updated ; etc.), so I can imagine how painful it must be to make changes to device names inside a large cluster.

Couldn’t we simply use the advertised name every time if the user chose to not override it ?

That shouldn’t be difficult to implement I guess, since we already have the advertised name at handshake. So it could simply be a matter of stopping the advertised name “copy” ; remembering the last advertised name we got for each device ; and use that instead of the one from the “Add/Edit Device” dialog if it’s been left empty.


(Audrius Butkevicius) #2

There is an advanced config option for that.


#3

There is indeed :expressionless:

However, that’s a “global” setting, that will force the refresh for all remote devices. That’s exactly what I want so I don’t complain personally, but I can imagine that some users could use a “per remote device” setting, with a mechanism similar to the one I suggested above. Just a thought though, as I’ll be more than happy with the current checkbox !

Thanks @AudriusButkevicius !

Kinda off topic

Also, what defines what goes in “Advanced Configuration” and what doesn’t ? I’ve already glanced at those settings before (and even altered one of them), but I usually don’t pay too much attention to them (that’s probably why I didn’t see this one about remote names in the first place) because everything in there makes you feel like it’s experimental and dangerous for your data. I mean, how am I supposed to feel confident with any setting there :stuck_out_tongue_closed_eyes: :

But I’m sure I’m perfectly safe checking that box for remote names, so why is it there and not with the basic settings ? Or maybe move the most experimental settings in a “Experimental Configuration” menu and keep the “safe” ones in the “Advanced Configuration” menu and loose the red color and warning message there :slightly_smiling_face: ?


(Audrius Butkevicius) #4

You will have a finite number of devices, so having to check it on all of them is not that much work. It has to be per device you can imagine your friend forcing his phone to be called ‘Phone’ on your side would not fly.

Advanced settings is essentially autogenereated ui from all config items.


#5

I’m not sure we understood each other here. With the current implementation, if I want to refresh advertised names automatically, I have to check the box in the advanced config. And then if my friend forces his phone to be called “Phone”, it will end up as “Phone” on my side.

But if I could select which of my remote devices I want to use the advertised names with and which I don’t (that’s what I meant by “per remote device” setting), I could have the best of both worlds :

  1. Automatically refreshed advertised names for devices I own and for which I control the advertised name ;
  2. Overwritten names for my friend’s devices, which I don’t control the advertised name, to avoid having stuff like “Phone” show up on my side.

Here are some modified screenshots to show what I mean :


(Audrius Butkevicius) #6

Yeah, perhaps that’s not implemented that way yet it should have been. I don’t remember now.

Regardless if it does not suffice your usecase, file a PR with the code change.

I don’t think anyone else cares about this to implement it.


#7

I don’t have the time to implement it right now and, like I said, I’m mostly fine as well with the current implementation (the checkbox in the advanced config). I just wanted to share the idea, since I couldn’t find any existing discussion on the matter during my research.

Maybe this will inspire someone to do the changes in the future, or maybe I’ll try to implement them once I have more time.


(Jakob Borg) #8

It used to be that if the name was blank in the config we’d show whatever the other side announced. Then at some point we started filling what the other side announced into the config at addition time and it was never blank any more. Then the current overwriting option was added.


#9

I’m sure you had your reasons, but I’m having trouble understanding why it changed this way since IMO the first implementation seemed to be the best, the second the worst, and the third some kind of compromise between the two others.


(Jakob Borg) #10

I think the first implementation was changed because we wanted to show the name even when the device wasn’t connected.


#11

Makes sense :roll_eyes:. That’s kinda where I was going when I said that in my first post :

remembering the last advertised name we got for each device

Without this, we probably couldn’t show the name when the device isn’t connected and the user wants to use the advertised names, you’re right.


(Vincent Ardern) #12

For what it’s worth: there are at least two of us who would like this enhancement.