diff --git a/ism7mqtt/CHANGELOG.md b/ism7mqtt/CHANGELOG.md index 1bfee84..456103d 100644 --- a/ism7mqtt/CHANGELOG.md +++ b/ism7mqtt/CHANGELOG.md @@ -1,10 +1,23 @@ -Bump ism7mqtt to v0.0.12 -## What's Changed +# STOP! BREAKING CHANGES! READ CAREFULLY! +## What's Changed +- Bump ism7mqtt to v0.0.13 - added German translation for add-on configuration - fix output of BinaryReadOnlyConverterTemplate, MicerStateConverterTemplate and corresponding ha discovery topics by @zivillian in #60 +- Ism7MQTT now auto-generates parameters.json and stores it in your /config directory + +## Breaking Changes -## Breaking Change -- Boolean parameters are no longer as true/false but instead as 0/1 and the corresponding text value -- Mixer state value is no longer reported as -/closed/opened, but as 0/1/2 and the corresponding text value +- Parameters.json file format has changed and will now be generated automatically on first startup: + If you have removed certain parameters from your json file, you will have to redo this. After first start of the new version, you will find the file "ism7-parameters-.json" in your /config directory. + Re-apply your changes there, then restart the add-on +- Entity IDs have changed. If you only start the new version, all your entities will be duplicated (old/new ID). + Follow these steps to properly update: + - Stop the old version of the Add-on + - Download the program MQTTExplorer, start it, and connect to your MQTT broker + - Search for your device name with an underscore, usually "Wolf_" + - Delete all the topics homeassistant/...Wolf_ + - Now update and start the new version + - Adjust your dashboards and automations to use the new instead of the old entity ID. In most cases, it's easiest to edit in "yaml" mode, and insert a 0 in the middle of all the parameter IDs + diff --git a/ism7mqtt/Dockerfile b/ism7mqtt/Dockerfile index 1200da3..46503df 100644 --- a/ism7mqtt/Dockerfile +++ b/ism7mqtt/Dockerfile @@ -1,4 +1,4 @@ -FROM zivillian/ism7mqtt:v0.0.12 +FROM zivillian/ism7mqtt:v0.0.13 # Default ENV ENV \ diff --git a/ism7mqtt/config.yaml b/ism7mqtt/config.yaml index 378daa4..5f8b899 100644 --- a/ism7mqtt/config.yaml +++ b/ism7mqtt/config.yaml @@ -1,6 +1,6 @@ name: "Ism7MQTT" description: "Addon for direct communication with a Wolf ISM7 module" -version: "0.0.12" +version: "v0.0.13" slug: "ism7mqtt" init: false url: https://github.com/b3nn0/hassio-addon-ism7mqtt @@ -11,7 +11,7 @@ arch: #- armhf #- i386 map: - - "config:ro" + - "config:rw" discovery: - mqtt services: @@ -22,7 +22,6 @@ options: #ism7_ip: "" #ism7_password: "" device_name: Wolf - #parameter_json: "" interval: 60 debug_logging: False @@ -31,7 +30,6 @@ schema: ism7_ip: str ism7_password: password device_name: str - parameter_json: str interval: int debug_logging: bool diff --git a/ism7mqtt/run.sh b/ism7mqtt/run.sh index f75f6c2..818e78c 100644 --- a/ism7mqtt/run.sh +++ b/ism7mqtt/run.sh @@ -9,21 +9,33 @@ export ISM7_MQTTPASSWORD=$(bashio::services mqtt "password") export ISM7_IP=$(bashio::config 'ism7_ip') export ISM7_PASSWORD=$(bashio::config 'ism7_password') export HA_DISCOVERY_ID=$(bashio::config 'device_name') -export PARAMETER_JSON=$(bashio::config 'parameter_json') export INTERVAL=$(bashio::config 'interval') export DEBUG_LOGGING=$(bashio::config 'debug_logging') - +export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false set -x -echo $PARAMETER_JSON > /parameter.json -ISM_ARGS="--hass-id=$HA_DISCOVERY_ID --interval=$INTERVAL -t /parameter.json" +cd /app + +parameters="/config/ism7-parameters-$HA_DISCOVERY_ID.json" + +if ! [ -f $parameters ]; then + echo "Creating initial configuration $parameters" + /app/ism7config -t $parameters + if ! [ -f $parameters ]; then + echo "Parameter file creation seems to have failed. Please report to the ISM7MQTT Author" + exit -1 + fi +fi + + + + +ISM_ARGS="--hass-id=$HA_DISCOVERY_ID --interval=$INTERVAL -t $parameters" if [[ "$DEBUG_LOGGING" == "true" ]]; then ISM_ARGS+=" -d" fi -cd /app - while [ true ]; do echo "Starting ism7mqtt $ISM_ARGS" /app/ism7mqtt $ISM_ARGS || echo "ism7mqtt unexpectedly quit with return code $?" diff --git a/ism7mqtt/translations/de.yaml b/ism7mqtt/translations/de.yaml index da4cea9..8eb6805 100644 --- a/ism7mqtt/translations/de.yaml +++ b/ism7mqtt/translations/de.yaml @@ -6,9 +6,6 @@ configuration: device_name: name: ISM7 Gerätename description: Ein eindeutiger Name der dein Wolf-Gerät identifiziert. Wird genutzt um eindeutige Entitynamen zu generieren. - parameter_json: - name: Parameter.json Dateiinhalt - description: Kopiere den Inhalt deiner parameter.json Datei hier hin. interval: name: Update Intervall (Sekunden) debug_logging: diff --git a/ism7mqtt/translations/en.yaml b/ism7mqtt/translations/en.yaml index f5f936f..b21033e 100644 --- a/ism7mqtt/translations/en.yaml +++ b/ism7mqtt/translations/en.yaml @@ -6,9 +6,6 @@ configuration: device_name: name: ISM7 Device Name description: Any unique name to identify your Wolf device. Will be used to generate unique entity names. - parameter_json: - name: Parameter.json File Contents - description: Paste your parameter.json file contents here interval: name: Update interval (seconds) debug_logging: