diff --git a/homematic/data/hm-firmware.sh b/homematic/data/hm-firmware.sh index dfb1a87..c664ad1 100755 --- a/homematic/data/hm-firmware.sh +++ b/homematic/data/hm-firmware.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bashio # 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)" 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 - echo "[INFO] HmIP update to ${TO_VERSION} was successful" + bashio::log.info "HmIP update to ${TO_VERSION} was successful" else - echo "[ERROR] HmIP update ${TO_VERSION} fails!" + bashio::log.error "HmIP update ${TO_VERSION} fails!" fi fi } @@ -21,17 +21,17 @@ function firmware_update_hmip() { function firmware_update_rfd() { 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 - echo "[ERROR] RFd update fails!" + bashio::log.error "RFd update fails!" fi } function firmware_update_wired() { 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 - echo "[ERROR] Wired update fails!" + bashio::log.error "Wired update fails!" fi } diff --git a/homematic/data/hm-interface.sh b/homematic/data/hm-interface.sh index 78fd156..687d702 100755 --- a/homematic/data/hm-interface.sh +++ b/homematic/data/hm-interface.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bashio function enable_interface(){