Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump zwave-js to 12.2.0 and add config option for safe mode #3248

Merged
merged 20 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions zwave_js/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
18 changes: 13 additions & 5 deletions zwave_js/DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,18 +138,26 @@ 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:
1. Automatic - the add-on will decide whether soft-reset should be enabled or disabled for 500 series controllers. This is the default option and should work for most people.
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
Expand Down
4 changes: 2 additions & 2 deletions zwave_js/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ codenotary:
signer: [email protected]
base_image: [email protected]
args:
ZWAVEJS_SERVER_VERSION: 1.32.1
ZWAVEJS_VERSION: 12.1.1
ZWAVEJS_SERVER_VERSION: 1.32.2
ZWAVEJS_VERSION: 12.2.0
5 changes: 3 additions & 2 deletions zwave_js/config.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
12 changes: 11 additions & 1 deletion zwave_js/rootfs/etc/cont-init.d/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,24 @@ else
bashio::log.info "Soft-reset disabled by user"
fi

presets=""

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."
presets=",
\"presets\": [\"SAFE_MODE\"]"
fi

# Generate config
bashio::var.json \
s0_legacy "${s0_legacy}" \
s2_access_control "${s2_access_control}" \
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
2 changes: 1 addition & 1 deletion zwave_js/rootfs/usr/share/tempio/zwave_config.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
"S2_Authenticated": "{{ .s2_authenticated }}",
"S2_Unauthenticated": "{{ .s2_unauthenticated }}"
},
"enableSoftReset": {{ .soft_reset }}
"enableSoftReset": {{ .soft_reset }}{{ .presets }}
raman325 marked this conversation as resolved.
Show resolved Hide resolved
}
9 changes: 9 additions & 0 deletions zwave_js/translations/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading