arachnetech / homebridge-mqttthing

A plugin for Homebridge allowing the integration of many different accessory types using MQTT.
Apache License 2.0
466 stars 104 forks source link

If history is true, an error occurs if there are two or more services in the custom device. #605

Open zekaizer opened 1 year ago

zekaizer commented 1 year ago

If history is true, an error occurs if there are two or more services in the custom device. If history is set to false, it is added and operated normally.

Error: Cannot add a Service with the same UUID 'E863F007-079E-48FF-8F27-9C2605A29F52' as another Service in this Accessory without also defining a unique 'subtype' property.

config json { "accessory": "mqttthing", "type": "custom", "name": "BoilerReturnValve", "url": "http://192.168.1.2:1883", "logMqtt": true, "history": true, "services": [ { "type": "temperatureSensor", "name": "BoilerReturnValve1", "topics": { "getCurrentTemperature": "sonoff-481e/sensor/returnvelvetemp1/state" } }, { "type": "temperatureSensor", "name": "BoilerReturnValve3", "topics": { "getCurrentTemperature": "sonoff-481e/sensor/returnvelvetemp3/state" } } ] },

error log [1/2/2023, 12:18:04 AM] Registering accessory 'homebridge-mqttthing.mqttthing' [1/2/2023, 12:18:04 AM] [BoilerReturnValve] Loaded homebridge-mqttthing v1.1.43 child bridge successfully [1/2/2023, 12:18:04 AM] Loaded 0 cached accessories from cachedAccessories.0E605202A497. [1/2/2023, 12:18:04 AM] [BoilerReturnValve] MQTT URL: http://192.168.1.2:1883 [1/2/2023, 12:18:04 AM] [BoilerReturnValve] MQTT options: {"keepalive":10,"clientId":"mqttthing_BoilerReturnValve_facd3ece","protocolId":"MQTT","protocolVersion":4,"clean":true,"reconnectPeriod":1000,"connectTimeout":30000,"will":{"topic":"WillMsg","payload":"mqtt-thing [BoilerReturnValve] has stopped","qos":0,"retain":false},"rejectUnauthorized":false} [1/2/2023, 12:18:04 AM] [BoilerReturnValve] Fakegato-storage AddWriter : BoilerReturnValve1 [1/2/2023, 12:18:04 AM] [BoilerReturnValve] Loading... [1/2/2023, 12:18:04 AM] [BoilerReturnValve] Fakegato-storage read FS file: /var/lib/homebridge/oznu-homebridge_BoilerReturnValve1_persist.json [1/2/2023, 12:18:04 AM] [BoilerReturnValve] Fakegato-timer Subscription : BoilerReturnValve1 [1/2/2023, 12:18:04 AM] [BoilerReturnValve] Registring Events BoilerReturnValve1 [1/2/2023, 12:18:04 AM] [BoilerReturnValve] Accessory BoilerReturnValve1 [1/2/2023, 12:18:04 AM] [BoilerReturnValve] Fakegato-storage AddWriter : BoilerReturnValve3 [1/2/2023, 12:18:04 AM] [BoilerReturnValve] Loading... [1/2/2023, 12:18:04 AM] [BoilerReturnValve] Fakegato-storage read FS file: /var/lib/homebridge/oznu-homebridge_BoilerReturnValve3_persist.json [1/2/2023, 12:18:04 AM] [BoilerReturnValve] Fakegato-timer Subscription : BoilerReturnValve3 [1/2/2023, 12:18:04 AM] [BoilerReturnValve] Registring Events BoilerReturnValve3 [1/2/2023, 12:18:04 AM] [BoilerReturnValve] Accessory BoilerReturnValve3 Error: Cannot add a Service with the same UUID 'E863F007-079E-48FF-8F27-9C2605A29F52' 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 /homebridge/node_modules/homebridge/src/bridgeService.ts:507:21 at Array.forEach () at BridgeService.createHAPAccessory (/homebridge/node_modules/homebridge/src/bridgeService.ts:496:16) at ChildBridgeFork.startBridge (/homebridge/node_modules/homebridge/src/childBridgeFork.ts:175:46) [1/2/2023, 12:18:04 AM] [BoilerReturnValve] Child bridge process ended [1/2/2023, 12:18:04 AM] [BoilerReturnValve] Process Ended. Code: 1, Signal: null

asd