From 2199e0a2d86ea093fbee0c484bf03845ad088043 Mon Sep 17 00:00:00 2001 From: etofi <19774831+etofi@users.noreply.github.com> Date: Sun, 15 Sep 2024 18:17:49 +0200 Subject: [PATCH 01/36] Create Dockerfile --- Dockerfile | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..fe7cab6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,39 @@ +FROM alpine:3.20 +LABEL description="Alpine based image with apache2 and php8 for HomeHub." + +# Setup apache and php +RUN apk --no-cache --update \ + add apache2 \ + apache2-ssl \ + curl \ + php83-apache2 \ + php83-bcmath \ + php83-bz2 \ + php83-calendar \ + php83-common \ + php83-ctype \ + php83-curl \ + php83-dom \ + php83-gd \ + php83-iconv \ + php83-mbstring \ + php83-mysqli \ + php83-mysqlnd \ + php83-openssl \ + php83-pdo_mysql \ + php83-pdo_pgsql \ + php83-pdo_sqlite \ + php83-phar \ + php83-session \ + php83-xml \ + && mkdir /htdocs + +COPY * /usr/local/apache2/htdocs/ + +EXPOSE 80 + +ADD docker-entrypoint.sh / + +HEALTHCHECK CMD wget -q --no-cache --spider localhost + +ENTRYPOINT ["/docker-entrypoint.sh"] From 88f04eb65a5a17e53d97c930815e40a33bc18cad Mon Sep 17 00:00:00 2001 From: etofi <19774831+etofi@users.noreply.github.com> Date: Sun, 15 Sep 2024 18:18:20 +0200 Subject: [PATCH 02/36] Create docker-entrypoint.sh --- docker-entrypoint.sh | 47 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 docker-entrypoint.sh diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh new file mode 100644 index 0000000..3a778d4 --- /dev/null +++ b/docker-entrypoint.sh @@ -0,0 +1,47 @@ +#!/bin/sh + +# Exit on non defined variables and on non zero exit codes +set -eu + +SERVER_ADMIN="${SERVER_ADMIN:-you@example.com}" +HTTP_SERVER_NAME="${HTTP_SERVER_NAME:-www.example.com}" +HTTPS_SERVER_NAME="${HTTPS_SERVER_NAME:-www.example.com}" +LOG_LEVEL="${LOG_LEVEL:-info}" +TZ="${TZ:-UTC}" +PHP_MEMORY_LIMIT="${PHP_MEMORY_LIMIT:-256M}" + +echo 'Updating configurations' + +# Change Server Admin, Name, Document Root +sed -i "s/ServerAdmin\ you@example.com/ServerAdmin\ ${SERVER_ADMIN}/" /etc/apache2/httpd.conf +sed -i "s/#ServerName\ www.example.com:80/ServerName\ ${HTTP_SERVER_NAME}/" /etc/apache2/httpd.conf +sed -i 's#^DocumentRoot ".*#DocumentRoot "/htdocs"#g' /etc/apache2/httpd.conf +sed -i 's#Directory "/var/www/localhost/htdocs"#Directory "/htdocs"#g' /etc/apache2/httpd.conf +sed -i 's#AllowOverride None#AllowOverride All#' /etc/apache2/httpd.conf + +# Change TransferLog after ErrorLog +sed -i 's#^ErrorLog .*#ErrorLog "/dev/stderr"\nTransferLog "/dev/stdout"#g' /etc/apache2/httpd.conf +sed -i 's#CustomLog .* combined#CustomLog "/dev/stdout" combined#g' /etc/apache2/httpd.conf + +# SSL DocumentRoot and Log locations +sed -i 's#^ErrorLog .*#ErrorLog "/dev/stderr"#g' /etc/apache2/conf.d/ssl.conf +sed -i 's#^TransferLog .*#TransferLog "/dev/stdout"#g' /etc/apache2/conf.d/ssl.conf +sed -i 's#^DocumentRoot ".*#DocumentRoot "/htdocs"#g' /etc/apache2/conf.d/ssl.conf +sed -i "s/ServerAdmin\ you@example.com/ServerAdmin\ ${SERVER_ADMIN}/" /etc/apache2/conf.d/ssl.conf +sed -i "s/ServerName\ www.example.com:443/ServerName\ ${HTTPS_SERVER_NAME}/" /etc/apache2/conf.d/ssl.conf + +# Re-define LogLevel +sed -i "s#^LogLevel .*#LogLevel ${LOG_LEVEL}#g" /etc/apache2/httpd.conf + +# Enable commonly used apache modules +sed -i 's/#LoadModule\ rewrite_module/LoadModule\ rewrite_module/' /etc/apache2/httpd.conf +sed -i 's/#LoadModule\ deflate_module/LoadModule\ deflate_module/' /etc/apache2/httpd.conf +sed -i 's/#LoadModule\ expires_module/LoadModule\ expires_module/' /etc/apache2/httpd.conf + +# Modify php memory limit and timezone +sed -i "s/memory_limit = .*/memory_limit = ${PHP_MEMORY_LIMIT}/" /etc/php83/php.ini +sed -i "s#^;date.timezone =\$#date.timezone = \"${TZ}\"#" /etc/php83/php.ini + +echo 'Running Apache' + +httpd -D FOREGROUND From b5a9a15de7a401d8ce117e3549e72bfee60d58f6 Mon Sep 17 00:00:00 2001 From: etofi <19774831+etofi@users.noreply.github.com> Date: Sun, 15 Sep 2024 18:21:38 +0200 Subject: [PATCH 03/36] Create docker-image.yml --- .github/workflows/docker-image.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/docker-image.yml diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 0000000..a8b84ee --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,18 @@ +name: Docker Image CI + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Build the Docker image + run: docker build . --file Dockerfile --tag homehub_docker:$(date +%s) From 21fccc09d949ff7eaf8400d54b803c005f5ff868 Mon Sep 17 00:00:00 2001 From: etofi <19774831+etofi@users.noreply.github.com> Date: Sun, 15 Sep 2024 18:24:56 +0200 Subject: [PATCH 04/36] Update docker-image.yml --- .github/workflows/docker-image.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index a8b84ee..2a53172 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -15,4 +15,6 @@ jobs: steps: - uses: actions/checkout@v4 - name: Build the Docker image - run: docker build . --file Dockerfile --tag homehub_docker:$(date +%s) + run: + docker build . --file Dockerfile --tag homehub_docker:$(date +%s) + docker push ghcr.io/etofi/homehub_docker:latest From 26a3c9b1a4f0f1aea5a568341c8456e919c7dc8d Mon Sep 17 00:00:00 2001 From: etofi <19774831+etofi@users.noreply.github.com> Date: Sun, 15 Sep 2024 18:26:50 +0200 Subject: [PATCH 05/36] Update docker-image.yml --- .github/workflows/docker-image.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 2a53172..3cd8c68 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -15,6 +15,5 @@ jobs: steps: - uses: actions/checkout@v4 - name: Build the Docker image - run: - docker build . --file Dockerfile --tag homehub_docker:$(date +%s) - docker push ghcr.io/etofi/homehub_docker:latest + run: docker build . --file Dockerfile --tag homehub_docker:$(date +%s) + docker build . --file Dockerfile --tag homehub_docker:latest From ae34af948921139ab7078cfba4c0bf455040902d Mon Sep 17 00:00:00 2001 From: etofi <19774831+etofi@users.noreply.github.com> Date: Sun, 15 Sep 2024 18:27:51 +0200 Subject: [PATCH 06/36] Update docker-image.yml --- .github/workflows/docker-image.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 3cd8c68..8dfd4bb 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -15,5 +15,4 @@ jobs: steps: - uses: actions/checkout@v4 - name: Build the Docker image - run: docker build . --file Dockerfile --tag homehub_docker:$(date +%s) - docker build . --file Dockerfile --tag homehub_docker:latest + run: docker build . --file Dockerfile --tag homehub_docker:latest From 91e49a688212f59f2b632ce0ac7e9b1518a8c2f2 Mon Sep 17 00:00:00 2001 From: etofi <19774831+etofi@users.noreply.github.com> Date: Sun, 15 Sep 2024 18:37:15 +0200 Subject: [PATCH 07/36] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index fe7cab6..66ecfe3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,7 +28,7 @@ RUN apk --no-cache --update \ php83-xml \ && mkdir /htdocs -COPY * /usr/local/apache2/htdocs/ +COPY . /usr/local/apache2/htdocs/ EXPOSE 80 From 915fc5d97e8e887ac9199882b076979e0d4de625 Mon Sep 17 00:00:00 2001 From: etofi <19774831+etofi@users.noreply.github.com> Date: Sun, 15 Sep 2024 19:01:32 +0200 Subject: [PATCH 08/36] Update docker-image.yml --- .github/workflows/docker-image.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 8dfd4bb..9fd9534 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -1,4 +1,4 @@ -name: Docker Image CI +name: Docker Image Homehub on: push: @@ -6,12 +6,13 @@ on: pull_request: branches: [ "master" ] +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + jobs: - build: - runs-on: ubuntu-latest - steps: - uses: actions/checkout@v4 - name: Build the Docker image From 81cbb7c8d6e07970f8d48353e7e6374afe25f12c Mon Sep 17 00:00:00 2001 From: etofi <19774831+etofi@users.noreply.github.com> Date: Sun, 15 Sep 2024 19:07:59 +0200 Subject: [PATCH 09/36] Update docker-image.yml --- .github/workflows/docker-image.yml | 47 +++++++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 9fd9534..327019d 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -11,9 +11,48 @@ env: IMAGE_NAME: ${{ github.repository }} jobs: - build: + build-and-push-image: runs-on: ubuntu-latest + # Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job. + permissions: + contents: read + packages: write + attestations: write + id-token: write + # steps: - - uses: actions/checkout@v4 - - name: Build the Docker image - run: docker build . --file Dockerfile --tag homehub_docker:latest + - name: Checkout repository + uses: actions/checkout@v4 + # Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here. + - name: Log in to the Container registry + uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + # This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels. + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + # This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages. + # It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository. + # It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step. + - name: Build and push Docker image + id: push + uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + + # This step generates an artifact attestation for the image, which is an unforgeable statement about where and how it was built. It increases supply chain security for people who consume the image. For more information, see "[AUTOTITLE](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds)." + - name: Generate artifact attestation + uses: actions/attest-build-provenance@v1 + with: + subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}} + subject-digest: ${{ steps.push.outputs.digest }} + push-to-registry: true + From 3496b0b958c7aec8b77cff08fe8795073c920014 Mon Sep 17 00:00:00 2001 From: etofi <19774831+etofi@users.noreply.github.com> Date: Sun, 15 Sep 2024 19:13:42 +0200 Subject: [PATCH 10/36] Update docker-image.yml --- .github/workflows/docker-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 327019d..7ab232c 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -25,7 +25,7 @@ jobs: uses: actions/checkout@v4 # Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here. - name: Log in to the Container registry - uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 + uses: docker/login-action with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} From 04ca4255d0a12b4e681a4d072c09884f7f98d075 Mon Sep 17 00:00:00 2001 From: etofi <19774831+etofi@users.noreply.github.com> Date: Sun, 15 Sep 2024 19:15:59 +0200 Subject: [PATCH 11/36] Update docker-image.yml --- .github/workflows/docker-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 7ab232c..327019d 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -25,7 +25,7 @@ jobs: uses: actions/checkout@v4 # Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here. - name: Log in to the Container registry - uses: docker/login-action + uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} From 4d0526be3a68ec868dc0ba6b22d94ea3aaff8c95 Mon Sep 17 00:00:00 2001 From: etofi <19774831+etofi@users.noreply.github.com> Date: Sun, 15 Sep 2024 19:21:34 +0200 Subject: [PATCH 12/36] Update docker-image.yml --- .github/workflows/docker-image.yml | 65 ++++++++---------------------- 1 file changed, 17 insertions(+), 48 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 327019d..73e1740 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -1,4 +1,4 @@ -name: Docker Image Homehub +name: Publish on: push: @@ -6,53 +6,22 @@ on: pull_request: branches: [ "master" ] -env: - REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }} - jobs: - build-and-push-image: + publish-image: runs-on: ubuntu-latest - # Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job. - permissions: - contents: read - packages: write - attestations: write - id-token: write - # + steps: - - name: Checkout repository - uses: actions/checkout@v4 - # Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here. - - name: Log in to the Container registry - uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - # This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels. - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 - with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - # This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages. - # It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository. - # It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step. - - name: Build and push Docker image - id: push - uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 - with: - context: . - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - - # This step generates an artifact attestation for the image, which is an unforgeable statement about where and how it was built. It increases supply chain security for people who consume the image. For more information, see "[AUTOTITLE](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds)." - - name: Generate artifact attestation - uses: actions/attest-build-provenance@v1 - with: - subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}} - subject-digest: ${{ steps.push.outputs.digest }} - push-to-registry: true - + - uses: actions/checkout@v2 + + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GH_TOKEN }} + + - name: Build the Docker image + run: | + docker build --no-cache . --tag ghcr.io/etofi/homehub_docker:latest --tag ghcr.io/etofi/homehub_docker:$(git describe --tags --abbrev=0) + docker push ghcr.io/etofi/homehub_docker:latest + docker push ghcr.io/etofi/homehub_docker:$(git describe --tags --abbrev=0) From 15936e0ec77b3bf2c18fbf15a650bf183451c056 Mon Sep 17 00:00:00 2001 From: etofi <19774831+etofi@users.noreply.github.com> Date: Sun, 15 Sep 2024 19:23:47 +0200 Subject: [PATCH 13/36] Update docker-image.yml --- .github/workflows/docker-image.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 73e1740..54489b2 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -13,12 +13,12 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Login to GitHub Container Registry - uses: docker/login-action@v1 + - name: Log in to the Container registry + uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GH_TOKEN }} + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Build the Docker image run: | From 5d8f2e60fc6fe9014777a4f0503670741ad2750a Mon Sep 17 00:00:00 2001 From: etofi <19774831+etofi@users.noreply.github.com> Date: Sun, 15 Sep 2024 19:24:34 +0200 Subject: [PATCH 14/36] Update docker-image.yml --- .github/workflows/docker-image.yml | 59 +++++++++++++++++++++++------- 1 file changed, 45 insertions(+), 14 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 54489b2..327019d 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -1,4 +1,4 @@ -name: Publish +name: Docker Image Homehub on: push: @@ -6,22 +6,53 @@ on: pull_request: branches: [ "master" ] +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + jobs: - publish-image: + build-and-push-image: runs-on: ubuntu-latest - + # Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job. + permissions: + contents: read + packages: write + attestations: write + id-token: write + # steps: - - uses: actions/checkout@v2 - - - name: Log in to the Container registry - uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 - with: + - name: Checkout repository + uses: actions/checkout@v4 + # Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here. + - name: Log in to the Container registry + uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 + with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build the Docker image - run: | - docker build --no-cache . --tag ghcr.io/etofi/homehub_docker:latest --tag ghcr.io/etofi/homehub_docker:$(git describe --tags --abbrev=0) - docker push ghcr.io/etofi/homehub_docker:latest - docker push ghcr.io/etofi/homehub_docker:$(git describe --tags --abbrev=0) + # This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels. + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + # This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages. + # It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository. + # It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step. + - name: Build and push Docker image + id: push + uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + + # This step generates an artifact attestation for the image, which is an unforgeable statement about where and how it was built. It increases supply chain security for people who consume the image. For more information, see "[AUTOTITLE](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds)." + - name: Generate artifact attestation + uses: actions/attest-build-provenance@v1 + with: + subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}} + subject-digest: ${{ steps.push.outputs.digest }} + push-to-registry: true + From b60d8380cf09c41d7a5e43a9876375744a1a9944 Mon Sep 17 00:00:00 2001 From: etofi <19774831+etofi@users.noreply.github.com> Date: Sun, 15 Sep 2024 19:30:47 +0200 Subject: [PATCH 15/36] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 66ecfe3..720b5ac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,7 +28,7 @@ RUN apk --no-cache --update \ php83-xml \ && mkdir /htdocs -COPY . /usr/local/apache2/htdocs/ +COPY / /usr/local/apache2/htdocs/ EXPOSE 80 From 4658c9ecc38c49f9c559b4fe2f3b0373c31d31b3 Mon Sep 17 00:00:00 2001 From: etofi <19774831+etofi@users.noreply.github.com> Date: Sun, 15 Sep 2024 19:32:10 +0200 Subject: [PATCH 16/36] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 720b5ac..ead4c18 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,7 +28,7 @@ RUN apk --no-cache --update \ php83-xml \ && mkdir /htdocs -COPY / /usr/local/apache2/htdocs/ +COPY ./ /usr/local/apache2/htdocs/ EXPOSE 80 From 7c745b52dfbf9c630d3875d0ce9cbd4f9acccc7a Mon Sep 17 00:00:00 2001 From: etofi <19774831+etofi@users.noreply.github.com> Date: Sun, 15 Sep 2024 19:40:43 +0200 Subject: [PATCH 17/36] Update Dockerfile --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index ead4c18..59f57d7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,6 +34,8 @@ EXPOSE 80 ADD docker-entrypoint.sh / +RUN chmod +x docker-entrypoint.sh + HEALTHCHECK CMD wget -q --no-cache --spider localhost ENTRYPOINT ["/docker-entrypoint.sh"] From e181b9cd1c625f59b106d3523ce30a022cf443af Mon Sep 17 00:00:00 2001 From: etofi <19774831+etofi@users.noreply.github.com> Date: Sun, 15 Sep 2024 19:44:17 +0200 Subject: [PATCH 18/36] Update Dockerfile --- Dockerfile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 59f57d7..4d31d11 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,13 +29,11 @@ RUN apk --no-cache --update \ && mkdir /htdocs COPY ./ /usr/local/apache2/htdocs/ +COPY docker-entrypoint.sh / +RUN chmod +x /docker-entrypoint.sh EXPOSE 80 -ADD docker-entrypoint.sh / - -RUN chmod +x docker-entrypoint.sh - HEALTHCHECK CMD wget -q --no-cache --spider localhost ENTRYPOINT ["/docker-entrypoint.sh"] From dcb1d3415dad80c4afb5c8dd9f9cdb2d4e67d54c Mon Sep 17 00:00:00 2001 From: etofi <19774831+etofi@users.noreply.github.com> Date: Sun, 15 Sep 2024 19:53:01 +0200 Subject: [PATCH 19/36] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4d31d11..b2ec4c5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,7 +28,7 @@ RUN apk --no-cache --update \ php83-xml \ && mkdir /htdocs -COPY ./ /usr/local/apache2/htdocs/ +COPY ./ /htdocs/ COPY docker-entrypoint.sh / RUN chmod +x /docker-entrypoint.sh From 773f39595f51736366f42d75a178df9c9da3d58b Mon Sep 17 00:00:00 2001 From: etofi <19774831+etofi@users.noreply.github.com> Date: Sun, 15 Sep 2024 20:09:11 +0200 Subject: [PATCH 20/36] Update Dockerfile --- Dockerfile | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/Dockerfile b/Dockerfile index b2ec4c5..22f414a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,31 +1,13 @@ -FROM alpine:3.20 +FROM alpine:latest LABEL description="Alpine based image with apache2 and php8 for HomeHub." # Setup apache and php RUN apk --no-cache --update \ add apache2 \ - apache2-ssl \ - curl \ php83-apache2 \ - php83-bcmath \ - php83-bz2 \ - php83-calendar \ - php83-common \ - php83-ctype \ php83-curl \ - php83-dom \ - php83-gd \ - php83-iconv \ - php83-mbstring \ - php83-mysqli \ - php83-mysqlnd \ - php83-openssl \ - php83-pdo_mysql \ - php83-pdo_pgsql \ - php83-pdo_sqlite \ - php83-phar \ - php83-session \ php83-xml \ + php83-simplexml \ && mkdir /htdocs COPY ./ /htdocs/ From ed2d044382566b1e92e22d8c541b638e04b723f4 Mon Sep 17 00:00:00 2001 From: etofi <19774831+etofi@users.noreply.github.com> Date: Sun, 15 Sep 2024 20:14:02 +0200 Subject: [PATCH 21/36] Update docker-entrypoint.sh --- docker-entrypoint.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 3a778d4..34859c4 100644 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -24,11 +24,11 @@ sed -i 's#^ErrorLog .*#ErrorLog "/dev/stderr"\nTransferLog "/dev/stdout"#g' /etc sed -i 's#CustomLog .* combined#CustomLog "/dev/stdout" combined#g' /etc/apache2/httpd.conf # SSL DocumentRoot and Log locations -sed -i 's#^ErrorLog .*#ErrorLog "/dev/stderr"#g' /etc/apache2/conf.d/ssl.conf -sed -i 's#^TransferLog .*#TransferLog "/dev/stdout"#g' /etc/apache2/conf.d/ssl.conf -sed -i 's#^DocumentRoot ".*#DocumentRoot "/htdocs"#g' /etc/apache2/conf.d/ssl.conf -sed -i "s/ServerAdmin\ you@example.com/ServerAdmin\ ${SERVER_ADMIN}/" /etc/apache2/conf.d/ssl.conf -sed -i "s/ServerName\ www.example.com:443/ServerName\ ${HTTPS_SERVER_NAME}/" /etc/apache2/conf.d/ssl.conf +#sed -i 's#^ErrorLog .*#ErrorLog "/dev/stderr"#g' /etc/apache2/conf.d/ssl.conf +#sed -i 's#^TransferLog .*#TransferLog "/dev/stdout"#g' /etc/apache2/conf.d/ssl.conf +#sed -i 's#^DocumentRoot ".*#DocumentRoot "/htdocs"#g' /etc/apache2/conf.d/ssl.conf +#sed -i "s/ServerAdmin\ you@example.com/ServerAdmin\ ${SERVER_ADMIN}/" /etc/apache2/conf.d/ssl.conf +#sed -i "s/ServerName\ www.example.com:443/ServerName\ ${HTTPS_SERVER_NAME}/" /etc/apache2/conf.d/ssl.conf # Re-define LogLevel sed -i "s#^LogLevel .*#LogLevel ${LOG_LEVEL}#g" /etc/apache2/httpd.conf From 5dd0cf4fa9bce5cb2bfd4c12fc51276237c06ae6 Mon Sep 17 00:00:00 2001 From: etofi <19774831+etofi@users.noreply.github.com> Date: Sun, 15 Sep 2024 20:18:05 +0200 Subject: [PATCH 22/36] Update Dockerfile --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 22f414a..d8da020 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,6 +8,7 @@ RUN apk --no-cache --update \ php83-curl \ php83-xml \ php83-simplexml \ + php83-mbstring \ && mkdir /htdocs COPY ./ /htdocs/ From 6015ee5cf0d5bcb55c43400546c79c31891b98f2 Mon Sep 17 00:00:00 2001 From: etofi <19774831+etofi@users.noreply.github.com> Date: Sun, 15 Sep 2024 20:20:59 +0200 Subject: [PATCH 23/36] Update Dockerfile --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index d8da020..1247f0d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,7 @@ RUN apk --no-cache --update \ php83-xml \ php83-simplexml \ php83-mbstring \ + php83-ctype \ && mkdir /htdocs COPY ./ /htdocs/ From 7871d129e42938b50c5a897b0f37efe6b2134bbc Mon Sep 17 00:00:00 2001 From: etofi <19774831+etofi@users.noreply.github.com> Date: Sun, 15 Sep 2024 20:50:17 +0200 Subject: [PATCH 24/36] Update Dockerfile --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 1247f0d..15fa12a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,7 @@ LABEL description="Alpine based image with apache2 and php8 for HomeHub." # Setup apache and php RUN apk --no-cache --update \ add apache2 \ + curl \ php83-apache2 \ php83-curl \ php83-xml \ From e7378190653ed22acbaaa387a85b5025c9188dce Mon Sep 17 00:00:00 2001 From: etofi <19774831+etofi@users.noreply.github.com> Date: Sun, 15 Sep 2024 21:12:10 +0200 Subject: [PATCH 25/36] Update docker-entrypoint.sh --- docker-entrypoint.sh | 7 ------- 1 file changed, 7 deletions(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 34859c4..aa21da2 100644 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -23,13 +23,6 @@ sed -i 's#AllowOverride None#AllowOverride All#' /etc/apache2/httpd.conf sed -i 's#^ErrorLog .*#ErrorLog "/dev/stderr"\nTransferLog "/dev/stdout"#g' /etc/apache2/httpd.conf sed -i 's#CustomLog .* combined#CustomLog "/dev/stdout" combined#g' /etc/apache2/httpd.conf -# SSL DocumentRoot and Log locations -#sed -i 's#^ErrorLog .*#ErrorLog "/dev/stderr"#g' /etc/apache2/conf.d/ssl.conf -#sed -i 's#^TransferLog .*#TransferLog "/dev/stdout"#g' /etc/apache2/conf.d/ssl.conf -#sed -i 's#^DocumentRoot ".*#DocumentRoot "/htdocs"#g' /etc/apache2/conf.d/ssl.conf -#sed -i "s/ServerAdmin\ you@example.com/ServerAdmin\ ${SERVER_ADMIN}/" /etc/apache2/conf.d/ssl.conf -#sed -i "s/ServerName\ www.example.com:443/ServerName\ ${HTTPS_SERVER_NAME}/" /etc/apache2/conf.d/ssl.conf - # Re-define LogLevel sed -i "s#^LogLevel .*#LogLevel ${LOG_LEVEL}#g" /etc/apache2/httpd.conf From e9733ce038ba246f31eec93e9ac5313877e4f0ba Mon Sep 17 00:00:00 2001 From: etofi <19774831+etofi@users.noreply.github.com> Date: Tue, 17 Sep 2024 08:12:54 +0200 Subject: [PATCH 26/36] Create CUX2804.php --- components/CUX2804.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 components/CUX2804.php diff --git a/components/CUX2804.php b/components/CUX2804.php new file mode 100644 index 0000000..601e926 --- /dev/null +++ b/components/CUX2804.php @@ -0,0 +1,26 @@ +' + . '
' + . '
' . $component['name'] . '
' + . '
' + . '
' + . '' + . '
' + . '
' + . '
+
' + . '' + . '' + . '' + . '
' + . '
' + . ''; + } +} From 3a29a30a42d661f524edead8ca3f9fd3c1250941 Mon Sep 17 00:00:00 2001 From: etofi <19774831+etofi@users.noreply.github.com> Date: Tue, 17 Sep 2024 08:30:35 +0200 Subject: [PATCH 27/36] Delete components/CUX2804.php --- components/CUX2804.php | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 components/CUX2804.php diff --git a/components/CUX2804.php b/components/CUX2804.php deleted file mode 100644 index 601e926..0000000 --- a/components/CUX2804.php +++ /dev/null @@ -1,26 +0,0 @@ -' - . '
' - . '
' . $component['name'] . '
' - . '
' - . '
' - . '' - . '
' - . '
' - . '
-
' - . '' - . '' - . '' - . '
' - . '
' - . ''; - } -} From b187b3fbe37ddb651ea514a2b408f4ff0ad9260b Mon Sep 17 00:00:00 2001 From: etofi <19774831+etofi@users.noreply.github.com> Date: Tue, 17 Sep 2024 20:30:06 +0200 Subject: [PATCH 28/36] Update README.md --- README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/README.md b/README.md index 992d286..95afbb9 100644 --- a/README.md +++ b/README.md @@ -55,5 +55,31 @@ Bei folgenden Komponenten lässt sich durch Angabe von ``"showtime":"true"`` die - Program - SysVar +## Docker Integration +``` +docker run \ +-d \ +--name=HomeHub \ +--restart unless-stopped \ +-p 8080:80 \ +-e TZ=Europe/Berlin \ +-v /FOLDER/OF/YOUR/CONFIG:/htdocs/config \ +ghcr.io/etofi/homehub_docker:master +``` + +The available parameters in detail: + +| Parameter | Optional | Example | Description | +| ---- | --- | --- | --- | +| `TIMEZONE` | yes | Europe/Berlin | Timezone for the container | +| `-p` | no | 80:8080 | Map Apache2 Listenport inside this Container to Host Device Listen Port (Bridge Mode) | + +Volumes: + +| Volume | Description | +| ---- | --- | +| `/FOLDER/OF/YOUR/CONFIG` | The directory to to persist /htdocs/config of the HomeHub settings | + + ## Lizenzen HomeHub nutzt [jQuery](https://jquery.com/license/), [Chartjs](Chartjs.org), [knx-uf-iconset](https://github.com/OpenAutomationProject/knx-uf-iconset), [Bootstrap](https://getbootstrap.com/) From 808839c5d4306348357be8aafb4d31b2b519bc6e Mon Sep 17 00:00:00 2001 From: etofi <19774831+etofi@users.noreply.github.com> Date: Wed, 18 Sep 2024 07:41:48 +0200 Subject: [PATCH 29/36] Update docker-entrypoint.sh --- docker-entrypoint.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index aa21da2..da39acd 100644 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -12,12 +12,13 @@ PHP_MEMORY_LIMIT="${PHP_MEMORY_LIMIT:-256M}" echo 'Updating configurations' -# Change Server Admin, Name, Document Root +# Change Server Admin, Name, Document Root and Startpage sed -i "s/ServerAdmin\ you@example.com/ServerAdmin\ ${SERVER_ADMIN}/" /etc/apache2/httpd.conf sed -i "s/#ServerName\ www.example.com:80/ServerName\ ${HTTP_SERVER_NAME}/" /etc/apache2/httpd.conf sed -i 's#^DocumentRoot ".*#DocumentRoot "/htdocs"#g' /etc/apache2/httpd.conf sed -i 's#Directory "/var/www/localhost/htdocs"#Directory "/htdocs"#g' /etc/apache2/httpd.conf sed -i 's#AllowOverride None#AllowOverride All#' /etc/apache2/httpd.conf +sed -i 's#DirectoryIndex index.html#ADirectoryIndex index.php#' /etc/apache2/httpd.conf # Change TransferLog after ErrorLog sed -i 's#^ErrorLog .*#ErrorLog "/dev/stderr"\nTransferLog "/dev/stdout"#g' /etc/apache2/httpd.conf From 5e6e2949cc2bd95f3c630a3985ddb6418ec2e4e3 Mon Sep 17 00:00:00 2001 From: etofi <19774831+etofi@users.noreply.github.com> Date: Wed, 18 Sep 2024 07:54:24 +0200 Subject: [PATCH 30/36] Update docker-entrypoint.sh --- docker-entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index da39acd..51ed8b4 100644 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -18,7 +18,7 @@ sed -i "s/#ServerName\ www.example.com:80/ServerName\ ${HTTP_SERVER_NAME}/" /etc sed -i 's#^DocumentRoot ".*#DocumentRoot "/htdocs"#g' /etc/apache2/httpd.conf sed -i 's#Directory "/var/www/localhost/htdocs"#Directory "/htdocs"#g' /etc/apache2/httpd.conf sed -i 's#AllowOverride None#AllowOverride All#' /etc/apache2/httpd.conf -sed -i 's#DirectoryIndex index.html#ADirectoryIndex index.php#' /etc/apache2/httpd.conf +sed -i 's#DirectoryIndex index.html#DirectoryIndex index.php#' /etc/apache2/httpd.conf # Change TransferLog after ErrorLog sed -i 's#^ErrorLog .*#ErrorLog "/dev/stderr"\nTransferLog "/dev/stdout"#g' /etc/apache2/httpd.conf From 140306ef129e358145397d7caf555739860e5239 Mon Sep 17 00:00:00 2001 From: etofi <19774831+etofi@users.noreply.github.com> Date: Wed, 18 Sep 2024 16:58:49 +0200 Subject: [PATCH 31/36] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 95afbb9..3ae6c0d 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ Volumes: | Volume | Description | | ---- | --- | -| `/FOLDER/OF/YOUR/CONFIG` | The directory to to persist /htdocs/config of the HomeHub settings | +| `/FOLDER/OF/YOUR/CONFIG` | The directory to to persist /htdocs/config of the HomeHub settings. This folder is located on the PC on which Docker is running and the files from the config directory go into it. They are then automatically passed through to the HomeHub Docker instance. | ## Lizenzen From e5fc44a5f75f8692da52448aa61d158ca683feae Mon Sep 17 00:00:00 2001 From: etofi <19774831+etofi@users.noreply.github.com> Date: Wed, 18 Sep 2024 17:04:27 +0200 Subject: [PATCH 32/36] Update README.md --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 3ae6c0d..e3dfada 100644 --- a/README.md +++ b/README.md @@ -67,18 +67,18 @@ docker run \ ghcr.io/etofi/homehub_docker:master ``` -The available parameters in detail: +Verfügbare Parameters im Detail: -| Parameter | Optional | Example | Description | +| Parameter | Optional | Beispiel | Erklärung | | ---- | --- | --- | --- | -| `TIMEZONE` | yes | Europe/Berlin | Timezone for the container | -| `-p` | no | 80:8080 | Map Apache2 Listenport inside this Container to Host Device Listen Port (Bridge Mode) | +| `TIMEZONE` | yes | Europe/Berlin | Timezone im Container | +| `-p` | no | 80:8080 | Zuweisung des Apache2 Port innerhalb dieses Containers auf den Docker-Host Port (Bridge Mode). Mit dieser Konfiguration kann HomeHub dann über Port 8080 des Docker-Hosts erreicht werden, z. B. 192.168.178.100:8080| Volumes: -| Volume | Description | +| Volume | Erklärung | | ---- | --- | -| `/FOLDER/OF/YOUR/CONFIG` | The directory to to persist /htdocs/config of the HomeHub settings. This folder is located on the PC on which Docker is running and the files from the config directory go into it. They are then automatically passed through to the HomeHub Docker instance. | +| `/FOLDER/OF/YOUR/CONFIG` | Das Verzeichnis /htdocs/config, in dem die HomeHub-Einstellungen gespeichert werden sollen. Dieser Ordner befindet sich auf dem PC, auf dem Docker ausgeführt wird und die Dateien aus dem Verzeichnis config werden dort abgelegt. Sie werden dann automatisch an die HomeHub-Docker-Instanz weitergeleitet. | ## Lizenzen From c2c9d111f8f77a3749b8ead959878a6221312d05 Mon Sep 17 00:00:00 2001 From: Gerti1972 Date: Wed, 18 Sep 2024 19:14:58 +0200 Subject: [PATCH 33/36] =?UTF-8?q?HmIP-eTRV-3=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/mapping.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/mapping.json b/config/mapping.json index d861fb8..e6f8ef3 100644 --- a/config/mapping.json +++ b/config/mapping.json @@ -481,6 +481,10 @@ "name": "HmIP-eTRV-F", "icon": "sani_heating.png" }, + { + "name": "HmIP-eTRV-3", + "icon": "sani_heating.png" + }, { "name": "HmIP-eTRV-2I9F", "icon": "sani_heating.png" From 504d8db669a4ca528e2913c226181c70b463c631 Mon Sep 17 00:00:00 2001 From: Gerti1972 Date: Wed, 18 Sep 2024 19:16:26 +0200 Subject: [PATCH 34/36] =?UTF-8?q?HmIP-eTRV-3=20hinzugef=C3=BCgt=20und=20Hm?= =?UTF-8?q?IP-eTRV-F=20angepasst?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/script.js.php | 46 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/js/script.js.php b/js/script.js.php index 8937809..9ee71d5 100644 --- a/js/script.js.php +++ b/js/script.js.php @@ -729,8 +729,7 @@ case 'HmIP-eTRV-E-S': case 'HmIP-eTRV-CL': case 'HmIP-eTRV-C': - case 'HmIP-eTRV-C-2': - case 'HmIP-eTRV-F': + case 'HmIP-eTRV-C-2': switch (datapoint) { case 'ACTUAL_TEMPERATURE': $('[data-id="' + ise_id + '"]').html(' ' + (Math.round(value * 10) / 10).toFixed(1) + ' °C    '); @@ -771,6 +770,49 @@ $('[data-id="' + ise_id + '"]').html(value); } break; + case 'HmIP-eTRV-F': + case 'HmIP-eTRV-3': + switch (datapoint) { + case 'ACTUAL_TEMPERATURE': + $('[data-id="' + ise_id + '"]').html(' ' + (Math.round(value * 10) / 10).toFixed(1) + ' °C    '); + break; + case 'SET_POINT_MODE': + if (value === '0') { + $('[data-id="' + ise_id + '"]').html(''); + $('[data-id="' + ise_id + '"]').attr('data-set-id', parseInt(ise_id)-10); //MANU_MODE + $('[data-id="' + ise_id + '"]').attr('data-set-value', '1'); + } else { + $('[data-id="' + ise_id + '"]').html(''); + $('[data-id="' + ise_id + '"]').attr('data-set-id', parseInt(ise_id)-10); //AUTO_MODE + $('[data-id="' + ise_id + '"]').attr('data-set-value', '0'); + } + break; + case 'ACTIVE_PROFILE': + if (value < 4) $('[data-id="' + ise_id + '"]').html(value + ' '); + else $('[data-id="' + ise_id + '"]').html(value + ' '); + break; + case 'SET_POINT_TEMPERATURE': + $('[data-id="' + ise_id + '"]').html(' ' + (Math.round(value * 10) / 10).toFixed(1) + ' °C'); + break; + case 'LEVEL': + $('[data-id="' + ise_id + '"]').html('     ' + (Math.round(value * 1000) / 10) + ' %'); + break; + case 'WINDOW_STATE': + if (value === '0') { + $('[data-id="' + ise_id + '"]').html(''); + } else { + $('[data-id="' + ise_id + '"]').html(''); + } + break; + case 'LOW_BAT': + if (value === 'true') { + $('[data-id="' + ise_id + '"]').html(''); + } + break; + default: + $('[data-id="' + ise_id + '"]').html(value); + } + break; case 'HmIP-FALMOT-C12': switch (datapoint) { case 'LEVEL': From a6a37619de47ce0f2d29074e5089f27a333a67ef Mon Sep 17 00:00:00 2001 From: Gerti1972 Date: Wed, 18 Sep 2024 19:17:21 +0200 Subject: [PATCH 35/36] =?UTF-8?q?HmIP-eTRV-3=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/HmIP-eTRV-3.php | 75 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 components/HmIP-eTRV-3.php diff --git a/components/HmIP-eTRV-3.php b/components/HmIP-eTRV-3.php new file mode 100644 index 0000000..0da9ef7 --- /dev/null +++ b/components/HmIP-eTRV-3.php @@ -0,0 +1,75 @@ +' + . '
' + . '
' . $component['name'] . '
' + . '
' + . '' + . '' + . '' + . '' + . '' + . '' + . '' + . '
' + . '
' + . '
' + . '
+
' + . '
Temperatur: ' + . '
' + . '' + . '' + . '' + . '' + . '
' + . '   Heizprofil: ' + . '
' + . '' + . '' + . '' + . '
' + . '   Kühlprofil: ' + . '
' + . '' + . '' + . '' + . '
' + . '
' + . '
' + . '
' + . '
' + . '' + . '' + . '
' + . '
' + . '
' + . ''; + } +} From 57f6ea1995070a52622e936577c6bd1fcc76a3f6 Mon Sep 17 00:00:00 2001 From: Gerti1972 Date: Wed, 18 Sep 2024 19:17:56 +0200 Subject: [PATCH 36/36] =?UTF-8?q?HmIP-eTRV-F=20um=20K=C3=BChlbetrieb=20erw?= =?UTF-8?q?eitert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/HmIP-eTRV-F.php | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/components/HmIP-eTRV-F.php b/components/HmIP-eTRV-F.php index e9b1664..3ba7721 100644 --- a/components/HmIP-eTRV-F.php +++ b/components/HmIP-eTRV-F.php @@ -33,7 +33,7 @@ function HmIP_eTRV_F($component) { . '' . '' . '' - . '   Profil: ' + . '   Heizprofil: ' . '
' . '' - . '
' - . '' + . '' + . '   Kühlprofil: ' + . '
' + . '' + . '' + . '' + . '
' + . '' . '' . '
' . '
'