home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.67k stars 29.95k forks source link

Matter (BETA) integration resets to ws://localhost:5580/ws #115425

Closed slotdawg closed 1 month ago

slotdawg commented 5 months ago

The problem

The Matter (BETA) integration in HA core continuously overrides/resets the configuration from a specified address to ws://localhost:5580/ws.

This results in a problem for a microservices environment (e.g. docker-compose), when running python-matter-server as a separate container from HA.

Steps to reproduce:

  1. Deploy HA and python-matter-server via Docker-Compose
  2. Configure Matter (BETA) integration in HA via UI, specifying the docker host address as the websocket (e.g. ws://192.168.1.2:5580/ws)
  3. Add devices / do things with matter-enabled devices. Eventually devices stop responding, or when attempting to add a new device, the integration gets to the last step of "adding to homeassistant," then fails
  4. Return to the Matter (BETA) integration settings in the UI and click "Add Entry"
  5. Note that the entry is configured as ws://localhost:5580/ws, which is not what was configured in step 2 above

Diagnostic logs attached

What version of Home Assistant Core has the issue?

2024.4.0

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Matter

Link to integration documentation on our website

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

Diagnostics information

home-assistant_matter_2024-04-11T15-01-46.807Z.log

Example YAML snippet

---
version: "2"
networks:
  ha:

services:
  homeassistant:
    container_name: homeassistant
    image: ghcr.io/home-assistant/home-assistant
    volumes:
      - /etc/homeassistant:/config
      - /etc/localtime:/etc/localtime:ro
    devices:
      - /dev/ttyUSB1:/dev/ttyUSB1
      - /dev/serial/by-id/usb-Silicon_Labs_HubZ_Smart_Home_Controller_C130216F-if01-port0:/dev/serial/by-id/usb-Silicon_Labs_HubZ_Smart_Home_Controller_C130216F-if01-port0
    environment:
      - TZ=America/New_York
      - PUID=1003
      - PGID=1003
    networks:
      - ha
    ports:
      - 8123:8123
    restart: unless-stopped
  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:
      # Needed for Bluetooth via dbus
      - apparmor:unconfined
    volumes:
      # Create an .env file that sets the USERDIR environment variable.
      - /etc/matter-server/data:/data/
      - /run/dbus:/run/dbus:ro

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 5 months ago

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)

marcelveldt commented 5 months ago

You are confusing things here. Add entry is for setting up a Matter server (where the default address is indeed localhost). Normally you already have the Matter integration set-up and you add devices to that Matter integration.

Also note that, how harsh this may sound, we do not officially support docker for running the Matter server due to all the OS requirements, best to ask community support on discord supporting a docker install of Matter server.

issue-triage-workflows[bot] commented 2 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

marcelveldt commented 2 months ago

Not stale

marcelveldt commented 1 month ago

This is a non-issue. If you add a new entry, it will by default show the default address of ws://localhost:5580/ws, that is simply hardcoded (not very userfriendly but that is another topic). If the integration looses connection with existing configured matter server (the existing config entry) that would be a bug. Since we didnt see any follow up on this topic anyways, I'll close it.