home-assistant-libs / python-matter-server

Python server to interact with Matter
Apache License 2.0
479 stars 75 forks source link

Trying to Install on Ubuntu 22.0.4 #299

Closed mbhforum closed 1 year ago

mbhforum commented 1 year ago

Trying to install on Ubuntu using Docker Compose and getting the following error:

ERROR: Directory '.[server]' is not installable. Neither 'setup.py' nor 'pyproject.toml' found. The command '/bin/bash -o pipefail -c pip3 install -U pip && pip3 install --no-cache-dir .[server]' returned a non-zero code: 1 ERROR: Service 'matter-server' failed to build : Build failed

marcelveldt commented 1 year ago

You can't install this manually, you will need to run the HAOS add-on. There's also a docker image but we do not yet oficially support that and you might run into issues.

That said, this issue usually indicated an outdated setuptools and/or pip

mbhforum commented 1 year ago

Thanks. I confirmed I am running the latest versions of pip3 and setuptools. I am running HA within docker, which is why I am trying to get this to work as a local docker container.

rursache commented 1 year ago

@mbhforum use this docker container, works OOB with HASS docker container:

docker run -d \
  --name matter-server \
  --restart always \
  --network host \
  --security-opt apparmor:unconfined \
  -e TZ=Europe/Bucharest \
  -v /home/USER/.matter/data:/data \
  -v /run/dbus:/run/dbus:ro \
  ghcr.io/rursache/hass-matter-server-docker:f22784412d08f165e4431bcf23f7996ec7b86eb7

NOTE: this is v3.3.0 as newer versions are broken

mbhforum commented 1 year ago

Thanks! What actually worked and now I have the Matter Server up and running and HA recognized it. Unfortunately, when trying to add my Eve Motion sensor, It fails to do so. I've tried rebooting my phone and the sensor , but no luck.

marcelveldt commented 1 year ago

It is not as simple as running this in docker. See our notes about Thread based devices in the readme. For now we only provide official support for running the Matter Server as Home Assistant add-on.

marcelveldt commented 1 year ago

NOTE: this is v3.3.0 as newer versions are broken

Yes but that is an old version which has its own issues and is still based on Matter 1.0 instead of Matter 1.1 so that is NOT a solution. Lets wait until we can fix the actual issue (Endpoint full error) before we start spinning up others versions in the wild. Temporary solution is to just lower the amount of running containers as it is socket related.

marcelveldt commented 1 year ago

@mbhforum we are going to provide an official Docker image soon including the instructions. Like I said this is not a standard docker container that you can spin up as it has actual requirements to the host setup. We will keep with our standings that running HAOS + the Matter add-on is our recommendation but for the power users we'll provide the instructions for running the stack yourselves. Just give us a couple of weeks to write it all out.

marcelveldt commented 1 year ago

Closing here awaiting our complete set of instructions how to run the Matter server in docker. Track progress here: https://github.com/home-assistant-libs/python-matter-server/issues/308

Reminder: At the moment the only supported way to run the Matter server is by running the HAOS add-on. Other ways are for development only.