marcoraddatz / homebridge-docker

Dockerized Homebridge. No plugins pre-defined, hassle-free setup. Read instructions!
Apache License 2.0
127 stars 47 forks source link

Stopping and restarting container results in duplicate UUID #36

Closed Anthrow closed 5 years ago

Anthrow commented 6 years ago

Hello,

I have my Synology NAS configured to go to a power down state at night and restart the next day. When it does I am getting the following error:

[2017-11-27 19:24:12] Homebridge is running on port 51826. [2017-11-27 19:24:12] [Domoticz] Could not register platform accessory! (Thermostaat) Error: Cannot add a bridged Accessory with the same UUID as another bridged Accessory: f196f105-67c9-4c7b-9495-ba6f125d15fa

After this error occurred I can manually restart the container and the UUID error will be gone and everything will function correctly. Is this an issue with Homebridge or is the Domoticz plugin the culprit? Either way would it be possible for you to give me some advise how to possibly fix this?

marcoraddatz commented 6 years ago

I could be Domoticz, but it also could be Homebridge (main repo). Which version of Homebridge are you using?

Anthrow commented 6 years ago

Your latest docker file, 4.0.

marcoraddatz commented 6 years ago

You might wanna try the develop branch, which uses a newer version of Homebridge. Alternatively, set the version in the .env file to latest.

Anthrow commented 6 years ago

Tried the develop version. Still the same UUID error.

marcoraddatz commented 6 years ago

What about the second option?

Anthrow commented 6 years ago

Yeah also tried that. No effect.

GravityRZ commented 6 years ago

i recently got the same error a simple stop and start solves the problem.

i also did a dsm upgrade followed by a reboot. I think the synology is booting up both domoticz and homebridge and probably homebridge is starting up either to fast or to slow then before Domoticz is completely done with discovering devices. i noticed that when the error appears it took homebridge a lot more time to boot up.

eg docker boot homebridge boot domoticz boot error appears(like in a reboot)

docker already booted domoticz already booted stop/start homebridge everything goes like it should

UPDATE: it looks like the UUID error is there only the first time homebridge is start up. stopping and starting it again makes the error go away.

image

GravityRZ commented 6 years ago

This problem is still there with the latest version. maybe it is a cache problem caused by cached files

marcoraddatz commented 6 years ago

I think it's caused through Domoticz – I've never seen this error in my logs. Might be the cache, as you suggested.

GravityRZ commented 6 years ago

i am not sure Marco.

i found several other threads regarding Homebridge with people with the exact same problem. they however were using the smarthings plugin and not the domoticz plugin.

it only seems to happen with 1 module and that module has the highest idx in Domoticz so it might be a problem with every last mogule which is passed through Homebridge.