Page 1 of 1

Renaming a device from a script

PostPosted: Sat Jul 07, 2018 1:23 pm
by mundmc
I know attributes like folderId can be modified, but can the device.name be changed from a script?

I want to move to select devices to a new folder and rename them, but I can only change their folder, while their name remains the same. Additionally, no error is thrown.

dev.name = “NEWNAME”


Sent from my iPhone using Tapatalk

Re: Renaming a device from a script

PostPosted: Sat Jul 07, 2018 2:30 pm
by howartp
I think you need dev.updateOnServer() after dev.name =


Sent from my iPhone using Tapatalk Pro

Re: Renaming a device from a script

PostPosted: Sat Jul 07, 2018 4:32 pm
by matt (support)
Close, the API name is dev.replaceOnServer().

Re: Renaming a device from a script

PostPosted: Sat Jul 07, 2018 5:31 pm
by mundmc
matt (support) wrote:
Close, the API name is dev.replaceOnServer().


Doh! I read that but thought it was specific to developing plugins (I’m sure I’m confusing it with somethingSomethingServer(,)).

Many thanks! I now auto-name devices for guests on my wifi! I also log device names and MAC numbers if my home-grown alarm gets tripped!


Sent from my iPhone using Tapatalk