Done a lot of testing, again with AI. Here’s what we see:
harry1@rooftop-bridge:~/sendspin-bt-bridge $ ^C
harry1@rooftop-bridge:~/sendspin-bt-bridge $ docker logs sendspin-client 2>&1 | grep -i "mqtt\|disconnect\|error" | tail -50
2026-04-30 15:58:57,533 - sendspin_bridge.bridge.client - ERROR - [Rooftop BT @ rooftop-bridge] daemon stderr: Failed to load cookie file from cookie: No such file or directory
2026-04-30 15:58:57,711 - sendspin_bridge.bridge.client - ERROR - [Rooftop BT @ rooftop-bridge] daemon stderr: Failed to load cookie file from cookie: No such file or directory
2026-04-30 15:58:57,883 - sendspin_bridge.bridge.client - ERROR - [Rooftop BT @ rooftop-bridge] daemon stderr: Failed to load cookie file from cookie: No such file or directory
2026-04-30 15:58:58,033 - sendspin_bridge.bridge.client - ERROR - [Rooftop BT @ rooftop-bridge] daemon stderr: Failed to load cookie file from cookie: No such file or directory
2026-04-30 15:58:58,198 - sendspin_bridge.bridge.client - ERROR - [Rooftop BT @ rooftop-bridge] daemon stderr: Failed to load cookie file from cookie: No such file or directory
2026-04-30 15:58:58,391 - sendspin_bridge.bridge.client - INFO - [Rooftop BT @ rooftop-bridge/proc] Server disconnected
2026-04-30 16:03:11,455 - sendspin_bridge.bridge.client - INFO - [Rooftop BT @ rooftop-bridge/proc] Server disconnected
2026-04-30 16:03:54,106 - sendspin_bridge.services.ha.ha_mqtt_publisher - INFO - HA MQTT: connecting to 192.168.1.55:1883
2026-04-30 16:03:55,378 - websockets.client - DEBUG - < TEXT '{"message_id":"4","error_code":12,"details":"In...and: subscribe_events"}' [80 bytes]
raise TimeoutError()
TimeoutError
2026-04-30 16:03:55,576 - sendspin_bridge.web.routes.ma_groups - ERROR - MA mDNS discovery failed
raise RuntimeError("Discovery failed")
RuntimeError: Discovery failed
2026-04-30 16:04:22,016 - sendspin_bridge.bridge.client - ERROR - [Rooftop BT @ rooftop-bridge] daemon stderr: Failed to load cookie file from cookie: No such file or directory
2026-04-30 16:04:22,516 - sendspin_bridge.bridge.client - ERROR - [Rooftop BT @ rooftop-bridge] daemon stderr: Failed to load cookie file from cookie: No such file or directory
2026-04-30 16:04:22,581 - sendspin_bridge.bridge.client - ERROR - [Rooftop BT @ rooftop-bridge] daemon stderr: Failed to load cookie file from cookie: No such file or directory
2026-04-30 16:04:22,645 - sendspin_bridge.bridge.client - ERROR - [Rooftop BT @ rooftop-bridge] daemon stderr: Failed to load cookie file from cookie: No such file or directory
2026-04-30 16:04:24,515 - sendspin_bridge.bridge.client - ERROR - [Rooftop BT @ rooftop-bridge] daemon stderr: Failed to load cookie file from cookie: No such file or directory
2026-04-30 16:04:24,567 - sendspin_bridge.bridge.client - ERROR - [Rooftop BT @ rooftop-bridge] daemon stderr: Failed to load cookie file from cookie: No such file or directory
2026-04-30 16:04:24,744 - sendspin_bridge.bridge.client - ERROR - [Rooftop BT @ rooftop-bridge] daemon stderr: Failed to load cookie file from cookie: No such file or directory
2026-04-30 16:04:24,991 - sendspin_bridge.bridge.client - ERROR - [Rooftop BT @ rooftop-bridge] daemon stderr: Failed to load cookie file from cookie: No such file or directory
2026-04-30 16:04:25,196 - sendspin_bridge.bridge.client - ERROR - [Rooftop BT @ rooftop-bridge] daemon stderr: Failed to load cookie file from cookie: No such file or directory
2026-04-30 16:04:25,329 - sendspin_bridge.bluetooth.dbus - DEBUG - D-Bus battery read failed: org.freedesktop.DBus.Error.InvalidArgs: No such interface 'org.bluez.Battery1'
2026-04-30 16:04:25,440 - sendspin_bridge.bridge.client - ERROR - [Rooftop BT @ rooftop-bridge] daemon stderr: Failed to load cookie file from cookie: No such file or directory
2026-04-30 16:04:25,633 - sendspin_bridge.bridge.client - ERROR - [Rooftop BT @ rooftop-bridge] daemon stderr: Failed to load cookie file from cookie: No such file or directory
2026-04-30 16:04:25,890 - sendspin_bridge.bridge.client - ERROR - [Rooftop BT @ rooftop-bridge] daemon stderr: Failed to load cookie file from cookie: No such file or directory
2026-04-30 16:04:37,599 - sendspin_bridge.bridge.client - ERROR - [Rooftop BT @ rooftop-bridge] daemon stderr: Failed to load cookie file from cookie: No such file or directory
2026-04-30 16:04:46,648 - sendspin_bridge.bridge.client - INFO - [Rooftop BT @ rooftop-bridge/proc] Server disconnected
2026-04-30 16:04:47,640 - sendspin_bridge.bridge.client - INFO - [Rooftop BT @ rooftop-bridge/proc] Disconnecting from previous server
2026-04-30 16:04:47,666 - sendspin_bridge.bridge.client - ERROR - [Rooftop BT @ rooftop-bridge] daemon stderr: Failed to load cookie file from cookie: No such file or directory
2026-04-30 16:04:47,762 - sendspin_bridge.bridge.client - ERROR - [Rooftop BT @ rooftop-bridge] daemon stderr: Failed to load cookie file from cookie: No such file or directory
2026-04-30 16:04:47,939 - sendspin_bridge.bridge.client - ERROR - [Rooftop BT @ rooftop-bridge] daemon stderr: Failed to load cookie file from cookie: No such file or directory
2026-04-30 16:04:48,164 - sendspin_bridge.bridge.client - ERROR - [Rooftop BT @ rooftop-bridge] daemon stderr: Failed to load cookie file from cookie: No such file or directory
2026-04-30 16:04:48,352 - sendspin_bridge.bridge.client - ERROR - [Rooftop BT @ rooftop-bridge] daemon stderr: Failed to load cookie file from cookie: No such file or directory
2026-04-30 16:04:48,545 - sendspin_bridge.bridge.client - ERROR - [Rooftop BT @ rooftop-bridge] daemon stderr: Failed to load cookie file from cookie: No such file or directory
2026-04-30 16:04:48,733 - sendspin_bridge.bridge.client - ERROR - [Rooftop BT @ rooftop-bridge] daemon stderr: Failed to load cookie file from cookie: No such file or directory
2026-04-30 16:04:48,975 - sendspin_bridge.bridge.client - ERROR - [Rooftop BT @ rooftop-bridge] daemon stderr: Failed to load cookie file from cookie: No such file or directory
2026-04-30 16:04:55,389 - sendspin_bridge.bluetooth.dbus - DEBUG - D-Bus battery read failed: org.freedesktop.DBus.Error.InvalidArgs: No such interface 'org.bluez.Battery1'
2026-04-30 16:05:18,778 - sendspin_bridge.bridge.client - INFO - [Rooftop BT @ rooftop-bridge/proc] Disconnecting from previous server
2026-04-30 16:05:18,884 - sendspin_bridge.bridge.client - ERROR - [Rooftop BT @ rooftop-bridge] daemon stderr: Failed to load cookie file from cookie: No such file or directory
2026-04-30 16:05:19,010 - sendspin_bridge.bridge.client - ERROR - [Rooftop BT @ rooftop-bridge] daemon stderr: Failed to load cookie file from cookie: No such file or directory
2026-04-30 16:05:19,206 - sendspin_bridge.bridge.client - ERROR - [Rooftop BT @ rooftop-bridge] daemon stderr: Failed to load cookie file from cookie: No such file or directory
2026-04-30 16:05:19,363 - sendspin_bridge.bridge.client - ERROR - [Rooftop BT @ rooftop-bridge] daemon stderr: Failed to load cookie file from cookie: No such file or directory
2026-04-30 16:05:19,549 - sendspin_bridge.bridge.client - ERROR - [Rooftop BT @ rooftop-bridge] daemon stderr: Failed to load cookie file from cookie: No such file or directory
2026-04-30 16:05:19,703 - sendspin_bridge.bridge.client - ERROR - [Rooftop BT @ rooftop-bridge] daemon stderr: Failed to load cookie file from cookie: No such file or directory
2026-04-30 16:05:19,886 - sendspin_bridge.bridge.client - ERROR - [Rooftop BT @ rooftop-bridge] daemon stderr: Failed to load cookie file from cookie: No such file or directory
2026-04-30 16:05:20,060 - sendspin_bridge.bridge.client - ERROR - [Rooftop BT @ rooftop-bridge] daemon stderr: Failed to load cookie file from cookie: No such file or directory
2026-04-30 16:05:20,257 - sendspin_bridge.bridge.client - INFO - [Rooftop BT @ rooftop-bridge/proc] Server disconnected
2026-04-30 16:05:25,410 - sendspin_bridge.bluetooth.dbus - DEBUG - D-Bus battery read failed: org.freedesktop.DBus.Error.InvalidArgs: No such interface 'org.bluez.Battery1'
harry1@rooftop-bridge:~/sendspin-bt-bridge $ docker logs sendspin-client 2>&1 | grep -i "HA MQTT" | tail -20
2026-04-30 15:32:12,577 - sendspin_bridge.services.ha.ha_mqtt_publisher - INFO - HA MQTT: connecting to 192.168.1.55:1883
2026-04-30 15:35:28,180 - sendspin_bridge.services.ha.ha_mqtt_publisher - INFO - HA MQTT: connecting to 192.168.1.55:1883
2026-04-30 15:51:09,423 - sendspin_bridge.services.ha.ha_mqtt_publisher - INFO - HA MQTT: connecting to 192.168.1.55:1883
2026-04-30 15:54:17,550 - sendspin_bridge.services.ha.ha_mqtt_publisher - WARNING - HA MQTT command loop error: Disconnected during message iteration
2026-04-30 15:57:32,056 - sendspin_bridge.services.ha.ha_mqtt_publisher - INFO - HA MQTT: connecting to 192.168.1.55:1883
2026-04-30 16:03:54,106 - sendspin_bridge.services.ha.ha_mqtt_publisher - INFO - HA MQTT: connecting to 192.168.1.55:1883
harry1@rooftop-bridge:~/sendspin-bt-bri
And here is what AI is saying:
Bridge version: 2.66.18
Mosquitto log shows client sendspin_b9d126e6f669 connected successfully with username harryfine. Bridge log shows “HA MQTT: connecting to 192.168.1.55:1883” but no connection success message.
Then “HA MQTT command loop error: Disconnected during message iteration” appears. The connection works but immediately fails during the message exchange. What MQTT messages is the bridge trying to send immediately after connecting? The developer needs to look at the bridge’s MQTT library implementation. The connection is being established at the TCP level, but the Python MQTT client is not completing its handshake properly. This is likely a bug in the async MQTT library that the bridge uses.
Further evidence that it does connect can be found in Home Assistant’s Mosquitto logs abouit 10 lines from the bottom:
[15:56:24] INFO: Starting NGINX for authentication handling...
[15:56:24] INFO: Starting mosquitto MQTT broker...
2026-04-30 15:56:24: Info: running mosquitto as user: root.
2026-04-30 15:56:24: Warning: Mosquitto should not be run as root/administrator.
2026-04-30 15:56:24: Restored 262 base messages
2026-04-30 15:56:24: Restored 262 retained messages
2026-04-30 15:56:24: Restored 0 clients
2026-04-30 15:56:24: Restored 0 subscriptions
2026-04-30 15:56:24: Restored 0 client messages
2026-04-30 15:56:24: mosquitto version 2.1.2 starting
2026-04-30 15:56:24: Config loaded from /etc/mosquitto/mosquitto.conf.
2026-04-30 15:56:24: Bridge support available.
2026-04-30 15:56:24: Persistence support available.
2026-04-30 15:56:24: TLS support available.
2026-04-30 15:56:24: TLS-PSK support available.
2026-04-30 15:56:24: Websockets support available.
2026-04-30 15:56:24: Loading plugin: /usr/share/mosquitto/go-auth.so
2026-04-30 15:56:24: ├── Username/password checking enabled.
2026-04-30 15:56:24: ├── TLS-PSK checking enabled.
2026-04-30 15:56:24: └── Extended authentication not enabled.
2026-04-30 15:56:24: Plugin has registered to receive 'reload' events.
2026-04-30 15:56:24: Plugin has registered to receive 'basic-auth' events.
2026-04-30 15:56:24: Plugin has registered to receive 'acl-check' events.
2026-04-30 15:56:24: Plugin has registered to receive 'psk-key' events.
2026-04-30 15:56:24: Opening ipv4 listen socket on port 1883.
2026-04-30 15:56:24: Opening ipv6 listen socket on port 1883.
2026-04-30 15:56:24: Opening ipv4 listen socket on port 1884.
2026-04-30 15:56:24: Opening ipv6 listen socket on port 1884.
2026-04-30 15:56:24: Opening ipv4 listen socket on port 8883.
2026-04-30 15:56:24: Opening ipv6 listen socket on port 8883.
2026-04-30 15:56:24: Opening ipv4 listen socket on port 8884.
2026-04-30 15:56:24: Opening ipv6 listen socket on port 8884.
2026-04-30 15:56:24: mosquitto version 2.1.2 running
2026-04-30 15:56:24: New connection from ::1:40378 on port 1883.
2026-04-30 15:56:24: Protocol error from ::1:40378: First packet not CONNECT (0A).
2026-04-30 15:56:24: Client ::1 [::1:40378] disconnected: protocol error.
[15:56:24] INFO: Successfully send discovery information to Home Assistant.
[15:56:25] INFO: Successfully send service information to the Supervisor.
2026-04-30 15:56:25: New connection from 172.30.33.2:45220 on port 1883.
2026-04-30 15:56:25: New client connected from 172.30.33.2:45220 as mqttjs_6082cb07 (p4, c1, k60, u'addons').
2026-04-30 15:56:26: New connection from 172.30.32.1:42347 on port 1883.
2026-04-30 15:56:26: New client connected from 172.30.32.1:42347 as 1VjouLUKiHJxLoLbzGtOZP (p4, c1, k60, u'homeassistant').
2026-04-30 15:56:31: New connection from 172.30.32.1:37082 on port 1883.
2026-04-30 15:56:31: New client connected from 172.30.32.1:37082 as frigate (p4, c1, k60, u'harryfine').
2026-04-30 15:56:48: New connection from 172.30.32.2:38854 on port 1883.
2026-04-30 15:56:48: Client 172.30.32.2 [172.30.32.2:38854] disconnected: connection closed by client.
2026-04-30 15:57:32: New connection from 192.168.1.117:35733 on port 1883.
2026-04-30 15:57:33: New client connected from 192.168.1.117:35733 as sendspin_b9d126e6f669 (p4, c1, k60, u'harryfine').
2026-04-30 15:58:48: New connection from 172.30.32.2:40848 on port 1883.
2026-04-30 15:58:48: Client 172.30.32.2 [172.30.32.2:40848] disconnected: connection closed by client.
2026-04-30 16:00:48: New connection from 172.30.32.2:58574 on port 1883.
2026-04-30 16:00:48: Client 172.30.32.2 [172.30.32.2:58574] disconnected: connection closed by client.
2026-04-30 16:01:22: New connection from 192.168.1.117:37936 on port 1883.
2026-04-30 16:01:22: New client connected from 192.168.1.117:37936 as auto-1C917D6B-39F5-62F9-FA23-1BC19BDB8B55 (p4, c1, k60, u'harryfine').
2026-04-30 16:01:22: Client auto-1C917D6B-39F5-62F9-FA23-1BC19BDB8B55 [192.168.1.117:37936] disconnected.
2026-04-30 16:02:48: New connection from 172.30.32.2:40524 on port 1883.
2026-04-30 16:02:48: Client 172.30.32.2 [172.30.32.2:40524] disconnected: connection closed by client.
2026-04-30 16:03:14: Client sendspin_b9d126e6f669 [192.168.1.117:35733] disconnected.
2026-04-30 16:03:54: New connection from 192.168.1.117:60003 on port 1883.
2026-04-30 16:03:55: New client connected from 192.168.1.117:60003 as sendspin_b9d126e6f669 (p4, c1, k60, u'harryfine').
2026-04-30 16:04:46: New connection from 192.168.1.117:52346 on port 1883.
2026-04-30 16:04:46: Client 192.168.1.117 [192.168.1.117:52346] disconnected: connection closed by client.
2026-04-30 16:04:48: New connection from 172.30.32.2:54086 on port 1883.
2026-04-30 16:04:48: Client 172.30.32.2 [172.30.32.2:54086] disconnected: connection closed by client.
2026-04-30 16:06:48: New connection from 172.30.32.2:49408 on port 1883.
2026-04-30 16:06:48: Client 172.30.32.2 [172.30.32.2:49408] disconnected: connection closed by client.
2026-04-30 16:08:48: New connection from 172.30.32.2:59832 on port 1883.
2026-04-30 16:08:48: Client 172.30.32.2 [172.30.32.2:59832] disconnected: connection closed by client.