diff --git a/zwave_js/CHANGELOG.md b/zwave_js/CHANGELOG.md index e8ab49f03e9..b78dc520835 100644 --- a/zwave_js/CHANGELOG.md +++ b/zwave_js/CHANGELOG.md @@ -1,5 +1,26 @@ # Changelog +## 0.2.0 + +### Features + +- Add-on: Add `safe_mode` configuration option to put Z-Wave network in safe mode. This can be used help with troubleshooting network issues, such as being unable to start it, but will likely slow down your network and should therefore be used sparingly. This is an advanced configuration option that should not be adjusted in most cases and is therefore hidden from the default view. +- Add-on: Switch to [semantic versioning](https://semver.org/). With this change, major version changes to the addon will now reflect e.g. a major version release of Z-Wave JS or a significant change to the add-on structure. This should help users better understand the potential impact of an upgrade. + +### Bug fixes + +- Z-Wave JS: Includes several more fixes and workarounds for the problematic interaction between some controller firmware bugs and the automatic controller recovery introduced in the `v12` release + +### Config file changes + +- Add NEO Cool Cam Repeater +- Increase report timeout for Aeotec Multisensor 6 to 2s + +### Detailed changelogs + +- [Z-Wave JS 12.2.0](https://github.com/zwave-js/node-zwave-js/releases/tag/v12.2.0) +- [Z-Wave JS Server 1.32.2](https://github.com/zwave-js/zwave-js-server/releases/tag/1.32.2) + ## 0.1.98 ### Bug fixes diff --git a/zwave_js/DOCS.md b/zwave_js/DOCS.md index 684cd57457d..5a6f83d2644 100644 --- a/zwave_js/DOCS.md +++ b/zwave_js/DOCS.md @@ -138,11 +138,6 @@ This option sets the log level of Z-Wave JS. Valid options are: If no `log_level` is specified, the log level will be set to the level set in the Supervisor. -### Option `emulate_hardware` (optional) - -If you don't have a USB stick, you can use a fake stick for testing purposes. -It will not be able to control any real devices. - ### Option `soft_reset` This setting tells the add-on how to handle soft-resets for 500 series controllers: @@ -150,6 +145,19 @@ This setting tells the add-on how to handle soft-resets for 500 series controlle 2. Enabled - Soft-reset will be explicitly enabled for 500 series controllers. 3. Disabled - Soft-reset will be explicitly disabled for 500 series controllers. +### Option `emulate_hardware` (optional) + +If you don't have a USB stick, you can use a fake stick for testing purposes. +It will not be able to control any real devices. + +### Option `safe_mode` (optional) + +This setting puts your network in safe mode, which could significantly decrease +the performance of your network but may also help get the network up and running +so that you can troubleshoot issues, grab logs, etc. In most cases, users will +never need to use this feature, so only change this setting if you know what you +are doing and/or you are asked to. + ### Option `network_key` (deprecated) In previous versions of the addon, this was the only key that was needed. With diff --git a/zwave_js/build.yaml b/zwave_js/build.yaml index f0634a65bbd..e55b04d79f8 100644 --- a/zwave_js/build.yaml +++ b/zwave_js/build.yaml @@ -9,5 +9,5 @@ codenotary: signer: notary@home-assistant.io base_image: notary@home-assistant.io args: - ZWAVEJS_SERVER_VERSION: 1.32.1 - ZWAVEJS_VERSION: 12.1.1 + ZWAVEJS_SERVER_VERSION: 1.32.2 + ZWAVEJS_VERSION: 12.2.0 diff --git a/zwave_js/config.yaml b/zwave_js/config.yaml index e122e72f194..5f63478b571 100644 --- a/zwave_js/config.yaml +++ b/zwave_js/config.yaml @@ -1,5 +1,5 @@ --- -version: 0.1.98 +version: 0.2.0 slug: zwave_js name: Z-Wave JS description: Control a Z-Wave network with Home Assistant Z-Wave JS @@ -35,8 +35,9 @@ schema: s2_access_control_key: match(|[0-9a-fA-F]{32,32})? s2_authenticated_key: match(|[0-9a-fA-F]{32,32})? s2_unauthenticated_key: match(|[0-9a-fA-F]{32,32})? - emulate_hardware: bool? network_key: match(|[0-9a-fA-F]{32,32})? + emulate_hardware: bool? + safe_mode: bool? stage: stable startup: services timeout: 30 diff --git a/zwave_js/rootfs/etc/cont-init.d/config.sh b/zwave_js/rootfs/etc/cont-init.d/config.sh index 8b4a6b25ac6..4f7f3ce0879 100755 --- a/zwave_js/rootfs/etc/cont-init.d/config.sh +++ b/zwave_js/rootfs/etc/cont-init.d/config.sh @@ -13,6 +13,8 @@ declare log_level declare flush_to_disk declare host_chassis declare soft_reset +declare presets_array +declare presets readonly DOCS_EXAMPLE_KEY_1="2232666D100F795E5BB17F0A1BB7A146" readonly DOCS_EXAMPLE_KEY_2="A97D2A51A6D4022998BEFC7B5DAE8EA1" @@ -84,7 +86,7 @@ done # flushed to disk if [[ ${flush_to_disk:+x} ]]; then bashio::log.info "Flushing config to disk due to creation of new key(s)..." - bashio::addon.options > "/data/options.json" + bashio::addon.options >"/data/options.json" fi s0_legacy=$(bashio::config "s0_legacy_key") @@ -119,6 +121,23 @@ else bashio::log.info "Soft-reset disabled by user" fi +# Create empty presets array +presets_array=() + +if bashio::config.true 'safe_mode'; then + bashio::log.info "Safe mode enabled" + bashio::log.warning "WARNING: While in safe mode, the performance of your Z-Wave network will be in a reduced state. This is only meant for debugging purposes." + # Add SAFE_MODE to presets array + presets_array+=("SAFE_MODE") +fi + +# Convert presets array to JSON string and add to config +if [[ ${#presets_array[@]} -eq 0 ]]; then + presets="[]" +else + presets="$(printf '%s\n' "${presets_array[@]}" | jq -R . | jq -s .)" +fi + # Generate config bashio::var.json \ s0_legacy "${s0_legacy}" \ @@ -126,7 +145,8 @@ bashio::var.json \ s2_authenticated "${s2_authenticated}" \ s2_unauthenticated "${s2_unauthenticated}" \ log_level "${log_level}" \ - soft_reset "^${soft_reset}" | + soft_reset "^${soft_reset}" \ + presets "${presets}" | tempio \ -template /usr/share/tempio/zwave_config.conf \ -out /etc/zwave_config.json diff --git a/zwave_js/rootfs/usr/share/tempio/zwave_config.conf b/zwave_js/rootfs/usr/share/tempio/zwave_config.conf index 1d17a3491dc..399160fe8ab 100644 --- a/zwave_js/rootfs/usr/share/tempio/zwave_config.conf +++ b/zwave_js/rootfs/usr/share/tempio/zwave_config.conf @@ -14,5 +14,6 @@ "S2_Authenticated": "{{ .s2_authenticated }}", "S2_Unauthenticated": "{{ .s2_unauthenticated }}" }, - "enableSoftReset": {{ .soft_reset }} + "enableSoftReset": {{ .soft_reset }}, + "presets": {{ .presets }} } diff --git a/zwave_js/translations/en.yaml b/zwave_js/translations/en.yaml index ea37c149263..201360cf07e 100644 --- a/zwave_js/translations/en.yaml +++ b/zwave_js/translations/en.yaml @@ -45,5 +45,14 @@ configuration: automatically detect whether or not this needs to be enabled. The default setting should work for most users, so only change this setting if you know what you are doing and/or you are asked to. + safe_mode: + name: Enable safe mode + description: >- + This setting puts your network in safe mode, which could significantly + decrease the performance of your network but may also help get the + network up and running so that you can troubleshoot issues, grab logs, + etc. In most cases, users will never need to use this feature, so only + change this setting if you know what you are doing and/or you are asked + to. network: 3000/tcp: Z-Wave JS communication