mirror of
https://github.com/aljazceru/addons.git
synced 2026-02-07 14:14:23 +01:00
HomeMatic: persist certs + ignore udev path (#1737)
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
# Changelog
|
||||
|
||||
## 11.0.5
|
||||
|
||||
- Skip HmIP firmware update for udev path
|
||||
- Persist certificate
|
||||
|
||||
## 11.0.4
|
||||
|
||||
- Fix template for hmip
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user