kopiro / homebridge-tapo-camera

Homebridge plugin for TP-Link TAPO security cameras
ISC License
119 stars 10 forks source link

Name of the motion sensor accessory is the same for all cameras #130

Open AchilleTalon-Lefuneste opened 2 months ago

AchilleTalon-Lefuneste commented 2 months ago

I recently updated my setting, domoticz, homebridge and nodered included. All motion sensors coming from Tapo camera now have the same name when used in nodered. This seems to have been broken a few months ago, Nov 28 2023, when pushing an update to src/cameraAccessory.ts

Reverting line 187 from const name =Motion Sensor; back to const name =${this.config.name} - Motion; fixed the issue.

Describe The Bug: Every Tapo camera create a motion sensor accessory that has the same name, making it complex to use in nodered for instance.

To Reproduce: Add several Tapo cameras (I have essentially C210s). Do not tick "Disable Motion" in the configuration menu Use node-red-contrib-homebridge-automation Create a hb-event Try to select one motion sensor from the drop-down list: all names are identical

Expected behavior: Have a different and understandable name for each accessory, linked to the camera object name

Logs: none

Screenshots: imagine a dropdown list with 5-10 times "Motion Sensor".

Environment: