t0bst4r / matterbridge-home-assistant

Apache License 2.0
73 stars 8 forks source link

[Bug]: Alexa can't connect or add bridge after updating to 2.3.0 (server not commissioned) #231

Closed cameronkelley closed 1 month ago

cameronkelley commented 1 month ago

What happened?

This could affect more than just Alexa because what I'm seeing in the logs on 2.3.0 is the following:

[Matterbridge]: The commissioning server on port 5540 for Matterbridge is not commissioned. Pair it scanning the QR code:

When reverting to any prior version (using Docker), it shows already commissioned when starting up and Alexa connects instantly

[Matterbridge]: The commissioning server on port 5540 for Matterbridge is already commissioned. Waiting for controllers to connect ...

I've tried deleting the bridge and all devices from Alexa, but when I go to add it in the Alexa app, it recognizes the QR code and starts the process of connecting, but it never completes and eventually times out after ~5 minutes.

Your configuration

{
  "devices": {
    "vendorId": 0,
    "vendorName": "CK-Matter-Bridge"
  },
  "homeAssistant": {
    "url": "http://192.168.0.109:8123",
    "accessToken": "xxxx",
    "matcher": {
      "includeDomains": [],
      "includePatterns": [
        "cover.garage_door",
        "light.all_lights",
        "light.backyard_lights",
        "light.bedroom_light",
        "light.dining_room_lights_2",
        "light.hall_light",
        "light.kitchen_light",
        "light.living_room_lights_2",
        "light.living_room_ceiling_lights",
        "light.office_lights",
        "lock.front_door_lock",
        "script.all_lights_off",
        "script.goodnight",
        "script.toggle_front_door_lock"
      ],
      "excludeDomains": [],
      "excludePatterns": []
    }
  }
}

Relevant log output

WebSocket - Connecting to WebSocket: ws://192.168.0.109:8283
WebSocket - Connected to WebSocket: ws://192.168.0.109:8283
info - [00:38:20.781] [Matterbridge]: WebSocketServer client "::ffff:192.168.0.200" connected to Matterbridge
WebSocket - Disconnected from WebSocket: ws://192.168.0.109:8283
WebSocket - Reconnecting (attempt 1 of 10) to WebSocket: ws://192.168.0.109:8283
WebSocket - Connecting to WebSocket: ws://192.168.0.109:8283
WebSocket - Connected to WebSocket: ws://192.168.0.109:8283
info - [00:38:26.051] [Matterbridge]: WebSocketServer client "::ffff:192.168.0.200" connected to Matterbridge
info - [00:38:26.058] [PluginManager]: Loading plugin matterbridge-home-assistant type
notice - [00:38:26.335] [PluginManager]: Loaded plugin matterbridge-home-assistant type DynamicPlatform (entrypoint /usr/local/lib/node_modules/matterbridge-home-assistant/lib/index.js)
info - [00:38:26.336] [PluginManager]: Starting plugin matterbridge-home-assistant type DynamicPlatform
warn - [00:38:26.365] [HomeAssistantClient]: 943 entities were registered as Matter devices.Please consider that some matter controllers (e.g. Alexa) cannot handle too much entities to be connected via one matter hub.If you intended to use that much entities and your controller seems to work correct, you can ignore this warning.If you are using a controller like Alexa which doesn't support that much entities, please reduce the number of included entities using the configuration.
info - [00:38:26.467] [Matterbridge]: Added and registered bridged device (1/1) Office Lights (MA-extendedcolorlight) for plugin matterbridge-home-assistant
info - [00:38:26.479] [Matterbridge]: Added and registered bridged device (2/2) All Lights (MA-extendedcolorlight) for plugin matterbridge-home-assistant
info - [00:38:26.491] [Matterbridge]: Added and registered bridged device (3/3) Bedroom Light (MA-colortemperaturelight) for plugin matterbridge-home-assistant
info - [00:38:26.503] [Matterbridge]: Added and registered bridged device (4/4) Backyard Lights (MA-onofflight) for plugin matterbridge-home-assistant
info - [00:38:26.513] [Matterbridge]: Added and registered bridged device (5/5) Hall Light (MA-extendedcolorlight) for plugin matterbridge-home-assistant
info - [00:38:26.522] [Matterbridge]: Added and registered bridged device (6/6) All Lights Off (MA-onoffpluginunit) for plugin matterbridge-home-assistant
info - [00:38:26.531] [Matterbridge]: Added and registered bridged device (7/7) Goodnight (MA-onoffpluginunit) for plugin matterbridge-home-assistant
info - [00:38:26.540] [Matterbridge]: Added and registered bridged device (8/8) Toggle Front Door Lock (MA-onoffpluginunit) for plugin matterbridge-home-assistant
info - [00:38:26.548] [Matterbridge]: Added and registered bridged device (9/9) Living Room Ceiling Lights (MA-dimmablelight) for plugin matterbridge-home-assistant
info - [00:38:26.557] [Matterbridge]: Added and registered bridged device (10/10) Kitchen Light (MA-dimmablelight) for plugin matterbridge-home-assistant
info - [00:38:26.565] [Matterbridge]: Added and registered bridged device (11/11) Garage Door (MA-windowcovering) for plugin matterbridge-home-assistant
info - [00:38:26.573] [Matterbridge]: Added and registered bridged device (12/12) Dining Room Lights (MA-extendedcolorlight) for plugin matterbridge-home-assistant
info - [00:38:26.579] [Matterbridge]: Added and registered bridged device (13/13) Living Room Lights (MA-extendedcolorlight) for plugin matterbridge-home-assistant
info - [00:38:26.597] [Matterbridge]: Added and registered bridged device (14/14) Front Door Lock (MA-doorlock) for plugin matterbridge-home-assistant
notice - [00:38:26.597] [PluginManager]: Started plugin matterbridge-home-assistant type DynamicPlatform
info - [00:38:26.598] [Matterbridge]: The plugin matterbridge-home-assistant is up to date. Current version: 2.3.0, Latest version: 2.3.0
notice - [00:38:27.070] [Matterbridge]: Matter server started
info - [00:38:27.071] [Matterbridge]: The commissioning server on port 5540 for Matterbridge is not commissioned. Pair it scanning the QR code:
info - [00:38:27.072] [Matterbridge]: MatterbridgeqrPairingCode: MT:Y.K90IRV01770V6SM00Manual pairing code: 01137417299
info - [00:38:57.071] [PluginManager]: Configuring plugin matterbridge-home-assistant type DynamicPlatform
notice - [00:38:57.071] [PluginManager]: Configured plugin matterbridge-home-assistant type DynamicPlatform
info - [00:39:27.073] [Matterbridge]: Setting reachability to true for Matterbridge

Version

2.3.0

t0bst4r commented 1 month ago

Could you try it with 2.3.1? If it’s still not working, try to not include the cover.

I am not at home for 3 days. I’ll not be able to do another fix until Thursday.

cameronkelley commented 1 month ago

It's working with 2.3.1, thanks so much for such a quick fix.