Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot add matter hub #134009

Open
secretMoi opened this issue Dec 25, 2024 · 4 comments
Open

Cannot add matter hub #134009

secretMoi opened this issue Dec 25, 2024 · 4 comments

Comments

@secretMoi
Copy link

secretMoi commented Dec 25, 2024

The problem

I'm trying to setup my first Matter network

I'm starting to add my hub (Aqara M3), no problem setting it up in Aqara App, Google Home and Alexa.
But I'm unable to add it to home assistant. I tried to add it as new and as used one but it fails each time.
I updated Aqara M3 to latest firmware.
I'm using python-matter-server in my docker compose on same host
The server is well recognized by HA, it's only to add device (my hub) that I'm facing issue

What version of Home Assistant Core has the issue?

2024.12.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Matter

Link to integration documentation on our website

https://www.home-assistant.io/integrations/matter/

Diagnostics information

2024-12-25 22:02:47 2024-12-25 21:02:47.776 (MainThread) INFO [matter_server.server.device_controller] Starting Matter commissioning with code using Node ID 1.
2024-12-25 22:02:47 2024-12-25 21:02:47.778 (MainThread) ERROR [matter_server.server] Error doing task: Task exception was never retrieved
2024-12-25 22:02:47 Traceback (most recent call last):
2024-12-25 22:02:47 File "/usr/local/lib/python3.12/site-packages/matter_server/server/storage.py", line 169, in async_save
2024-12-25 22:02:47 await self.server.loop.run_in_executor(None, do_save)
2024-12-25 22:02:47 File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 59, in run
2024-12-25 22:02:47 result = self.fn(*self.args, **self.kwargs)
2024-12-25 22:02:47 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-25 22:02:47 File "/usr/local/lib/python3.12/site-packages/matter_server/server/storage.py", line 159, in do_save
2024-12-25 22:02:47 shutil.copy(self.filename, self.filename_backup)
2024-12-25 22:02:47 File "/usr/local/lib/python3.12/shutil.py", line 435, in copy
2024-12-25 22:02:47 copyfile(src, dst, follow_symlinks=follow_symlinks)
2024-12-25 22:02:47 File "/usr/local/lib/python3.12/shutil.py", line 260, in copyfile
2024-12-25 22:02:47 with open(src, 'rb') as fsrc:
2024-12-25 22:02:47 ^^^^^^^^^^^^^^^
2024-12-25 22:02:47 FileNotFoundError: [Errno 2] No such file or directory: '/data/3047113067683973373.json'
2024-12-25 22:03:19 2024-12-25 21:03:19.253 (Dummy-2) CHIP_ERROR [chip.native.CTL] Discovery timed out
2024-12-25 22:03:19 2024-12-25 21:03:19.253 (Dummy-2) CHIP_ERROR [chip.native.ZCL] Secure Pairing Failed
2024-12-25 22:03:19 2024-12-25 21:03:19.253 (Dummy-2) WARNING [chip.ChipDeviceCtrl] Failed to establish secure session to device: src/controller/python/ChipDeviceController-ScriptDevicePairingDelegate.cpp:96: CHIP Error 0x00000003: Incorrect state
2024-12-25 22:03:19 2024-12-25 21:03:19.253 (MainThread) ERROR [matter_server.server.client_handler] [140428586576992] Error while handling: commission_with_code: Commission with code failed for node 1.

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

Hey there @home-assistant/matter, mind taking a look at this issue as it has been labeled with an integration (matter) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of matter can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign matter Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


matter documentation
matter source
(message by IssueLinks)

@nathcakes
Copy link

nathcakes commented Dec 30, 2024

Hi Team,

I'm facing the same issue as OP, I've freshly installed HAOS and am unable to add my Aqara M3 Hub via Matter. I've tried generating a pairing code from Aqara, SmartThings & Google Home and each time it fails in the same way. I had it previously working on my container install but I recently decided to move to HAOS instead.

Fortunately I'm able to access it via the SmartThings integration currently (paired M3 Hub -> SmartThings Hub -> SmartThings Integration) so I can currently use my devices but I would much prefer to pair directly through Matter to the M3 Hub.

I have been able to add my Tapo L530E Light Bulbs via Matter in Home Assistant, just not the M3 Hub.

My answers to the bug report are below:

What version of Home Assistant Core has the issue?

2024.12.2

What was the last working version of Home Assistant Core?

2024.11.3

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Matter

Link to integration documentation on our website

home-assistant.io/integrations/matter

Diagnostics information

2024-12-30 12:45:28.021 (MainThread) INFO [matter_server.server.device_controller] Starting Matter commissioning with code using Node ID 16.
2024-12-30 12:45:58.030 (Dummy-2) CHIP_ERROR [chip.native.CTL] Discovery timed out
2024-12-30 12:45:58.031 (Dummy-2) CHIP_ERROR [chip.native.ZCL] Secure Pairing Failed
2024-12-30 12:45:58.032 (Dummy-2) WARNING [chip.ChipDeviceCtrl] Failed to establish secure session to device: src/controller/python/ChipDeviceController-ScriptDevicePairingDelegate.cpp:89: CHIP Error 0x00000003: Incorrect state
2024-12-30 12:45:58.034 (MainThread) ERROR [matter_server.server.client_handler] [547881305152] Error while handling: commission_with_code: Commission with code failed for node 16.

@nathcakes
Copy link

I thought I should provide an update on my comment, I've been able to pair the M3 Hub over Matter!

For me, I thought my network was already a simple configuration, however I had a second router connected to my main router in Access Point mode. A conversation on discord lead me to look into whether this was the issue, changing the secondary router to router mode and plugging in the main router via the LAN port instead has solved all my issues.

@secretMoi I would recommend investigating your network setup, basically everything online indicates that there's a communication error between HA and the Hub, and HA seems more sensitive to network issues than other controllers.

@secretMoi
Copy link
Author

Hello @nathcakes
It seems I got the same kind of configuration as you.
I also use a secondary router as access point. My Home assistant server is plugged into my main router.
I will give it a try in next hours !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants