PatchworkBoy / homebridge-edomoticz

Domoticz Homebridge-Plugin
Other
118 stars 43 forks source link

Error after restarting home bridge #108

Closed samwelnella closed 7 years ago

samwelnella commented 7 years ago

Hi,

I'm having some issues with edomoticz. It works on first run but if I restart Homebridge it fails with errors. Deleting the accessories folder in Homebridge fixes the issue until the next time Homebridge needs to be restarted.

These are the errors I get when restarting:

Sep 14 02:49:23 raspberrypi homebridge[16223]: /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Service.js:80 Sep 14 02:49:23 raspberrypi homebridge[16223]: throw new Error("Cannot add a Characteristic with the same UUID as another Characteristic in this Service: " + existing.UUID); Sep 14 02:49:23 raspberrypi homebridge[16223]: ^ Sep 14 02:49:23 raspberrypi homebridge[16223]: Error: Cannot add a Characteristic with the same UUID as another Characteristic in this Service: E863F10F-079E-48FF-8F27-9C2605A29F52 Sep 14 02:49:23 raspberrypi homebridge[16223]: at Service.addCharacteristic (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Service.js:80:13) Sep 14 02:49:23 raspberrypi homebridge[16223]: at Service.getCharacteristic (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Service.js:162:19) Sep 14 02:49:23 raspberrypi homebridge[16223]: at eDomoticzAccessory.getCharacteristic (/usr/local/lib/node_modules/homebridge-edomoticz/lib/domoticz_accessory.js:102:32) Sep 14 02:49:23 raspberrypi homebridge[16223]: at eDomoticzAccessory.gracefullyAddCharacteristic (/usr/local/lib/node_modules/homebridge-edomoticz/lib/domoticz_accessory.js:114:29) Sep 14 02:49:23 raspberrypi homebridge[16223]: at eDomoticzAccessory.getServices (/usr/local/lib/node_modules/homebridge-edomoticz/lib/domoticz_accessory.js:1409:13) Sep 14 02:49:23 raspberrypi homebridge[16223]: at eDomoticzAccessory.publishServices (/usr/local/lib/node_modules/homebridge-edomoticz/lib/domoticz_accessory.js:76:23) Sep 14 02:49:23 raspberrypi homebridge[16223]: at eDomoticzAccessory (/usr/local/lib/node_modules/homebridge-edomoticz/lib/domoticz_accessory.js:68:7) Sep 14 02:49:23 raspberrypi homebridge[16223]: at eDomoticzPlatform.configureAccessory (/usr/local/lib/node_modules/homebridge-edomoticz/index.js:221:21) Sep 14 02:49:23 raspberrypi homebridge[16223]: at Server._configCachedPlatformAccessories (/usr/local/lib/node_modules/homebridge/lib/server.js:342:24) Sep 14 02:49:23 raspberrypi homebridge[16223]: at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:83:8) Sep 14 02:49:23 raspberrypi homebridge[16223]: at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:40:10) Sep 14 02:49:23 raspberrypi homebridge[16223]: at Object.<anonymous> (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22) Sep 14 02:49:23 raspberrypi homebridge[16223]: at Module._compile (module.js:571:32) Sep 14 02:49:23 raspberrypi homebridge[16223]: at Object.Module._extensions..js (module.js:580:10) Sep 14 02:49:23 raspberrypi homebridge[16223]: at Module.load (module.js:488:32) Sep 14 02:49:23 raspberrypi homebridge[16223]: at tryModuleLoad (module.js:447:12)

Any idea what could be wrong? Thanks for a great plugin!

samwelnella commented 7 years ago

The issue seems to stem from the barometer and weather characteristics having hardcoded UUIDs. Removing the Dark Sky device from Domoticz (and thus any barometer and weather devices) seems to have fixed the issue for now.