mirror of
https://github.com/aljazceru/addons.git
synced 2025-12-18 21:54:20 +01:00
@@ -1,5 +1,12 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 10.0
|
||||||
|
|
||||||
|
- Add Ingress support
|
||||||
|
- Disable external ports per default
|
||||||
|
- Fix wrong version number
|
||||||
|
- Speedup start without sleeps
|
||||||
|
|
||||||
## 9.9
|
## 9.9
|
||||||
|
|
||||||
- Update glibc for armv7
|
- Update glibc for armv7
|
||||||
|
|||||||
@@ -9,10 +9,12 @@ RUN apt-get update \
|
|||||||
&& apt-get install -y --no-install-recommends \
|
&& apt-get install -y --no-install-recommends \
|
||||||
libusb-1.0 \
|
libusb-1.0 \
|
||||||
lighttpd \
|
lighttpd \
|
||||||
|
nginx \
|
||||||
openjdk-11-jre-headless \
|
openjdk-11-jre-headless \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
ARG OCCU_VERSION
|
ARG OCCU_VERSION
|
||||||
|
ARG CCU_VERSION
|
||||||
ARG BUILD_ARCH
|
ARG BUILD_ARCH
|
||||||
|
|
||||||
# Install OCCU
|
# Install OCCU
|
||||||
@@ -27,7 +29,7 @@ RUN curl -SL https://github.com/jens-maus/occu/archive/${OCCU_VERSION}.tar.gz |
|
|||||||
/opt/HMServer \
|
/opt/HMServer \
|
||||||
/var/status \
|
/var/status \
|
||||||
\
|
\
|
||||||
&& echo "VERSION=${OCCU_VERSION}" > /boot/VERSION \
|
&& echo "VERSION=${CCU_VERSION}" > /boot/VERSION \
|
||||||
&& cp /boot/VERSION /VERSION \
|
&& cp /boot/VERSION /VERSION \
|
||||||
&& ln -s /opt/hm/etc/config /etc/config \
|
&& ln -s /opt/hm/etc/config /etc/config \
|
||||||
\
|
\
|
||||||
@@ -62,7 +64,7 @@ RUN curl -SL https://github.com/jens-maus/occu/archive/${OCCU_VERSION}.tar.gz |
|
|||||||
&& cp -R HMserver/opt/HMServer/measurement /opt/HMServer/ \
|
&& cp -R HMserver/opt/HMServer/measurement /opt/HMServer/ \
|
||||||
&& cp -R HMserver/opt/HMServer/pages /opt/HMServer/ \
|
&& cp -R HMserver/opt/HMServer/pages /opt/HMServer/ \
|
||||||
\
|
\
|
||||||
&& sed -i "s/WEBUI_VERSION = \".*\"/WEBUI_VERSION = \"${OCCU_VERSION}\"/" WebUI/www/rega/pages/index.htm \
|
&& sed -i "s/WEBUI_VERSION = \".*\"/WEBUI_VERSION = \"${CCU_VERSION}\"/" WebUI/www/rega/pages/index.htm \
|
||||||
&& cp -R WebUI/* / \
|
&& cp -R WebUI/* / \
|
||||||
&& ln -s /www /opt/hm/www \
|
&& ln -s /www /opt/hm/www \
|
||||||
\
|
\
|
||||||
@@ -76,6 +78,7 @@ ENV HM_HOME=/opt/hm LD_LIBRARY_PATH=/opt/hm/lib:${LD_LIBRARY_PATH}
|
|||||||
|
|
||||||
# Update config files
|
# Update config files
|
||||||
COPY data/config/* /opt/hm/etc/config/
|
COPY data/config/* /opt/hm/etc/config/
|
||||||
|
COPY data/nginx.conf /etc/nginx/nginx.conf
|
||||||
|
|
||||||
# Setup start script
|
# Setup start script
|
||||||
COPY data/run.sh /
|
COPY data/run.sh /
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"i386": "homeassistant/i386-base-debian:bullseye"
|
"i386": "homeassistant/i386-base-debian:bullseye"
|
||||||
},
|
},
|
||||||
"args": {
|
"args": {
|
||||||
"OCCU_VERSION": "3.51.6-1"
|
"OCCU_VERSION": "3.51.6-1",
|
||||||
|
"CCU_VERSION": "3.51.6"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "HomeMatic CCU",
|
"name": "HomeMatic CCU",
|
||||||
"version": "9.9",
|
"version": "10.0",
|
||||||
"slug": "homematic",
|
"slug": "homematic",
|
||||||
"description": "HomeMatic central based on OCCU",
|
"description": "HomeMatic central based on OCCU",
|
||||||
"url": "https://github.com/home-assistant/hassio-addons/tree/master/homematic",
|
"url": "https://github.com/home-assistant/hassio-addons/tree/master/homematic",
|
||||||
@@ -11,18 +11,20 @@
|
|||||||
"auto_uart": true,
|
"auto_uart": true,
|
||||||
"gpio": true,
|
"gpio": true,
|
||||||
"apparmor": false,
|
"apparmor": false,
|
||||||
"webui": "http://[HOST]:[PORT:80]/",
|
"ingress": true,
|
||||||
|
"panel_title": "HomeMatic",
|
||||||
|
"panel_icon": "mdi:router-wireless",
|
||||||
"ports": {
|
"ports": {
|
||||||
"80/tcp": null,
|
"80/tcp": null,
|
||||||
"2001/tcp": 2001,
|
"2001/tcp": null,
|
||||||
"2000/tcp": 2000,
|
"2000/tcp": null,
|
||||||
"2010/tcp": 2010
|
"2010/tcp": null
|
||||||
},
|
},
|
||||||
"ports_description": {
|
"ports_description": {
|
||||||
"80/tcp": "ReGaHss Webinterface",
|
"80/tcp": "ReGaHss Webinterface (Not required for Ingress)",
|
||||||
"2001/tcp": "Homematic xmlrpc",
|
"2001/tcp": "Homematic xmlrpc (Extern)",
|
||||||
"2000/tcp": "HomematicWire xmlrpc",
|
"2000/tcp": "HomematicWire xmlrpc (Extern)",
|
||||||
"2010/tcp": "HomematicIP xmlrpc"
|
"2010/tcp": "HomematicIP xmlrpc (Extern)"
|
||||||
},
|
},
|
||||||
"options": {
|
"options": {
|
||||||
"rf_enable": false,
|
"rf_enable": false,
|
||||||
|
|||||||
73
homematic/data/nginx.conf
Normal file
73
homematic/data/nginx.conf
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
worker_processes 1;
|
||||||
|
pid /var/run/nginx.pid;
|
||||||
|
error_log /dev/stdout info;
|
||||||
|
daemon off;
|
||||||
|
|
||||||
|
events {
|
||||||
|
worker_connections 1024;
|
||||||
|
}
|
||||||
|
|
||||||
|
http {
|
||||||
|
include mime.types;
|
||||||
|
default_type application/octet-stream;
|
||||||
|
sendfile on;
|
||||||
|
keepalive_timeout 65;
|
||||||
|
proxy_read_timeout 1200;
|
||||||
|
gzip on;
|
||||||
|
gzip_disable "msie6";
|
||||||
|
|
||||||
|
map $http_upgrade $connection_upgrade {
|
||||||
|
default upgrade;
|
||||||
|
'' close;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Ingress
|
||||||
|
server {
|
||||||
|
listen 8099 default_server;
|
||||||
|
|
||||||
|
allow 172.30.32.2;
|
||||||
|
deny all;
|
||||||
|
|
||||||
|
server_name _;
|
||||||
|
access_log /dev/stdout combined;
|
||||||
|
|
||||||
|
client_max_body_size 4G;
|
||||||
|
keepalive_timeout 5;
|
||||||
|
|
||||||
|
root /dev/null;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_pass http://127.0.0.1:80;
|
||||||
|
proxy_redirect ~^/(.+)$ $scheme://$http_host%%INGRESS_ENTRY%%/$1;
|
||||||
|
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection $connection_upgrade;
|
||||||
|
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
proxy_set_header Host $http_host;
|
||||||
|
proxy_set_header X-NginX-Proxy true;
|
||||||
|
|
||||||
|
sub_filter_once off;
|
||||||
|
sub_filter_types *;
|
||||||
|
|
||||||
|
# Hack for reset paths back
|
||||||
|
sub_filter '/etc/config/' '/etc/config/';
|
||||||
|
|
||||||
|
# Make URLs relative
|
||||||
|
sub_filter '/webui/' '%%INGRESS_ENTRY%%/webui/';
|
||||||
|
sub_filter '/ise/' '%%INGRESS_ENTRY%%/ise/';
|
||||||
|
sub_filter '/pda/' '%%INGRESS_ENTRY%%/pda/';
|
||||||
|
sub_filter '/config/' '%%INGRESS_ENTRY%%/config/';
|
||||||
|
sub_filter '/api/' '%%INGRESS_ENTRY%%/api/';
|
||||||
|
sub_filter '/pages/' '%%INGRESS_ENTRY%%/pages/';
|
||||||
|
sub_filter '/jpages/' '%%INGRESS_ENTRY%%/jpages/';
|
||||||
|
sub_filter '/esp/' '%%INGRESS_ENTRY%%/esp/';
|
||||||
|
|
||||||
|
# Protect iframe breakouts
|
||||||
|
sub_filter 'top.window.location.href' 'location.href';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -140,7 +140,7 @@ function stop_homematic() {
|
|||||||
trap "stop_homematic" SIGTERM SIGHUP
|
trap "stop_homematic" SIGTERM SIGHUP
|
||||||
|
|
||||||
# Wait until interfaces are initialized
|
# Wait until interfaces are initialized
|
||||||
sleep 30
|
bashio::net.wait_for 9292
|
||||||
|
|
||||||
# Start Regahss
|
# Start Regahss
|
||||||
"$HM_HOME/bin/ReGaHss" -c -f /etc/config/rega.conf &
|
"$HM_HOME/bin/ReGaHss" -c -f /etc/config/rega.conf &
|
||||||
@@ -151,6 +151,13 @@ openssl req -new -x509 -nodes -keyout /etc/config/server.pem -out /etc/config/se
|
|||||||
lighttpd-angel -D -f /opt/hm/etc/lighttpd/lighttpd.conf &
|
lighttpd-angel -D -f /opt/hm/etc/lighttpd/lighttpd.conf &
|
||||||
WAIT_PIDS+=($!)
|
WAIT_PIDS+=($!)
|
||||||
|
|
||||||
|
# Start Ingress
|
||||||
|
bashio::log.info "Starting Nginx..."
|
||||||
|
ingress_entry=$(bashio::addon.ingress_entry)
|
||||||
|
sed -i "s#%%INGRESS_ENTRY%%#${ingress_entry}#g" /etc/nginx/nginx.conf
|
||||||
|
nginx &
|
||||||
|
WAIT_PIDS+=($!)
|
||||||
|
|
||||||
# Sync time periodically
|
# Sync time periodically
|
||||||
if bashio::config.true 'rf_enable'; then
|
if bashio::config.true 'rf_enable'; then
|
||||||
while true
|
while true
|
||||||
|
|||||||
Reference in New Issue
Block a user