From 1f5be84c3c7fe97e270055b8c5526205c1fb7c29 Mon Sep 17 00:00:00 2001 From: t0bst4r Date: Sun, 27 Oct 2024 16:56:41 +0100 Subject: [PATCH] chore: initial commit for home-assistant-matter-hub --- .gitignore | 1 + README.md | 16 ++++++++++++++++ hamh/Dockerfile | 16 ++++++++++++++++ hamh/build.yaml | 2 ++ hamh/config.yaml | 24 ++++++++++++++++++++++++ hamh/docker-entrypoint.sh | 9 +++++++++ hamh/translations/en.yaml | 14 ++++++++++++++ repository.yaml | 4 ++++ 8 files changed, 86 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 hamh/Dockerfile create mode 100644 hamh/build.yaml create mode 100644 hamh/config.yaml create mode 100644 hamh/docker-entrypoint.sh create mode 100644 hamh/translations/en.yaml create mode 100644 repository.yaml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9f11b75 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..f745b93 --- /dev/null +++ b/README.md @@ -0,0 +1,16 @@ +# Home Assistant Addons by t0bst4r + +This repository provides the following addons for Home-Assistant: + +- Home-Assistant-Matter-Hub + +## Installation + +Simple add this repository to your Add On Store in Home-Assistant: + +1. Open the UI of your Home Assistant instance +2. Go to `Settings` -> `Add-Ons` -> `Add-On Store` +3. Click the three dots in the top-right corner and select `Repositories` +4. Paste the repository URL (`https://github.com/t0bst4r/home-assistant-addons`) into the text-field and click "Add" +5. Refresh your Add-On Store and Install the Add-On + diff --git a/hamh/Dockerfile b/hamh/Dockerfile new file mode 100644 index 0000000..30a713e --- /dev/null +++ b/hamh/Dockerfile @@ -0,0 +1,16 @@ +FROM ghcr.io/hassio-addons/base-nodejs:0.2.5 + +ENV SUPERVISOR_TOKEN "" +VOLUME /config + +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x /docker-entrypoint.sh + +ARG package_version +LABEL \ + io.hass.version="$package_version" \ + io.hass.type="addon" \ + io.hass.arch="armhf|aarch64|i386|amd64" +RUN npm install -g home-assistant-matter-hub@$package_version + +CMD /docker-entrypoint.sh diff --git a/hamh/build.yaml b/hamh/build.yaml new file mode 100644 index 0000000..acc414f --- /dev/null +++ b/hamh/build.yaml @@ -0,0 +1,2 @@ +args: + package_version: "3.0.0-alpha.7" diff --git a/hamh/config.yaml b/hamh/config.yaml new file mode 100644 index 0000000..b5bebbd --- /dev/null +++ b/hamh/config.yaml @@ -0,0 +1,24 @@ +version: "3.0.0-alpha.7" +slug: hamh +name: Home-Assistant-Matter-Hub +description: Publish your entities from Home Assistant to any Matter-compatible controller like Alexa, Apple Home or Google Home. +url: https://github.com/t0bst4r/home-assistant-matter-hub +homeassistant: 2024.1.0 +homeassistant_api: true +host_network: true +init: false +arch: + - aarch64 + - amd64 + - armv7 +webui: http://[HOST]:[PORT:8482]/ +map: + - addon_config:rw +options: + log_level: info + disable_log_colors: false + web_port: 8482 +schema: + log_level: list(debug|info|warn|error) + disable_log_colors: bool + web_port: int(1,) diff --git a/hamh/docker-entrypoint.sh b/hamh/docker-entrypoint.sh new file mode 100644 index 0000000..9e284bd --- /dev/null +++ b/hamh/docker-entrypoint.sh @@ -0,0 +1,9 @@ +#!/usr/bin/with-contenv bashio + +home-assistant-matter-hub start \ + --log-level=$(bashio::config 'log_level') \ + --disable-log-colors=$(bashio::config 'disable_log_colors') \ + --storage-location=/config/data \ + --web-port=$(bashio::config 'web_port') \ + --home-assistant-url='http://supervisor/core' \ + --home-assistant-access-token="$SUPERVISOR_TOKEN" diff --git a/hamh/translations/en.yaml b/hamh/translations/en.yaml new file mode 100644 index 0000000..8290bca --- /dev/null +++ b/hamh/translations/en.yaml @@ -0,0 +1,14 @@ +--- +configuration: + log_level: + name: Log Level + description: | + The log level used for this addon. One of: debug, info, warn, error + disable_log_colors: + name: Disable log colors + description: | + Print the log as plain text without any colors. + web_port: + name: Web UI Port + description: | + The port to use for the Web-UI. Default: 8482 diff --git a/repository.yaml b/repository.yaml new file mode 100644 index 0000000..e1b5cb2 --- /dev/null +++ b/repository.yaml @@ -0,0 +1,4 @@ +--- +name: Addons by t0bst4r +url: https://github.com/t0bst4r/home-assistant-addons +maintainer: Tobias Glatthar