sfeakes / homebridge-aqualinkd

1 stars 2 forks source link

Error: Cannot add a bridged Accessory with the same UUID as another bridged Accessory (Spa_Heater) #15

Open 88gts opened 1 year ago

88gts commented 1 year ago

hey everyone, i run into this issue randomly every week or so and it prevents Homebridge from initing. it only happens if i don't exclude ["Spa_Heater"] in my config.json. do you know how i can prevent this from happening? i am attaching the offending UUIDs in accessories/cachedAccessores workaround is to remove exclude Spa_Heater but i would really like that accessory.

thanks

  {
    "plugin": "homebridge-aqualinkd",
    "platform": "aqualinkd",
    "displayName": "Spa Heater",
    "UUID": "bda28628-38fd-4754-ab67-556b6f00f155",
    "category": 1,
    "context": {
      "device": {
        "type": "switch",
        "id": "Spa_Heater",
        "name": "Spa Heater",
        "state": "off",
        "status": "off",
        "int_status": "0",
        "type_ext": "switch_timer",
        "timer_active": "off"
      },
      "uuid": "bda28628-38fd-4754-ab67-556b6f00f155"
    },
    "linkedServices": {
      "0000003E-0000-1000-8000-0026BB765291": [],
      "00000049-0000-1000-8000-0026BB765291": []
    },
 {
    "plugin": "homebridge-aqualinkd",
    "platform": "aqualinkd",
    "displayName": "Spa Heater",
    "UUID": "bda28628-38fd-4754-ab67-556b6f00f155",
    "category": 1,
    "context": {
      "device": {
        "type": "setpoint_thermo",
        "id": "Spa_Heater",
        "name": "Spa Heater",
        "state": "off",
        "status": "off",
        "spvalue": "29.44",
        "value": "-572.78",
        "int_status": "0",
        "timer_active": "off"
      },
      "uuid": "bda28628-38fd-4754-ab67-556b6f00f155"
    },
    "linkedServices": {
      "0000003E-0000-1000-8000-0026BB765291": [],
      "0000004A-0000-1000-8000-0026BB765291": []
    },
sfeakes commented 1 year ago

Can you post the versions of AqualinkD, homebridge-aqualinkd & homebridge you are using.

The issue of not re-creating due to existing UUID sounds like a bug that I'll look into. But the reason it's happening can probably be overcome.

AqualinkD will find devices on startup, and this can take some time depending on the config. So each time AqualinkD starts it starts with no heaters, then after about a minute it should find them if they exist.

homebridge-aqualinkd dynamically creates / changes & deletes devices in homebridge depending on what AqualinkD tells it it has. homebridge-aqualinkd will poll AqualinkD on startup and every 10 minutes after that.

So it sounds like homebridge-aqualinkd is polling aqualinkd when it has not found the heaters (ie starting up), hence deletes any that are cached, then when aqualinkd finds them homebridge-aqualinkd re-creates them. (ie 2nd poll 10 mins later).

The missing heaters will only happen if you stop/start aqualinkd, once it's found them they are persistent until next re-start. So it sounds like this must be after a re-start, it should not "randomly" happen. Way round this as mentioned in the aqualinkd wiki is to not start aqualinkd and homebridge at the same time, if they exist on the same machine (ie both start at boot), delay the homebridge start for a minute or two.

88gts commented 1 year ago

correct, this happens randomly but only after a reboot, ill increase the sleep time and see if it helps.

homebridge-aqualinkd 0.2.8 homebridge 1.6.1

sfeakes commented 1 year ago

I just posted an update to AqualinkD that will help. With version 3.2.0f there are two things you can add in the config. This will force the pool / spa set points on startup.

force_PS_setpoints = yes
88gts commented 1 year ago

thanks, just installed and updated the config. you mentioned two things, what's the other?

sfeakes commented 1 year ago

Sorry, one config line does two things. Ie one setting will set both pool and spa heaters.

but I did just realize that a left an experimental setting on when I uploaded, I just uploaded again but didn’t change the version. Can you please also put this in the config just to make sure. It’s nothing to do with your issue and will only create a problem if it’s left to yes in this version. This is in the aqualinkd.conf (not Homebridge)

prioritize_ack = no

88gts commented 1 year ago

done!