diff --git a/README.md b/README.md index 300f889..27b669f 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,18 @@ -# connectd add-ons for home assistant +# sudoxnym's home assistant add-ons ## installation 1. go to **settings** → **add-ons** → **add-on store** 2. click the three dots in the top right → **repositories** 3. add: `https://github.com/sudoxnym/ha-addons` -4. find **connectd** in the store and install +4. find the add-ons in the store and install + +[![Open your Home Assistant instance and show the add add-on repository dialog with a specific repository URL pre-filled.](https://my.home-assistant.io/badges/supervisor_add_addon_repository.svg)](https://my.home-assistant.io/redirect/supervisor_add_addon_repository/?repository_url=https%3A%2F%2Fgithub.com%2Fsudoxnym%2Fha-addons) ## add-ons ### connectd - find isolated builders with aligned values. auto-discovers humans on github, mastodon, lemmy, discord, and more. -[![Open your Home Assistant instance and show the add add-on repository dialog with a specific repository URL pre-filled.](https://my.home-assistant.io/badges/supervisor_add_addon_repository.svg)](https://my.home-assistant.io/redirect/supervisor_add_addon_repository/?repository_url=https%3A%2F%2Fgithub.com%2Fsudoxnym%2Fha-addons) +### ankerctl +control and monitor ankermake 3d printers via ankerctl. diff --git a/ankerctl/Dockerfile b/ankerctl/Dockerfile new file mode 100644 index 0000000..269d6dd --- /dev/null +++ b/ankerctl/Dockerfile @@ -0,0 +1,61 @@ +################# +# 1 Build Image # +################# +ARG BUILD_FROM +ARG BUILD_VERSION +FROM $BUILD_FROM + +################## +# 2 Modify Image # +################## + +ARG CONFIG_PATH='/data/options.json' + +# Add run.sh +COPY data/run.sh / + +# Set S6 wait time +ENV S6_CMD_WAIT_FOR_SERVICES=1 \ + S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \ + S6_SERVICES_GRACETIME=0 +# FLASK_HOSTE=$(jq --raw-output '.flask_host // empty' $CONFIG_PATH) + +RUN ln -s /root/.config /config + +RUN apt-get update && apt-get install -y jq && rm -rf /var/lib/apt/lists/* + +################ +# 3 Entrypoint # +################ + +ENTRYPOINT ["sh"] +CMD ["/run.sh"] + +############ +# 4 Labels # +############ +ARG BUILD_ARCH +ARG BUILD_DATE +ARG BUILD_DESCRIPTION +ARG BUILD_NAME +ARG BUILD_REF +ARG BUILD_REPOSITORY +ARG BUILD_VERSION +LABEL \ + io.hass.name="${BUILD_NAME}" \ + io.hass.description="${BUILD_DESCRIPTION}" \ + io.hass.arch="${BUILD_ARCH}" \ + io.hass.type="addon" \ + io.hass.version=${BUILD_VERSION} \ + maintainer="ankermgmt (https://github.com/ankermgmt)" \ + org.opencontainers.image.title="${BUILD_NAME}" \ + org.opencontainers.image.description="${BUILD_DESCRIPTION}" \ + org.opencontainers.image.vendor="Home Assistant Add-ons" \ + org.opencontainers.image.authors="kvanzuijlen (https://github.com/kvanzuijlen)" \ + org.opencontainers.image.licenses="MIT" \ + org.opencontainers.image.url="https://github.com/ankermgmt" \ + org.opencontainers.image.source="https://github.com/${BUILD_REPOSITORY}" \ + org.opencontainers.image.documentation="https://github.com/${BUILD_REPOSITORY}/blob/main/README.md" \ + org.opencontainers.image.created=${BUILD_DATE} \ + org.opencontainers.image.revision=${BUILD_REF} \ + org.opencontainers.image.version=${BUILD_VERSION} diff --git a/ankerctl/README.md b/ankerctl/README.md new file mode 100644 index 0000000..1cf8000 --- /dev/null +++ b/ankerctl/README.md @@ -0,0 +1,26 @@ +> **NOTE** +> The ankerctl addon should be considered a work in progress! + +# Home assistant add-on: ankerctl +![Arch](https://img.shields.io/badge/dynamic/yaml?color=success&label=Arch&query=%24.arch&url=https%3A%2F%2Fraw.githubusercontent.com%2Fankermgmt%2Fankermgmt-hassio-addons%2Fmaster%2Fankerctl%2Fconfig.yaml) + +## About +[ankerctl](https://github.com/Ankermgmt/ankermake-m5-protocol) provides a web UI for monitoring your AnkerMake 3D printer. +This addon is based on the docker image provided in https://github.com/Ankermgmt/ankermake-m5-protocol + +## Installation +The installation of this add-on is pretty straightforward and not different in comparison to installing any other add-on. + +1. Add this add-ons repository to your Home Assistant instance + + [![Open your Home Assistant instance and show the add add-on repository dialog with a specific repository URL pre-filled.](https://my.home-assistant.io/badges/supervisor_add_addon_repository.svg)](https://my.home-assistant.io/redirect/supervisor_add_addon_repository/?repository_url=https%3A%2F%2Fgithub.com%2Fankermgmt%2Fankermgmt-hassio-addons) +2. Install this add-on. +3. Start the add-on. +4. Check the logs of the add-on to see if everything went well. +5. Open the web UI and upload your login.json (see the web UI or [ankerctl](https://github.com/Ankermgmt/ankermake-m5-protocol) for more information.) + +## Configuration +Web UI can be found at (default port is 4470). + +## Support +Create an issue on GitHub diff --git a/ankerctl/build.yaml b/ankerctl/build.yaml new file mode 100644 index 0000000..080a10a --- /dev/null +++ b/ankerctl/build.yaml @@ -0,0 +1,10 @@ +build_from: + aarch64: "ghcr.io/sudoxnym/ankermake-m5-protocol:exiles" + amd64: "ghcr.io/sudoxnym/ankermake-m5-protocol:exiles" + armv7: "ghcr.io/sudoxnym/ankermake-m5-protocol:exiles" + +labels: + org.opencontainers.image.title: "Home Assistant Add-on: ankerctl" + org.opencontainers.image.description: "An add-on to control Anker devices via Home Assistant" + org.opencontainers.image.source: "https://github.com/sudoxnym/exiles-ankerctl-hassio-addons" + org.opencontainers.image.licenses: "GPLv3" diff --git a/ankerctl/config.yaml b/ankerctl/config.yaml new file mode 100644 index 0000000..22b1faf --- /dev/null +++ b/ankerctl/config.yaml @@ -0,0 +1,23 @@ +name: "exiles-ankerctl" +description: "exiles-ankerctl addon with login" +version: "1.0.0-1" +slug: "exiles-ankerctl" +ingress: false # Doesn't work yet, might need some source code changes +ingress_port: 4470 +ingress_stream: false +init: false +host_network: true +map: + - config:rw +options: + flask_host: "127.0.0.1" +schema: + flask_host: str +arch: + - aarch64 + - amd64 + - armv7 +ports: + 4470/tcp: 4470 +ports_description: + 4470/tcp: "The webinterface for ankerctl" diff --git a/ankerctl/data/run.sh b/ankerctl/data/run.sh new file mode 100644 index 0000000..e16f5e5 --- /dev/null +++ b/ankerctl/data/run.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +CONFIG_PATH=/data/options.json + +export FLASK_HOST="$(jq --raw-output '.flask_host // empty' $CONFIG_PATH)" + +exec /app/ankerctl.py webserver run "${@}" diff --git a/ankerctl/icon.png b/ankerctl/icon.png new file mode 100644 index 0000000..ea05e5c Binary files /dev/null and b/ankerctl/icon.png differ diff --git a/ankerctl/logo.png b/ankerctl/logo.png new file mode 100644 index 0000000..ea05e5c Binary files /dev/null and b/ankerctl/logo.png differ diff --git a/ankerctl/translations/en.yaml b/ankerctl/translations/en.yaml new file mode 100644 index 0000000..53548e6 --- /dev/null +++ b/ankerctl/translations/en.yaml @@ -0,0 +1,6 @@ +configuration: + flask_host: + name: "flask bind address" + description: "The address flask should bind to. NOTE: binding to 0.0.0.0 means everyone on your network can control your printer!" +network: + 4470/TCP: The webserver port (Not used for Ingress)