diff --git a/homematic/CHANGELOG.md b/homematic/CHANGELOG.md index 8aa83b9..aa9d343 100644 --- a/homematic/CHANGELOG.md +++ b/homematic/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 11.0.5 + +- Skip HmIP firmware update for udev path +- Persist certificate + ## 11.0.4 - Fix template for hmip diff --git a/homematic/config.json b/homematic/config.json index 8a1942b..a67006f 100644 --- a/homematic/config.json +++ b/homematic/config.json @@ -1,6 +1,6 @@ { "name": "HomeMatic CCU", - "version": "11.0.4", + "version": "11.0.5", "slug": "homematic", "description": "HomeMatic central based on OCCU", "url": "https://github.com/home-assistant/hassio-addons/tree/master/homematic", diff --git a/homematic/rootfs/etc/cont-init.d/certs.sh b/homematic/rootfs/etc/cont-init.d/certs.sh index 2f153f3..a3ef2d5 100644 --- a/homematic/rootfs/etc/cont-init.d/certs.sh +++ b/homematic/rootfs/etc/cont-init.d/certs.sh @@ -2,4 +2,10 @@ # ============================================================================== # Configure NGINX for use with ReGaHss # ============================================================================== -openssl req -new -x509 -nodes -keyout /etc/config/server.pem -out /etc/config/server.pem -days 3650 -subj "/C=DE/O=HomeMatic/OU=Hass.io/CN=$(hostname)" + +if [ -f /data/server.pem ]; then + cp -f /data/server.pem /etc/config/server.pem +else + openssl req -new -x509 -nodes -keyout /etc/config/server.pem -out /etc/config/server.pem -days 3650 -subj "/C=DE/O=HomeMatic/OU=HomeAssistant/CN=$(hostname)" + cp -f /etc/config/server.pem /data/server.pem +fi diff --git a/homematic/rootfs/etc/cont-init.d/hm_ip.sh b/homematic/rootfs/etc/cont-init.d/hm_ip.sh index 86e3b9b..8d5ac14 100755 --- a/homematic/rootfs/etc/cont-init.d/hm_ip.sh +++ b/homematic/rootfs/etc/cont-init.d/hm_ip.sh @@ -28,9 +28,15 @@ fi # Update Firmware for hmip_index in $(bashio::config 'hmip|keys'); do hmip_device=$(bashio::config "hmip[${hmip_index}].device") + + # Skeep device path with id + if echo "${hmip_device}" | grep "by-id"; then + bashio::log.warning "Skip firmware for ${hmip_device}" + continue + fi + version_from="$(java -Xmx64m -jar /opt/HmIP/hmip-copro-update.jar -p "${hmip_device}" -v | grep "Application version =" | cut -d' ' -f5)" version_to="$(ls /firmware/HmIP-RFUSB/hmip_coprocessor_update-*.eq3 | sed 's/.*hmip_coprocessor_update-\(.*\)\.eq3/\1/' | tail -n1)" - if [ "${version_from}" != "${version_to}" ]; then if java -Xmx64m -jar /opt/HmIP/hmip-copro-update.jar -p "${hmip_device}" -f "/firmware/HmIP-RFUSB/hmip_coprocessor_update-${version_to}.eq3"; then bashio::log.info "HmIP update to ${version_to} was successful"