-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
192 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.github/* @minims |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
github: minims | ||
custom: https://www.buymeacoffee.com/minims |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"rebaseWhen": "behind-base-branch", | ||
"dependencyDashboard": true, | ||
"labels": [ | ||
"dependencies", | ||
"no-stale" | ||
], | ||
"commitMessagePrefix": "⬆️", | ||
"commitMessageTopic": "{{depName}}", | ||
"regexManagers": [ | ||
{ | ||
"fileMatch": [ | ||
"/Dockerfile$", | ||
"/build.yaml$" | ||
], | ||
"matchStringsStrategy": "any", | ||
"matchStrings": [ | ||
"ARG BUILD_FROM=(?<depName>.*?):(?<currentValue>.*?)\\s+", | ||
"(aarch64|amd64|armv7):\\s[\"']?(?<depName>.*?):(?<currentValue>.*?)[\"']?\\s" | ||
], | ||
"datasourceTemplate": "docker" | ||
}, | ||
{ | ||
"fileMatch": [ | ||
"/Dockerfile$" | ||
], | ||
"matchStringsStrategy": "any", | ||
"matchStrings": [ | ||
"\\s\\s(?<package>[a-z0-9-]+)=(?<currentValue>[a-z0-9-_.]+)\\s+" | ||
], | ||
"versioningTemplate": "loose", | ||
"datasourceTemplate": "repology", | ||
"depNameTemplate": "alpine_3_21/{{package}}" | ||
} | ||
], | ||
"packageRules": [ | ||
{ | ||
"matchDatasources": [ | ||
"repology" | ||
], | ||
"automerge": true | ||
}, | ||
{ | ||
"groupName": "Add-on base image", | ||
"matchDatasources": [ | ||
"docker" | ||
] | ||
}, | ||
{ | ||
"groupName": "Add-on base image", | ||
"matchDatasources": [ | ||
"docker" | ||
], | ||
"matchUpdateTypes": [ | ||
"minor", | ||
"patch" | ||
], | ||
"automerge": true | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
--- | ||
configuration: | ||
message: | ||
name: Message | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
--- | ||
configuration: | ||
message: | ||
name: Message | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,40 @@ | ||
# https://developers.home-assistant.io/docs/add-ons/configuration#add-on-dockerfile | ||
ARG BUILD_FROM | ||
FROM $BUILD_FROM | ||
FROM ${BUILD_FROM}:dev | ||
ENV LANG C.UTF-8 | ||
|
||
# Install required packages | ||
RUN apk add --no-cache py3-pip py3-opencv ffmpeg | ||
RUN pip3 install --no-cache-dir python-json2yaml==0.1.1 | ||
# Copy root filesystem | ||
COPY rootfs / | ||
|
||
# Setup base | ||
RUN apk add --no-cache \ | ||
build-base \ | ||
ffmpeg \ | ||
ffmpeg-dev \ | ||
libjxl \ | ||
libjxl-tools \ | ||
libsrtp \ | ||
libsrtp-dev \ | ||
libvpx \ | ||
libvpx-dev \ | ||
openssl \ | ||
openssl-dev \ | ||
opus \ | ||
opus-dev \ | ||
py3-opencv \ | ||
py3-pip \ | ||
python3 \ | ||
python3-dev \ | ||
yq | ||
|
||
# Install python3 requirements | ||
# RUN pip3 install --no-cache-dir python-json2yaml==0.1.1 | ||
|
||
# Download source and untar | ||
WORKDIR /usr/bin | ||
ADD "https://github.com/Minims/SomfyProtect2MQTT/archive/refs/heads/dev.tar.gz" dev.tar.gz | ||
RUN tar -xvf dev.tar.gz | ||
RUN mv /usr/bin/SomfyProtect2MQTT-dev /usr/bin/SomfyProtect2MQTT | ||
COPY "https://github.com/Minims/SomfyProtect2MQTT/archive/refs/heads/dev.tar.gz" dev.tar.gz | ||
RUN tar -xvf dev.tar.gz && mv /usr/bin/SomfyProtect2MQTT-dev /usr/bin/SomfyProtect2MQTT | ||
|
||
# Install python3 requirements | ||
WORKDIR /usr/bin/SomfyProtect2MQTT/somfyProtect2Mqtt | ||
RUN pip3 install --no-cache-dir -r requirements/addon.txt | ||
|
||
# Copy root filesystem | ||
ADD rootfs / |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
--- | ||
# https://developers.home-assistant.io/docs/add-ons/configuration#add-on-dockerfile | ||
build_from: | ||
aarch64: ghcr.io/hassio-addons/base:15.0.5 | ||
amd64: ghcr.io/hassio-addons/base:15.0.5 | ||
armhf: ghcr.io/hassio-addons/base:15.0.5 | ||
armv7: ghcr.io/hassio-addons/base:15.0.5 | ||
i386: ghcr.io/hassio-addons/base:15.0.5 | ||
aarch64: ghcr.io/hassio-addons/base:17.1.0 | ||
amd64: ghcr.io/hassio-addons/base:17.1.0 | ||
armhf: ghcr.io/hassio-addons/base:17.1.0 | ||
armv7: ghcr.io/hassio-addons/base:17.1.0 | ||
i386: ghcr.io/hassio-addons/base:17.1.0 | ||
labels: | ||
org.opencontainers.image.title: "Home Assistant Add-on: Minims add-on" | ||
org.opencontainers.image.description: "Minims add-on to use as a blueprint for new add-ons." | ||
org.opencontainers.image.source: "https://github.com/Minims/homeassistant-addons" | ||
org.opencontainers.image.licenses: "Apache License 2.0" | ||
args: | ||
VERSION: "2024.9.0" | ||
VERSION: "2025.2.0a" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
SomfyProtect2MQTT-dev/rootfs/etc/s6-overlay/s6-rc.d/SomfyProtect2MQTT/finish
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/command/with-contenv bashio | ||
# shellcheck shell=bash | ||
# ============================================================================== | ||
# Home Assistant SomfyProtect2MQTT Add-on for Home Assistant | ||
# ============================================================================== | ||
declare exit_code | ||
readonly exit_code_container=$(</run/s6-linux-init-container-results/exitcode) | ||
readonly exit_code_service="${1}" | ||
readonly exit_code_signal="${2}" | ||
readonly service="somfyProtect2Mqtt" | ||
|
||
bashio::log.info \ | ||
"Service ${service} exited with code ${exit_code_service}" \ | ||
"(by signal ${exit_code_signal})" | ||
|
||
# Received a signal | ||
if [[ "${exit_code_service}" -eq 256 ]]; then | ||
|
||
# The signal might be a result of another service crashing. Only | ||
# overwrite the container exit code if it is not already set. | ||
if [[ "${exit_code_container}" -eq 0 ]]; then | ||
echo $((128 + $exit_code_signal)) > /run/s6-linux-init-container-results/exitcode | ||
fi | ||
|
||
# If the signal is SIGTERM, we should halt the container and take down | ||
# the whole process tree. | ||
[[ "${exit_code_signal}" -eq 15 ]] && exec /run/s6/basedir/bin/halt | ||
|
||
# The service exited with a non-zero exit code, which means it crashed. | ||
elif [[ "${exit_code_service}" -ne 0 ]]; then | ||
|
||
# The service might be a result of another service crashing. Only | ||
# overwrite the container exit code if it is not already set. | ||
if [[ "${exit_code_container}" -eq 0 ]]; then | ||
echo "${exit_code_service}" > /run/s6-linux-init-container-results/exitcode | ||
fi | ||
|
||
# We should halt the container and take down the whole process tree. | ||
exec /run/s6/basedir/bin/halt | ||
|
||
# The service exited with a zero exit code, which means it exited, let | ||
# S6 supervision restart it. | ||
else | ||
bashio::log.info "Service ${service} restarting..." | ||
fi |
13 changes: 5 additions & 8 deletions
13
...otfs/etc/services.d/SomfyProtect2MQTT/run → .../s6-overlay/s6-rc.d/SomfyProtect2MQTT/run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
SomfyProtect2MQTT-dev/rootfs/etc/s6-overlay/s6-rc.d/SomfyProtect2MQTT/type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
longrun |
Empty file.
12 changes: 0 additions & 12 deletions
12
SomfyProtect2MQTT-dev/rootfs/etc/services.d/SomfyProtect2MQTT/finish
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
--- | ||
configuration: | ||
message: | ||
name: Message | ||
description: The message that will be printed to the log when starting this example add-on. | ||
description: The message that will be printed to the log when starting this add-on. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.