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

Matter over Thread: cannot add Tado X smart valves #131374

Closed
duemila2 opened this issue Nov 23, 2024 · 8 comments
Closed

Matter over Thread: cannot add Tado X smart valves #131374

duemila2 opened this issue Nov 23, 2024 · 8 comments

Comments

@duemila2
Copy link

The problem

I'm trying to add my Tado X smart valves to Home Assistant using Matter and Thread integration.
These devices have their own border router included.
I've Home Assistant on Docker and this is my Docker compose configuration:

version: '3'
services:
    home-assistant:
        container_name: home-assistant
        image: ghcr.io/home-assistant/home-assistant:stable
        ports:
        - 8123:8123
        volumes:
        - ~/homeassistant:/config
        - /run/dbus:/run/dbus:ro
        environment:
        - TZ=Europe/Rome
        - DISABLE_JEMALLOC=true
        network_mode: host
        restart: always
        privileged: true
    matter-server:
      image: ghcr.io/home-assistant-libs/python-matter-server:stable
      container_name: matter-server
      restart: unless-stopped
      # Required for mDNS to work correctly
      network_mode: host
      security_opt:
        - apparmor:unconfined
      command: --log-level debug
      volumes:
        - ${USERDIR:-$HOME}/docker/matter-server/data:/data/

I've added the Matter Integration to Home Assistant:
image

I also added Thread integration and imported credentials for Tado border router:
Screenshot_20241123-163708

then I tried to add one valve from Tado app:
Screenshot_20241123-163355
Screenshot_20241123-163409
Screenshot_20241123-163420
Screenshot_20241123-163425

but it fails:

Screenshot_20241123-164102

from the logs on the Matter Server I can see:

