nitaybz / homebridge-sensibo-ac

Homebridge plugin for Sensibo - Smart AC Control
GNU General Public License v3.0
71 stars 15 forks source link

[2.5.0] Cannot add a Service with the same UUID and subtype 'LightSwitch' #141

Closed y0m1g closed 4 months ago

y0m1g commented 4 months ago

Hello! I'm getting this error after updating (from 2.3.4) to 2.5.0:

[7/12/2024, 3:05:08 PM] Error: Cannot add a Service with the same UUID '00000043-0000-1000-8000-0026BB765291' and subtype 'LightSwitch' as another Service in this Accessory.
    at Accessory.addService (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:561:17)
    at PlatformAccessory.addService (/usr/local/lib/node_modules/homebridge/src/platformAccessory.ts:99:41)
    at AirConditioner.addLightSwitch (/usr/local/lib/node_modules/homebridge-sensibo-ac/homekit/AirConditioner.js:467:45)
    at new AirConditioner (/usr/local/lib/node_modules/homebridge-sensibo-ac/homekit/AirConditioner.js:133:9)
    at /usr/local/lib/node_modules/homebridge-sensibo-ac/sensibo/syncHomeKitCache.js:39:29
    at Array.forEach (<anonymous>)
    at SensiboACPlatform.syncHomeKitCache (/usr/local/lib/node_modules/homebridge-sensibo-ac/sensibo/syncHomeKitCache.js:12:20)
    at HomebridgeAPI.<anonymous> (/usr/local/lib/node_modules/homebridge-sensibo-ac/index.js:134:9)

Debug logs are here: homebridge.log.txt

This make HB crash and reboot forever. Not sure how to fix this in my config 🤔

benwebbbenwebb commented 4 months ago

Sorry to hear about the issue @y0m1g!

Thanks for providing the details and logs. Sounds like an issue with adding a switch for the “light” on the AC unit (I’ve never had that option myself… out of curiosity is it controlling an actual light for the room or is it more like a status LED?).

As a workaround, and to help isolate the issue, in your settings.json within Homebridge please try adding "disableLightSwitch": true.

If that works, please then check in your Apple Home app (or equivalent) if a light switch (for the AC light, as opposed to other settings like ClimateReact) is still showing.

If it is you’ll need to remove your AC unit from Homebridge. The plugin should then re-add it and hopefully clean up the mismatch. To do this:

  1. navigate to the Homebridge Settings page
  2. scroll to and click Remove Single Cached Accessory
  3. click the delete icon next to the appropriate accessory (Condo AC I believe)
  4. save and restart Homebridge

Please let me know how you go!

benwebbbenwebb commented 4 months ago

Hi @y0m1g

Not sure if you had a chance to try my suggestion from a few days ago, if not that's totally fine, wanted to make you aware that I've pushed a patch, v.2.5.1, that should (in code) resolve the issue you described (without you needing to do the other steps mentioned).

If you're therefore able to update to v2.5.1 and try it out that would be really helpful.

Thanks

y0m1g commented 4 months ago

Hello! Sorry I did not check my notifications this week-end... thank you for providing a detailed workaround. Though I went directly with testing 2.5.1 since you released it, and everything's working fine again! 🙌

To answer your previous question, the AC light is actually the display of the target temperature on the unit.

Thank you very much for your quick support. Let me know if you need me to test anything else later on.

benwebbbenwebb commented 4 months ago

Great, thanks for confirming @y0m1g

142 raised to merge the fix to master, will close this now.