diff --git a/homematic/CHANGELOG.md b/homematic/CHANGELOG.md index fe2b52e..fc09523 100644 --- a/homematic/CHANGELOG.md +++ b/homematic/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 8.1 +- Update OCCU to 3.43.15 +- Migrate to new arch layering +- Better handling for errors with Firmware updates + ## 8.0 - Update OCCU to 3.41.11 - Fix write error when starting OCCU / HmIP diff --git a/homematic/Dockerfile b/homematic/Dockerfile index 1ee176e..fb067ac 100644 --- a/homematic/Dockerfile +++ b/homematic/Dockerfile @@ -24,7 +24,7 @@ RUN curl -SL https://github.com/eq-3/occu/archive/${OCCU_VERSION}.tar.gz | tar x && mkdir -p /boot \ && echo "VERSION=${OCCU_VERSION}" > /boot/VERSION \ && ln -s /opt/hm/etc/config /etc/config \ - && if [ "${BUILD_ARCH}" = "armhf" ]; \ + && if [ "${BUILD_ARCH}" = "armv7" ]; \ then \ cd arm-gnueabihf; \ else \ diff --git a/homematic/build.json b/homematic/build.json index 7e34ed5..6d62f09 100644 --- a/homematic/build.json +++ b/homematic/build.json @@ -1,10 +1,9 @@ { "build_from": { - "armhf": "homeassistant/armhf-base-ubuntu:18.04", - "amd64": "homeassistant/i386-base-ubuntu:18.04", + "armv7": "homeassistant/armv7-base-ubuntu:18.04", "i386": "homeassistant/i386-base-ubuntu:18.04" }, "args": { - "OCCU_VERSION": "3.41.11" + "OCCU_VERSION": "3.43.15" } } diff --git a/homematic/config.json b/homematic/config.json index b6a66fb..6869346 100644 --- a/homematic/config.json +++ b/homematic/config.json @@ -4,7 +4,7 @@ "slug": "homematic", "description": "HomeMatic central based on OCCU", "url": "https://home-assistant.io/addons/homematic/", - "arch": ["armhf", "i386", "amd64"], + "arch": ["armv7", "i386"], "map": ["share:rw"], "startup": "system", "boot": "auto", @@ -65,5 +65,5 @@ } ] }, - "image": "homeassistant/{arch}-addon-homeassistant" + "image": "homeassistant/{arch}-addon-homematic" } diff --git a/homematic/hm-firmware.sh b/homematic/hm-firmware.sh index aa839d7..341536d 100644 --- a/homematic/hm-firmware.sh +++ b/homematic/hm-firmware.sh @@ -8,18 +8,30 @@ function firmware_update_hmip() { local TO_VERSION= FROM_VERSION="$(java -Xmx64m -jar /opt/HmIP/hmip-copro-update.jar -p "${DEVICE}" -v | grep "Application version =" | cut -d' ' -f5)" - TO_VERSION="$(ls /firmware/HmIP-RFUSB/hmip_coprocessor_update-*.eq3 | sed 's/.*hmip_coprocessor_update-\(.*\)\.eq3/\1/' | tail -n1)" + TO_VERSION="$(ls /firmware/HmIP-RFUSB/hmip_coprocessor_update-*.eq3 | sed 's/.*hmip_coprocessor_update-\(.*\)\.eq3/\1/' | tail -n1)" if [ "${FROM_VERSION}" != "${TO_VERSION}" ]; then - java -Xmx64m -jar /opt/HmIP/hmip-copro-update.jar -p "${DEVICE}" -f "/firmware/HmIP-RFUSB/hmip_coprocessor_update-${TO_VERSION}.eq3" + if java -Xmx64m -jar /opt/HmIP/hmip-copro-update.jar -p "${DEVICE}" -f "/firmware/HmIP-RFUSB/hmip_coprocessor_update-${TO_VERSION}.eq3"; then + echo "[INFO] HmIP update to ${TO_VERSION} was successfuly" + else + echo "[ERROR] HmIP update ${TO_VERSION} fails!" + fi fi } function firmware_update_rfd() { - "${HM_HOME}/bin/eq3configcmd" update-coprocessor -lgw -u -rfdconf /etc/config/rfd.conf -l 1 + if "${HM_HOME}/bin/eq3configcmd" update-coprocessor -lgw -u -rfdconf /etc/config/rfd.conf -l 1; then + echo "[INFO] RFd update was successfuly" + else + echo "[ERROR] RFd update fails!" + fi } function firmware_update_wired() { - "${HM_HOME}/bin/eq3configcmd" update-lgw-firmware -m /firmware/fwmap -c /etc/config/hs485d.conf -l 1 + if "${HM_HOME}/bin/eq3configcmd" update-lgw-firmware -m /firmware/fwmap -c /etc/config/hs485d.conf -l 1; then + echo "[INFO] Wired update was successfuly" + else + echo "[ERROR] Wired update fails!" + fi }