From aa8dae2bf8c4f999880fef1aa6bc7197573c95a6 Mon Sep 17 00:00:00 2001 From: Fredrik Baberg Date: Mon, 15 Jan 2024 23:06:55 +0100 Subject: [PATCH 01/12] Update base image, octoprint version and addon version --- 3dprinter-octoprint/Dockerfile | 4 ++-- 3dprinter-octoprint/build.yaml | 10 +++++----- 3dprinter-octoprint/config.yaml | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/3dprinter-octoprint/Dockerfile b/3dprinter-octoprint/Dockerfile index 86bf5ae..7bcd8c5 100644 --- a/3dprinter-octoprint/Dockerfile +++ b/3dprinter-octoprint/Dockerfile @@ -1,6 +1,6 @@ -ARG BUILD_FROM="ghcr.io/home-assistant/amd64-base-debian:bullseye" +ARG BUILD_FROM="ghcr.io/home-assistant/amd64-base-debian:bookworm" FROM ${BUILD_FROM} -ARG OCTOPRINT_VERSION="1.8.6" +ARG OCTOPRINT_VERSION="1.9.3" # Setup path for persistent install of Python packages ENV PYTHONPATH=/data/python/octoprint diff --git a/3dprinter-octoprint/build.yaml b/3dprinter-octoprint/build.yaml index 9b5c7c5..3fda4f8 100644 --- a/3dprinter-octoprint/build.yaml +++ b/3dprinter-octoprint/build.yaml @@ -1,11 +1,11 @@ build_from: - aarch64: ghcr.io/home-assistant/aarch64-base-debian:bullseye - amd64: ghcr.io/home-assistant/amd64-base-debian:bullseye - armhf: ghcr.io/home-assistant/armhf-base-debian:bullseye - armv7: ghcr.io/home-assistant/armv7-base-debian:bullseye + aarch64: ghcr.io/home-assistant/aarch64-base-debian:bookworm + amd64: ghcr.io/home-assistant/amd64-base-debian:bookworm + armhf: ghcr.io/home-assistant/armhf-base-debian:bookworm + armv7: ghcr.io/home-assistant/armv7-base-debian:bookworm labels: org.opencontainers.image.title: "Home Assistant Add-on: 3DPrinter-OctoPrint" org.opencontainers.image.description: "3DPrinter-OctoPrint addon for Home-Assistant." org.opencontainers.image.source: "https://github.com/fredrikbaberg/ha-3dprinter-addons" args: - OCTOPRINT_VERSION: "1.8.7" + OCTOPRINT_VERSION: "1.9.3" diff --git a/3dprinter-octoprint/config.yaml b/3dprinter-octoprint/config.yaml index 90139d5..3d111cb 100644 --- a/3dprinter-octoprint/config.yaml +++ b/3dprinter-octoprint/config.yaml @@ -1,5 +1,5 @@ name: "3DPrinter-OctoPrint" -version: "2023.03.1" +version: "2024.01.0" slug: "3dprinter-octoprint" description: "OctoPrint as an addon, no additional bells and whistles." arch: From bbb226309264e3d399c6d50843f9cf609533c8be Mon Sep 17 00:00:00 2001 From: Fredrik Baberg Date: Mon, 15 Jan 2024 23:48:12 +0100 Subject: [PATCH 02/12] Update documentation --- .vscode/settings.json | 10 ++++++++++ 3dprinter-octoprint/CHANGELOG.md | 6 ++++++ 3dprinter-octoprint/DOCS.md | 20 ++++---------------- 3dprinter-octoprint/README.md | 2 -- 4 files changed, 20 insertions(+), 18 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..eb56df2 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,10 @@ +{ + "spellright.language": [ + "en" + ], + "spellright.documentTypes": [ + "markdown", + "latex", + "plaintext" + ] +} \ No newline at end of file diff --git a/3dprinter-octoprint/CHANGELOG.md b/3dprinter-octoprint/CHANGELOG.md index ee260bc..3b0a87c 100644 --- a/3dprinter-octoprint/CHANGELOG.md +++ b/3dprinter-octoprint/CHANGELOG.md @@ -1,3 +1,9 @@ +## 2024.01.0 + + * Maintenance release: + * Upgrade base image to Bookworm. + * Upgrade default OctoPrint version to 1.9.3. + ## 2023.03.1 * Add check that OctoPrint can install at buildtime. * Add missing dependency for armhf (libffi-dev) diff --git a/3dprinter-octoprint/DOCS.md b/3dprinter-octoprint/DOCS.md index cb3f58a..e4c906a 100644 --- a/3dprinter-octoprint/DOCS.md +++ b/3dprinter-octoprint/DOCS.md @@ -6,7 +6,7 @@ Set a network port in addon settings to be able to access the WebUI. ## Trusted proxies -By setting trusted proxies you should be able to use HTTPS *if you have placed a reverse proxy in front of Home Assistant*. For more information, see [Caddy documentation](https://caddyserver.com/docs/caddyfile/directives/reverse_proxy). +*If you have placed a reverse proxy in front of Home Assistant*, by setting trusted proxies you should be able to use HTTPS. For more information, see [Caddy documentation](https://caddyserver.com/docs/caddyfile/directives/reverse_proxy). # OctoPrint integration @@ -19,22 +19,10 @@ Go to OctoPrint WebUI, you should see a request for authentication. # Camera -There is no camera server in the addon, it has to be setup separately. +This addon does not include a camera server, it has to be setup separately. -You could, for instance, use the addon [camera-mjpg-streamer](https://github.com/fredrikbaberg/3dprinter-addons/tree/main/camera-mjpg-streamer) available in the same repository. If so, you can set the snapshot URL to: -> `http://cce6f2d5-camera-mjpg-streamer/?action=snapshot`. +You could, for instance, use the addon [camera-mjpg-streamer](https://github.com/fredrikbaberg/ha-3dprinter-addons/tree/main/camera-mjpg-streamer) available in the same repository. Note that this method **only allows for snapshot**, it does **NOT** work for camera stream as this requires the browser/app used to directly access the stream. -Note that this method **only allows for snapshot**, it does **NOT** work for camera stream as this requires the browser/app used to directly access the stream. - -# Ingress? - -This add-on drops support for Ingress. The main reason for this is issues with finding a working configuration. - -* An update to OctoPrint increased the security (which is good!). Unfortunately it also broke the configuration used in this addon, most likely due to this addon not behaving properly. -* There has been issues with accessing camera stream by Ingress since I added support for it, which I have not been able to solve. - -I have tried to find a solution to this, without success. Therefore I decided to disable the option, as it just leads to frustration. - -If someone is able to find a working configuration, please let me know. +# Remote access If you need remote access, have a look at [remote access plugins for OctoPrint](https://plugins.octoprint.org/topics/remote_access/). Remember to **NEVER** directly portforward your OctoPrint instance to the internet! diff --git a/3dprinter-octoprint/README.md b/3dprinter-octoprint/README.md index d21ff17..2186808 100644 --- a/3dprinter-octoprint/README.md +++ b/3dprinter-octoprint/README.md @@ -2,8 +2,6 @@ Provides OctoPrint as an addon to Home Assistant. -Note: Ingress is **NOT** supported. - ## Instructions Set a network port in addon settings. From cf99378088a5cedd4f28827ccfe4e30ba18f4654 Mon Sep 17 00:00:00 2001 From: Fredrik Baberg Date: Mon, 15 Jan 2024 23:54:28 +0100 Subject: [PATCH 03/12] Update 3DPrinter-Remote --- 3dprinter-remote/CHANGELOG.md | 3 +++ 3dprinter-remote/config.yaml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 3dprinter-remote/CHANGELOG.md diff --git a/3dprinter-remote/CHANGELOG.md b/3dprinter-remote/CHANGELOG.md new file mode 100644 index 0000000..692993b --- /dev/null +++ b/3dprinter-remote/CHANGELOG.md @@ -0,0 +1,3 @@ +## 2024.01.0 + + * Maintenance release \ No newline at end of file diff --git a/3dprinter-remote/config.yaml b/3dprinter-remote/config.yaml index 4904cb6..6ecfc9c 100644 --- a/3dprinter-remote/config.yaml +++ b/3dprinter-remote/config.yaml @@ -1,5 +1,5 @@ name: "3DPrinter-Remote" -version: "2023.03.0" +version: "2024.01.0" slug: "3dprinter-remote" description: "Add-on for accessing 3DPrinter remotely using socat" url: "https://github.com/fredrikbaberg/ha-3dprinter-addons/tree/main/3dprinter-remote" From 9364a3b8ad50139aec7c6388af0808ffa8512993 Mon Sep 17 00:00:00 2001 From: Fredrik Baberg Date: Tue, 16 Jan 2024 00:00:15 +0100 Subject: [PATCH 04/12] Maintenance release of camera-mjpg-streamer --- camera-mjpg-streamer/CHANGELOG.md | 3 +++ camera-mjpg-streamer/config.yaml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 camera-mjpg-streamer/CHANGELOG.md diff --git a/camera-mjpg-streamer/CHANGELOG.md b/camera-mjpg-streamer/CHANGELOG.md new file mode 100644 index 0000000..692993b --- /dev/null +++ b/camera-mjpg-streamer/CHANGELOG.md @@ -0,0 +1,3 @@ +## 2024.01.0 + + * Maintenance release \ No newline at end of file diff --git a/camera-mjpg-streamer/config.yaml b/camera-mjpg-streamer/config.yaml index dd629b6..d2fe0d6 100644 --- a/camera-mjpg-streamer/config.yaml +++ b/camera-mjpg-streamer/config.yaml @@ -1,5 +1,5 @@ name: "Camera-mjpg-streamer" -version: "2022.7.0" +version: "2024.01.0" slug: "camera-mjpg-streamer" description: "Camera streaming addon for Home Assistant, based on mjpg-streamer." url: "https://github.com/fredrikbaberg/ha-3dprinter-addons/tree/main/camera-mjpg-streamer" From fdf219991f72707af2b39892b5b079542cbb7cdc Mon Sep 17 00:00:00 2001 From: Fredrik Baberg Date: Tue, 16 Jan 2024 17:02:21 +0100 Subject: [PATCH 05/12] Update templates --- .github/ISSUE_TEMPLATE/bug_report.yml | 1 + .github/ISSUE_TEMPLATE/feature_request.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 3b17b50..f0933de 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -27,6 +27,7 @@ body: label: Which add-on are you reporting an issue with? options: - 3DPrinter-OctoPrint + - 3DPrinter-Remote - Camera-mjpg-streamer - type: input diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index e9bd04e..a415904 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -16,6 +16,7 @@ body: options: - Other - 3DPrinter-OctoPrint + - 3DPrinter-Remote - Camera-mjpg-streamer - type: textarea From ce60f7dfbd0f53ccac67e4bd589d2f6f15ce1c22 Mon Sep 17 00:00:00 2001 From: Fredrik Baberg Date: Tue, 16 Jan 2024 17:02:51 +0100 Subject: [PATCH 06/12] Update formatting of devcontainer file --- .devcontainer/devcontainer.json | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 1d9d844..7700fa7 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,14 +1,26 @@ { "name": "Example devcontainer for add-on repositories", "image": "ghcr.io/home-assistant/devcontainer:addons", - "appPort": ["7123:8123", "7357:4357"], + "appPort": [ + "7123:8123", + "7357:4357" + ], "postStartCommand": "bash devcontainer_bootstrap", - "runArgs": ["-e", "GIT_EDITOR=code --wait", "--privileged"], + "runArgs": [ + "-e", + "GIT_EDITOR=code --wait", + "--privileged" + ], "containerEnv": { "WORKSPACE_DIRECTORY": "${containerWorkspaceFolder}" }, - "extensions": ["timonwong.shellcheck", "esbenp.prettier-vscode"], - "mounts": [ "type=volume,target=/var/lib/docker" ], + "extensions": [ + "timonwong.shellcheck", + "esbenp.prettier-vscode" + ], + "mounts": [ + "type=volume,target=/var/lib/docker" + ], "settings": { "terminal.integrated.profiles.linux": { "zsh": { From b3bdcee50c12af2523d9a55f6dc063969052585b Mon Sep 17 00:00:00 2001 From: Fredrik Baberg Date: Tue, 16 Jan 2024 17:04:09 +0100 Subject: [PATCH 07/12] Rename workflows --- .github/workflows/build.yml | 2 +- ...inter-octoprint.yml => manual-build-3dprinter-octoprint.yml} | 2 +- .../{3dprinter-remote.yml => manual-build-3dprinter-remote.yml} | 2 +- ...-mjpg-streamer.yml => manual-build-camera-mjpg-streamer.yml} | 2 +- .../{camera-ustreamer.yml => manual-build-camera-ustreamer.yml} | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) rename .github/workflows/{3dprinter-octoprint.yml => manual-build-3dprinter-octoprint.yml} (97%) rename .github/workflows/{3dprinter-remote.yml => manual-build-3dprinter-remote.yml} (97%) rename .github/workflows/{camera-mjpg-streamer.yml => manual-build-camera-mjpg-streamer.yml} (97%) rename .github/workflows/{camera-ustreamer.yml => manual-build-camera-ustreamer.yml} (97%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c8482f4..8a3df5c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,6 @@ --- # yamllint disable rule:line-length rule:truthy -name: Build add-on +name: Build add-on(s) env: BUILD_ARGS: "--test" diff --git a/.github/workflows/3dprinter-octoprint.yml b/.github/workflows/manual-build-3dprinter-octoprint.yml similarity index 97% rename from .github/workflows/3dprinter-octoprint.yml rename to .github/workflows/manual-build-3dprinter-octoprint.yml index 7b91072..377313e 100644 --- a/.github/workflows/3dprinter-octoprint.yml +++ b/.github/workflows/manual-build-3dprinter-octoprint.yml @@ -1,4 +1,4 @@ -name: 3DPrinter-Octoprint manual build +name: 3DPrinter-Octoprint - manual build on: workflow_dispatch: diff --git a/.github/workflows/3dprinter-remote.yml b/.github/workflows/manual-build-3dprinter-remote.yml similarity index 97% rename from .github/workflows/3dprinter-remote.yml rename to .github/workflows/manual-build-3dprinter-remote.yml index 092be19..e3b9bca 100644 --- a/.github/workflows/3dprinter-remote.yml +++ b/.github/workflows/manual-build-3dprinter-remote.yml @@ -1,4 +1,4 @@ -name: 3DPrinter-Remote manual build +name: 3DPrinter-Remote - manual build on: workflow_dispatch: diff --git a/.github/workflows/camera-mjpg-streamer.yml b/.github/workflows/manual-build-camera-mjpg-streamer.yml similarity index 97% rename from .github/workflows/camera-mjpg-streamer.yml rename to .github/workflows/manual-build-camera-mjpg-streamer.yml index 0a9ddce..8901119 100644 --- a/.github/workflows/camera-mjpg-streamer.yml +++ b/.github/workflows/manual-build-camera-mjpg-streamer.yml @@ -1,4 +1,4 @@ -name: camera-mjpg-streamer manual build +name: camera-mjpg-streamer - manual build on: workflow_dispatch: diff --git a/.github/workflows/camera-ustreamer.yml b/.github/workflows/manual-build-camera-ustreamer.yml similarity index 97% rename from .github/workflows/camera-ustreamer.yml rename to .github/workflows/manual-build-camera-ustreamer.yml index 57159a9..1653e22 100644 --- a/.github/workflows/camera-ustreamer.yml +++ b/.github/workflows/manual-build-camera-ustreamer.yml @@ -1,4 +1,4 @@ -name: camera-ustreamer manual build +name: camera-ustreamer - manual build on: workflow_dispatch: From 3bf6f39ef1820dfc051502addee602f3ff9b0398 Mon Sep 17 00:00:00 2001 From: Fredrik Baberg Date: Tue, 16 Jan 2024 19:46:43 +0100 Subject: [PATCH 08/12] Add check that pip is available on startup of OctoPrint --- 3dprinter-octoprint/config.yaml | 2 +- 3dprinter-octoprint/rootfs/etc/cont-init.d/octoprint.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/3dprinter-octoprint/config.yaml b/3dprinter-octoprint/config.yaml index 3d111cb..42f2b5f 100644 --- a/3dprinter-octoprint/config.yaml +++ b/3dprinter-octoprint/config.yaml @@ -1,5 +1,5 @@ name: "3DPrinter-OctoPrint" -version: "2024.01.0" +version: "2024.01.1" slug: "3dprinter-octoprint" description: "OctoPrint as an addon, no additional bells and whistles." arch: diff --git a/3dprinter-octoprint/rootfs/etc/cont-init.d/octoprint.sh b/3dprinter-octoprint/rootfs/etc/cont-init.d/octoprint.sh index bf03afd..e0ef94d 100644 --- a/3dprinter-octoprint/rootfs/etc/cont-init.d/octoprint.sh +++ b/3dprinter-octoprint/rootfs/etc/cont-init.d/octoprint.sh @@ -10,6 +10,7 @@ export BASEDIR="--basedir /data/config/octoprint" } || { # Otherwise install it. { # Check if Python is available (at `/data/python/octoprint`, set by PATH in Dockerfile) python --version + python -m ensurepip } || { # Otherwise create Python virtual environment. python3 -m venv /data/python/octoprint # Install wheel to speed up future installs. From 9269270187e81815382fd68bc3e3fbcef851029d Mon Sep 17 00:00:00 2001 From: Fredrik Baberg Date: Wed, 17 Jan 2024 00:58:09 +0100 Subject: [PATCH 09/12] Use bullseye instead of bookworm --- 3dprinter-octoprint/Dockerfile | 2 +- 3dprinter-octoprint/build.yaml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/3dprinter-octoprint/Dockerfile b/3dprinter-octoprint/Dockerfile index 7bcd8c5..775f30b 100644 --- a/3dprinter-octoprint/Dockerfile +++ b/3dprinter-octoprint/Dockerfile @@ -1,4 +1,4 @@ -ARG BUILD_FROM="ghcr.io/home-assistant/amd64-base-debian:bookworm" +ARG BUILD_FROM="ghcr.io/home-assistant/amd64-base-debian:bullseye" FROM ${BUILD_FROM} ARG OCTOPRINT_VERSION="1.9.3" diff --git a/3dprinter-octoprint/build.yaml b/3dprinter-octoprint/build.yaml index 3fda4f8..0e4c766 100644 --- a/3dprinter-octoprint/build.yaml +++ b/3dprinter-octoprint/build.yaml @@ -1,8 +1,8 @@ build_from: - aarch64: ghcr.io/home-assistant/aarch64-base-debian:bookworm - amd64: ghcr.io/home-assistant/amd64-base-debian:bookworm - armhf: ghcr.io/home-assistant/armhf-base-debian:bookworm - armv7: ghcr.io/home-assistant/armv7-base-debian:bookworm + aarch64: ghcr.io/home-assistant/aarch64-base-debian:bullseye + amd64: ghcr.io/home-assistant/amd64-base-debian:bullseye + armhf: ghcr.io/home-assistant/armhf-base-debian:bullseye + armv7: ghcr.io/home-assistant/armv7-base-debian:bullseye labels: org.opencontainers.image.title: "Home Assistant Add-on: 3DPrinter-OctoPrint" org.opencontainers.image.description: "3DPrinter-OctoPrint addon for Home-Assistant." From 037e9dd90e2c6abfb07047a2063771b7b4a45554 Mon Sep 17 00:00:00 2001 From: Fredrik Baberg Date: Wed, 17 Jan 2024 01:01:13 +0100 Subject: [PATCH 10/12] Skip ensurepip in octoprint start --- 3dprinter-octoprint/rootfs/etc/cont-init.d/octoprint.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/3dprinter-octoprint/rootfs/etc/cont-init.d/octoprint.sh b/3dprinter-octoprint/rootfs/etc/cont-init.d/octoprint.sh index e0ef94d..bf03afd 100644 --- a/3dprinter-octoprint/rootfs/etc/cont-init.d/octoprint.sh +++ b/3dprinter-octoprint/rootfs/etc/cont-init.d/octoprint.sh @@ -10,7 +10,6 @@ export BASEDIR="--basedir /data/config/octoprint" } || { # Otherwise install it. { # Check if Python is available (at `/data/python/octoprint`, set by PATH in Dockerfile) python --version - python -m ensurepip } || { # Otherwise create Python virtual environment. python3 -m venv /data/python/octoprint # Install wheel to speed up future installs. From 4d99915107f7a6763f3f8035daeb875dd1d676fb Mon Sep 17 00:00:00 2001 From: Fredrik Baberg Date: Wed, 17 Jan 2024 01:26:08 +0100 Subject: [PATCH 11/12] Update changelog for 3DPrinter-OctoPrint --- 3dprinter-octoprint/CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/3dprinter-octoprint/CHANGELOG.md b/3dprinter-octoprint/CHANGELOG.md index 3b0a87c..f3722ad 100644 --- a/3dprinter-octoprint/CHANGELOG.md +++ b/3dprinter-octoprint/CHANGELOG.md @@ -1,7 +1,7 @@ -## 2024.01.0 +## 2024.01.1 * Maintenance release: - * Upgrade base image to Bookworm. + * Upgrade base image. * Upgrade default OctoPrint version to 1.9.3. ## 2023.03.1 From 4078b98915b54f44a68b72d6f0c3bf8e93995f85 Mon Sep 17 00:00:00 2001 From: Fredrik Baberg Date: Wed, 17 Jan 2024 01:35:43 +0100 Subject: [PATCH 12/12] Update changelog --- 3dprinter-octoprint/CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/3dprinter-octoprint/CHANGELOG.md b/3dprinter-octoprint/CHANGELOG.md index f3722ad..a3b5fd3 100644 --- a/3dprinter-octoprint/CHANGELOG.md +++ b/3dprinter-octoprint/CHANGELOG.md @@ -1,8 +1,8 @@ ## 2024.01.1 * Maintenance release: - * Upgrade base image. - * Upgrade default OctoPrint version to 1.9.3. + * Update base image. + * Update default OctoPrint version to 1.9.3. ## 2023.03.1 * Add check that OctoPrint can install at buildtime.