Fix interface

This commit is contained in:
Pascal Vizeli
2019-12-11 17:52:17 +01:00
parent 18a36c920f
commit 03bd01a43d
2 changed files with 8 additions and 8 deletions

View File

@@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bashio
# shellcheck disable=SC2012 # shellcheck disable=SC2012
@@ -11,9 +11,9 @@ function firmware_update_hmip() {
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 if [ "${FROM_VERSION}" != "${TO_VERSION}" ]; then
if java -Xmx64m -jar /opt/HmIP/hmip-copro-update.jar -p "${DEVICE}" -f "/firmware/HmIP-RFUSB/hmip_coprocessor_update-${TO_VERSION}.eq3"; then 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 successful" bashio::log.info "HmIP update to ${TO_VERSION} was successful"
else else
echo "[ERROR] HmIP update ${TO_VERSION} fails!" bashio::log.error "HmIP update ${TO_VERSION} fails!"
fi fi
fi fi
} }
@@ -21,17 +21,17 @@ function firmware_update_hmip() {
function firmware_update_rfd() { function firmware_update_rfd() {
if "${HM_HOME}/bin/eq3configcmd" update-coprocessor -lgw -u -rfdconf /etc/config/rfd.conf -l 1; then if "${HM_HOME}/bin/eq3configcmd" update-coprocessor -lgw -u -rfdconf /etc/config/rfd.conf -l 1; then
echo "[INFO] RFd update was successful" bashio::log.info "RFd update was successful"
else else
echo "[ERROR] RFd update fails!" bashio::log.error "RFd update fails!"
fi fi
} }
function firmware_update_wired() { function firmware_update_wired() {
if "${HM_HOME}/bin/eq3configcmd" update-lgw-firmware -m /firmware/fwmap -c /etc/config/hs485d.conf -l 1; then if "${HM_HOME}/bin/eq3configcmd" update-lgw-firmware -m /firmware/fwmap -c /etc/config/hs485d.conf -l 1; then
echo "[INFO] Wired update was successful" bashio::log.info "Wired update was successful"
else else
echo "[ERROR] Wired update fails!" bashio::log.error "Wired update fails!"
fi fi
} }

View File

@@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bashio
function enable_interface(){ function enable_interface(){