`2024-11-23 15:39:05.068 (MainThread) DEBUG [matter_server.server.device_controller.mdns] Discovered commissionable Matter node: AsyncServiceInfo(type='_matterc._udp.local.', name='CF3323621DF5E6F6._matterc._udp.local.', addresses=[], port=5540, weight=0, priority=0, server='4AF54A67B1756B6E.local.', properties={b'VP': b'4942+1', b'DT': b'769', b'SII': b'3800', b'SAI': b'1000', b'T': b'0', b'D': b'1964', b'CM': b'0', b'PH': b'36', b'PI': None}, interface_index=None)
2024-11-23 15:40:23.624 (MainThread) DEBUG [matter_server.server.device_controller.mdns] Commissionable Matter node disappeared: AsyncServiceInfo(type='_matterc._udp.local.', name='CF3323621DF5E6F6._matterc._udp.local.', addresses=[], port=None, weight=0, priority=0, server=None, properties={}, interface_index=None)
2024-11-23 15:40:24.616 (MainThread) DEBUG [matter_server.server.device_controller.mdns] Discovered commissionable Matter node: AsyncServiceInfo(type='_matterc._udp.local.', name='E797EF712AB9F1B9._matterc._udp.local.', addresses=[], port=5540, weight=0, priority=0, server='4AF54A67B1756B6E.local.', properties={b'VP': b'4942+1', b'DT': b'769', b'SII': b'3800', b'SAI': b'1000', b'T': b'0', b'D': b'133', b'CM': b'2', b'PH': b'36', b'PI': None}, interface_index=None)
2024-11-23 15:40:26.399 (MainThread) INFO [matter_server.server.device_controller] Starting Matter commissioning with code using Node ID 8.
2024-11-23 15:40:26.402 (ThreadPoolExecutor-0_0) DEBUG [matter_server.server.storage] Saved data to persistent storage
2024-11-23 15:40:26.457 (Dummy-2) CHIP_ERROR [chip.native.-] src/inet/UDPEndPointImplSockets.cpp:416: OS Error 0x02000065: Network is unreachable at src/controller/SetUpCodePairer.cpp:280
2024-11-23 15:40:56.403 (Dummy-2) CHIP_ERROR [chip.native.CTL] Discovery timed out
2024-11-23 15:40:56.403 (Dummy-2) CHIP_ERROR [chip.native.ZCL] Secure Pairing Failed
2024-11-23 15:40:56.403 (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-11-23 15:40:56.404 (MainThread) ERROR [matter_server.server.client_handler] [132016439334096] Error while handling: commission_with_code: Commission with code failed for node 8.

How can I solve or troubleshoot it?

Thank you very much in advance!

What version of Home Assistant Core has the issue?

core-2024.6.4

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

No response

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)

@kastanu4
Copy link

I think we have the same problem, as I also can't add thermostats even after deleting them

#131297

@gu-stera
Copy link

I've managed to add them back after removing the TRV from Tado, Homekit and HA and resetting it.

After the reset I've added it first in the Tado app and put it in paring mode. First time it failed, but I've tried the second time and then it worked. The problem I have is that some time later, without anything done on the config of the HA or Tado, the devices randomly starts to go offline and now i'm in this situation:
image
where no reboot or whatever works to bring them online without doing the procedure above. I'm on the verge of sanity after extremely miserable experience with the new Shelly BLU TRVs and now it looks like I have suffer with Matter as well!

2024-11-25 17:13:47.414 (MainThread) INFO [matter_server.server.device_controller] <Node:2> Retrying node setup in 60 seconds... 2024-11-25 17:14:36.423 (MainThread) INFO [matter_server.server.device_controller] <Node:9> Setting-up node... 2024-11-25 17:14:36.630 (Dummy-2) CHIP_ERROR [chip.native.-] src/inet/UDPEndPointImplSockets.cpp:416: OS Error 0x02000065: Network is unreachable at src/app/OperationalSessionSetup.cpp:246 2024-11-25 17:14:36.636 (Dummy-2) CHIP_ERROR [chip.native.-] src/inet/UDPEndPointImplSockets.cpp:416: OS Error 0x02000065: Network is unreachable at src/app/OperationalSessionSetup.cpp:246 2024-11-25 17:14:39.639 (MainThread) INFO [matter_server.server.sdk] <Node:9> Attempting to establish CASE session... (attempt 2 of 2) 2024-11-25 17:14:39.846 (Dummy-2) CHIP_ERROR [chip.native.-] src/inet/UDPEndPointImplSockets.cpp:416: OS Error 0x02000065: Network is unreachable at src/app/OperationalSessionSetup.cpp:246 2024-11-25 17:14:39.853 (Dummy-2) CHIP_ERROR [chip.native.-] src/inet/UDPEndPointImplSockets.cpp:416: OS Error 0x02000065: Network is unreachable at src/app/OperationalSessionSetup.cpp:246 2024-11-25 17:14:39.855 (MainThread) WARNING [matter_server.server.device_controller] <Node:9> Setup for node failed: Unable to establish CASE session with Node 9 2024-11-25 17:14:39.855 (MainThread) INFO [matter_server.server.device_controller] <Node:9> Retrying node setup in 60 seconds... 2024-11-25 17:14:47.418 (MainThread) INFO [matter_server.server.device_controller] <Node:2> Setting-up node...

@randm-ch
Copy link

@duemila2 maybe this helps: I struggled for a while to link the devices to Home Assistant via Matter as well, until I double-checked the requirements for the matter-server. After setting all the proper sysctl values (and confirming that my kernel was compiled with the right flags) I was able to link the tado Smart Thermostat X through the Tado Bridge X thread bridge like you show in the screenshots above. Result:

2024-11-28_23-10

@duemila2
Copy link
Author

Hi @randm-ch thank you very much for your support!
I'm using the Matter server inside a Docker container, the kernel option CONFIG_IPV6_ROUTER_PREF should be enabled on the host machine or on the container? The sysctl commands also should be run on the container or on the host?

@randm-ch
Copy link

Hi @randm-ch thank you very much for your support! I'm using the Matter server inside a Docker container, the kernel option CONFIG_IPV6_ROUTER_PREF should be enabled on the host machine or on the container? The sysctl commands also should be run on the container or on the host?

On the host, since the compose definition is using network_mode: host.

@marcelveldt
Copy link
Member

I'm sorry, running Matter server in docker is at your own risk without any official support.
Try to reproduce the issue with the official supported Matter setup: Home Assistant OS with the Matter add-on. Run it for example on a spare pi or as Virtual Machine with bridge networking.

Also be aware of all the caveats surrounding Matter such as the fact that you need a FLAT network. No vlans, mdns repeaters or whatever. Also be careful with (semi) professsional network gear such as Unifi or Omada and disable "features" such as multicast enhancements or anything else that can hinder multicast traffic, especially IPv6 NBD packets.

The simpler/dumber your network/setup is, the higher the chance is that you will have a working matter setup.
Please re-open here if you can reproduce the issue with the supported installation type. Otherwise maybe check on our discord server for community support.

@duemila2
Copy link
Author

duemila2 commented Dec 2, 2024

Hi, unfortunately is not solved, it is still not working and tomorrow I'll send you details of the issue.
Thank you

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

5 participants