alexryd / homebridge-shelly-ng

Homebridge plugin for the next generation of Shelly devices
GNU General Public License v3.0
121 stars 44 forks source link

Unique Device Names / Changing Device Names #57

Open swilalaa opened 1 year ago

swilalaa commented 1 year ago

The plugin picks up the device name set up in the webinterface of the shelly device, however it can't be changed afterwards and is not picking up an updated device name.

This causes issues if the shellys are used in plugins such as homebridge-alexa as the devices with the same device names are recognized as duplicates and therefore skipped for adding.

Could you please either build in a logic that creates always unique device names (eg. shelly plus1 N+1) or build in a logic like this that lets the user update the device name in homebridge?

if (this.services[uniq_id] && this.services[uniq_id].service && this.services[uniq_id].service.getCharacteristic(this.Characteristic.ConfiguredName).listenerCount('set') < 1) {

            (this.services[uniq_id].service.getCharacteristic(this.Characteristic.ConfiguredName) ||
              this.services[uniq_id].service.addCharacteristic(this.Characteristic.ConfiguredName))
              .on('set', setConfiguredName.bind(this.services[uniq_id]));
          }

Many thanks in advance!

nscheffer commented 1 year ago

Same for me, any update ?

HDeKnop commented 6 months ago

yes here too