fjs21 / homebridge-blueair

BlueAir air purifier plugin for homebridge
https://www.npmjs.com/package/@fjs21/homebridge-blueair
Apache License 2.0
50 stars 6 forks source link

Homebridge keeps restarting with duplicate UUID issue #291

Closed elizhyu closed 1 year ago

elizhyu commented 1 year ago

My Homebridge keeps restarting with the error below.

[5/10/2023, 2:30:43 AM] [BlueAir] Found 2 Blueair AWS-compatible devices.
[5/10/2023, 2:30:43 AM] [BlueAir] Restoring existing accessory from cache: Office Purifier
[5/10/2023, 2:30:44 AM] [BlueAir] Creating new object: BlueAirDustProtectAccessory
[5/10/2023, 2:30:44 AM] Error: Cannot add a Service with the same UUID 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' as another Service in this Accessory without also defining a unique 'subtype' property.
    at Accessory.addService (/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:552:17)
    at PlatformAccessory.addService (/homebridge/node_modules/homebridge/src/platformAccessory.ts:98:41)
    at new BlueAirDustProtectAccessory (/homebridge/node_modules/@fjs21/homebridge-blueair/src/platformAccessory_DustProtect.ts:63:24)
    at BlueAirHomebridgePlatform.findAwsModelAndInitialize (/homebridge/node_modules/@fjs21/homebridge-blueair/src/platform.ts:340:9)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at BlueAirHomebridgePlatform.discoverAwsDevices (/homebridge/node_modules/@fjs21/homebridge-blueair/src/platform.ts:203:9)
[5/10/2023, 2:30:44 AM] Got SIGTERM, shutting down Homebridge...
[5/10/2023, 2:30:49 AM] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null
[5/10/2023, 2:30:54 AM] [HB Supervisor] Restarting Homebridge...
[5/10/2023, 2:30:54 AM] [HB Supervisor] Starting Homebridge with extra flags: -I -P /var/lib/homebridge/node_modules --strict-plugin-resolution
[5/10/2023, 2:30:54 AM] [HB Supervisor] Started Homebridge v1.6.1 with PID: xxxx

Who has any idea what is going on?

andythetech commented 1 year ago

Experiencing this same issue, UUID is appearing as all zeroes

AGnepp commented 1 year ago

I'm also having this issue. I tried adding property "Disable.UUID" and same issue.

I have a Protect 7470i and enabled AWS API Connection. It seems to see my device in the logs but then errors out and description above is exactly what I'm experiencing

andythetech commented 1 year ago

Found that I was able to fix this issue by turning off bridge mode for the BlueAir plugin.

AGnepp commented 1 year ago

Thanks for the tip, I had child bridge disabled before, and then I tried to enable child bridge and it no longer crashed homebridge but it keeps looping in this cycle: [20/05/2023, 16:46:59] [@fjs21/homebridge-blueair] Restarting Process... [20/05/2023, 16:47:02] [@fjs21/homebridge-blueair] Launched child bridge with PID 4563 [20/05/2023, 16:47:06] Registering platform '@fjs21/homebridge-blueair.BlueAir' [20/05/2023, 16:47:06] [@fjs21/homebridge-blueair] Loaded @fjs21/homebridge-blueair v1.2.1 child bridge successfully [20/05/2023, 16:47:06] Loaded 1 cached accessories from cachedAccessories.XXXXXXXXXXXX. [20/05/2023, 16:47:06] [@fjs21/homebridge-blueair] base_API_url: https://api.blueair.io/v2/user/agnepp@gmail.com/homehost/ [20/05/2023, 16:47:06] [@fjs21/homebridge-blueair] Current Gigya Region: us1 [20/05/2023, 16:47:06] [@fjs21/homebridge-blueair] Current AWS Region: us-east-2 [20/05/2023, 16:47:06] [@fjs21/homebridge-blueair] Loading accessory from cache: Second Floor Purifier [20/05/2023, 16:47:06] [@fjs21/homebridge-blueair] Blueair AWS API Tokens will expire at: Sun May 21 2023 16:47:06 GMT-0400 (Eastern Daylight Time) [20/05/2023, 16:47:06] Homebridge v1.6.1 (HAP v0.11.1) (@fjs21/homebridge-blueair) is running on port 45655. [20/05/2023, 16:47:07] [@fjs21/homebridge-blueair] Got homehost: api-us-east-1.blueair.io [20/05/2023, 16:47:07] [@fjs21/homebridge-blueair] x-auth-token: LONG STRING HERE [20/05/2023, 16:47:07] [@fjs21/homebridge-blueair] Found 0 devices. [20/05/2023, 16:47:08] [@fjs21/homebridge-blueair] AWS login complete [20/05/2023, 16:47:09] [@fjs21/homebridge-blueair] Found 1 Blueair AWS-compatible devices. [20/05/2023, 16:47:09] [@fjs21/homebridge-blueair] Restoring existing accessory from cache: Second Floor Purifier [20/05/2023, 16:47:10] [@fjs21/homebridge-blueair] Creating new object: BlueAirDustProtectAccessory Error: Cannot add a Service with the same UUID '00000049-0000-1000-8000-0026BB765291' as another Service in this Accessory without also defining a unique 'subtype' property. at Accessory.addService (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:552:17) at PlatformAccessory.addService (/var/lib/homebridge/node_modules/homebridge/src/platformAccessory.ts:98:41) at BlueAirDustProtectAccessory.setAccessoryInformation (/var/lib/homebridge/node_modules/@fjs21/homebridge-blueair/src/platformAccessory_DustProtect.ts:180:26) at processTicksAndRejections (node:internal/process/task_queues:95:5) [20/05/2023, 16:47:12] [@fjs21/homebridge-blueair] Child bridge process ended [20/05/2023, 16:47:12] [@fjs21/homebridge-blueair] Process Ended. Code: 1, Signal: null

Are you adding any "Feature Options" Manually? I tried adding "Disable.UUID" and that did not help.

shalva-an commented 1 year ago

Enable "Hide Germ Shield". Some issue with the function where it sets the UUID as '00000049-0000-1000-8000-0026BB765291' for two or more of the sensors. Restart, clear cache if needed, and you should be good to go.

homebridge-blueair/dist/platformAccessory_DustProtect.js, line

elizhyu commented 1 year ago

@AGnepp https://github.com/fjs21/homebridge-blueair/issues/291#issuecomment-1555990594

I'm also having this issue. I tried adding property "Disable.UUID" and same issue.

I have a Protect 7470i and enabled AWS API Connection. It seems to see my device in the logs but then errors out and description above is exactly what I'm experiencing

Adding the Disable.UUID actually solved my problem. I also removed and re-added the blueair plugin, maybe missing that caused your problem?


@shalva-an https://github.com/fjs21/homebridge-blueair/issues/291#issuecomment-1583116750

Enable "Hide Germ Shield". Some issue with the function where it sets the UUID as '00000049-0000-1000-8000-0026BB765291' for two or more of the sensors. Restart, clear cache if needed, and you should be good to go.

homebridge-blueair/dist/platformAccessory_DustProtect.js, line

Enable the Hide Germ Shield is causing this error my setup:

[6/8/2023, 3:34:54 PM] [BlueAir] BlueAir API: error - Time out on BlueAir connection.
[6/8/2023, 3:34:54 PM] [BlueAir] Failed to login. Check password and restart Homebridge to try again.

Considering the previous solution already solved my problem, I'm not using this.