Room Assistant / MQTT intermittent

Hey guys, struggling to get started with Room Assistant here. I’ve gotten everything set up and configured with (3) RPi Zero 2 W’s, just tracking one iPhone (BLE) to start. It works, kind of. Within HA, the RA instances are constantly going on/off line, and I can see this in the Mosquitto add-on logs as well:

1641366931: New client connected from 10.10.10.192 as mqttjs_367b2b4d (p2, c1, k60, u'RAPi').
1641366999: Client mqttjs_ed172ec8 disconnected.
1641367019: New connection from 10.10.10.191 on port 1883.
1641367019: New client connected from 10.10.10.191 as mqttjs_8931beb4 (p2, c1, k60, u'RAPi').
1641367021: Client mqttjs_3013b8af disconnected.
1641367041: New connection from 10.10.10.198 on port 1883.
1641367041: New client connected from 10.10.10.198 as mqttjs_5e17d091 (p2, c1, k60, u'RAPi').
1641367054: Client mqttjs_367b2b4d disconnected.
1641367074: New connection from 10.10.10.192 on port 1883.
1641367074: New client connected from 10.10.10.192 as mqttjs_85691cc0 (p2, c1, k60, u'RAPi').
1641367129: Client mqttjs_8931beb4 disconnected.
1641367149: New connection from 10.10.10.191 on port 1883.
1641367149: New client connected from 10.10.10.191 as mqttjs_296fe993 (p2, c1, k60, u'RAPi').
1641367152: Client mqttjs_5e17d091 disconnected.
1641367172: New connection from 10.10.10.198 on port 1883.
1641367172: New client connected from 10.10.10.198 as mqttjs_469a0a6a (p2, c1, k60, u'RAPi').
1641367208: Client mqttjs_85691cc0 disconnected.
1641367228: New connection from 10.10.10.192 on port 1883.
1641367228: New client connected from 10.10.10.192 as mqttjs_1dfe7808 (p2, c1, k60, u'RAPi').
1641367260: Client mqttjs_296fe993 disconnected.
1641367279: New connection from 10.10.10.191 on port 1883.
1641367279: New client connected from 10.10.10.191 as mqttjs_cf7625f5 (p2, c1, k60, u'RAPi').
1641367283: Client mqttjs_469a0a6a disconnected.
1641367302: New connection from 10.10.10.198 on port 1883.
1641367302: New client connected from 10.10.10.198 as mqttjs_abc93429 (p2, c1, k60, u'RAPi').
1641367339: Client mqttjs_1dfe7808 disconnected.
1641367358: New connection from 10.10.10.192 on port 1883.
1641367358: New client connected from 10.10.10.192 as mqttjs_e229a39d (p2, c1, k60, u'RAPi').
1641367390: Client mqttjs_cf7625f5 disconnected.
1641367410: New connection from 10.10.10.191 on port 1883.
1641367410: New client connected from 10.10.10.191 as mqttjs_3bc4071e (p2, c1, k60, u'RAPi').
1641367413: Client mqttjs_abc93429 disconnected.
1641367433: New connection from 10.10.10.198 on port 1883.
1641367433: New client connected from 10.10.10.198 as mqttjs_1c4af219 (p2, c1, k60, u'RAPi').
1641367521: Client mqttjs_3bc4071e disconnected.
1641367527: Socket error on client mqttjs_e229a39d, disconnecting.
1641367541: New connection from 10.10.10.191 on port 1883.
1641367541: New client connected from 10.10.10.191 as mqttjs_16c7f8fe (p2, c1, k60, u'RAPi').
1641367544: Client mqttjs_1c4af219 disconnected.
1641367563: New connection from 10.10.10.198 on port 1883.

My 3 RA instances are IP x.x.x.191, 192, and 198, and you can see them connecting and disconnecting. I’ve noted that the disconnect messages show unique client ID’s, so I’ve ruled that out, and that’s 90% of any troubleshooting google has led me to. I’m not sure if this is a Room Assistant issue or a config issue or an MQTT issue, and I’m not really sure where to go. I’m pretty sure this intermittent connection is the only issue, when devices are online they seem to be accurately tracking my BLE devices just fine.

FWIW, I’ve also confirmed the wifi connection to the Pi’s is stable. This issue appears to be consuming a substantial amount of processing from the Pi’s, as SSH is sometimes noticeably slow to connect and interact.

This has me pretty stumped, and I’ve been at it for hours. Anyone have any tips? Relevant config files below, I think this is all that’s important.

Mosquitto Broker config:

certfile: fullchain.pem
customize:
  active: false
  folder: mosquitto
keyfile: privkey.pem
logins:
  - username: RAPi
    password: ***********
require_certificate: false

Room Assistant Config.yml:

global:
  instanceName: RA_LivingRoom
  integrations:
    - homeAssistant
    - bluetoothLowEnergy
cluster:
  autoDiscovery: true
  port: 6425
  weight: 100
homeAssistant:
  mqttUrl: 'mqtt://192.168.1.2:1883'
  mqttOptions:
    username: RAPi
    password: ***********
bluetoothLowEnergy:
  timeout: 60
  maxDistance: 4.5
  allowlist:
  - '***********' # Matt's iPhone 12

@knissone Hey Matt, did you figure this out? Im having the same issue recently and no leads to solve it… thanks