Skip to content

Commit

Permalink
Merge branch 'master' into pr/QubinoHelp/6326
Browse files Browse the repository at this point in the history
  • Loading branch information
AlCalzone committed Sep 28, 2023
2 parents 70c1fab + 67c8bb1 commit 7f8af76
Show file tree
Hide file tree
Showing 453 changed files with 1,677 additions and 2,936 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
Add placeholder for next release with `wip` snippet
-->
## 12.0.0 (2023-09-26)
### Application compatibility
Home Assistant users who manage `zwave-js-server` themselves, **must** install the following upgrades before upgrading to this driver version:
* Home Assistant **2023.10.0** or higher
* `zwave-js-server` **1.32.0**

### Breaking changes · [Migration guide](https://zwave-js.github.io/node-zwave-js/#/getting-started/migrating-to-v12)
* Remove support for Node.js 14 and 16 (#6245)
* Subpath exports are now exposed using the `exports` field in `package.json` instead of `typesVersions` (#5839)
Expand Down
53 changes: 37 additions & 16 deletions packages/cc/src/cc/VersionCC.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@ import {
type MessageOrCCLogEntry,
MessagePriority,
type MessageRecord,
SecurityClass,
ValueMetadata,
ZWaveError,
ZWaveErrorCodes,
ZWaveLibraryTypes,
enumValuesToMetadataStates,
getCCName,
securityClassIsS2,
securityClassOrder,
validatePayload,
} from "@zwave-js/core/safe";
import type { ZWaveApplicationHost, ZWaveHost } from "@zwave-js/host/safe";
Expand Down Expand Up @@ -439,24 +442,42 @@ export class VersionCC extends CommandClass {
} else {
// We were lied to - the NIF said this CC is supported, now the node claims it isn't
// Make sure this is not a critical CC, which must be supported though
switch (cc) {
case CommandClasses.Version:
case CommandClasses["Manufacturer Specific"]:
logMessage = ` claims NOT to support CC ${
CommandClasses[cc]
} (${num2hex(cc)}), but it must. Assuming the ${
this.endpointIndex === 0 ? "node" : "endpoint"
} supports version 1...`;
endpoint.addCC(cc, { version: 1 });
break;

default:
logMessage = ` does NOT support CC ${
CommandClasses[cc]
} (${num2hex(cc)})`;
endpoint.removeCC(cc);

if (
cc === CommandClasses.Version
|| cc === CommandClasses["Manufacturer Specific"]
) {
logMessage = ` claims NOT to support CC ${
CommandClasses[cc]
} (${num2hex(cc)}), but it must. Assuming the ${
this.endpointIndex === 0 ? "node" : "endpoint"
} supports version 1...`;
endpoint.addCC(cc, { version: 1 });
} else if (
(cc === CommandClasses.Security
&& node.hasSecurityClass(SecurityClass.S0_Legacy))
|| (cc === CommandClasses["Security 2"]
&& securityClassOrder.some((sc) =>
securityClassIsS2(sc)
&& node.hasSecurityClass(sc)
))
) {
logMessage = ` claims NOT to support CC ${
CommandClasses[cc]
} (${
num2hex(cc)
}), but it is known to support it. Assuming the ${
this.endpointIndex === 0 ? "node" : "endpoint"
} supports version 1...`;
endpoint.addCC(cc, { version: 1 });
} else {
logMessage = ` does NOT support CC ${
CommandClasses[cc]
} (${num2hex(cc)})`;
endpoint.removeCC(cc);
}
}

applHost.controllerLog.logNode(node.id, {
endpoint: this.endpointIndex,
message: logMessage,
Expand Down
3 changes: 2 additions & 1 deletion packages/config/config/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module.exports = {
],
rules: {
"@zwave-js/consistent-device-config-property-order": "error",
"@zwave-js/no-unnecessary-min-max-value": "error"
"@zwave-js/no-unnecessary-min-max-value": "error",
"@zwave-js/auto-unsigned": "error",
}
};
3 changes: 1 addition & 2 deletions packages/config/config/devices/0x0005/pe653.json
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,7 @@
"unit": "RPM",
"minValue": 400,
"maxValue": 3450,
"defaultValue": 750,
"unsigned": true
"defaultValue": 750
},
{
"#": "33",
Expand Down
3 changes: 0 additions & 3 deletions packages/config/config/devices/0x000c/hs-fls100-g2.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
"label": "Load Control Mode",
"valueSize": 1,
"defaultValue": 1,
"unsigned": true,
"allowManualEntry": false,
"options": [
{
Expand All @@ -55,7 +54,6 @@
"description": "Select which sensors control the load when parameter 5 is set to 1",
"valueSize": 1,
"defaultValue": 0,
"unsigned": true,
"allowManualEntry": false,
"options": [
{
Expand All @@ -82,7 +80,6 @@
"label": "PIR Sensitivity",
"valueSize": 1,
"defaultValue": 0,
"unsigned": true,
"allowManualEntry": false,
"options": [
{
Expand Down
1 change: 0 additions & 1 deletion packages/config/config/devices/0x000c/hs-fls100.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"minValue": 0,
"maxValue": 255,
"defaultValue": 50,
"unsigned": true,
"options": [
{
"label": "Never turn on floodlight",
Expand Down
3 changes: 1 addition & 2 deletions packages/config/config/devices/0x000c/hs-fs100_flex.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@
"unit": "seconds",
"minValue": 0,
"maxValue": 20,
"defaultValue": 0,
"unsigned": true
"defaultValue": 0
}
],
"metadata": {
Expand Down
1 change: 0 additions & 1 deletion packages/config/config/devices/0x000c/hs-ms100.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"minValue": 0,
"maxValue": 8,
"defaultValue": 8,
"unsigned": true,
"options": [
{
"label": "Disable",
Expand Down
1 change: 0 additions & 1 deletion packages/config/config/devices/0x000c/hs-wx300.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@
"minValue": 0,
"maxValue": 1,
"defaultValue": 0,
"unsigned": true,
"options": [
{
"label": "3 wire mode (Neutral, Line & Load)",
Expand Down
7 changes: 0 additions & 7 deletions packages/config/config/devices/0x0014/wd500z.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
"label": "Ignore Start Level",
"valueSize": 1,
"defaultValue": 1,
"unsigned": true,
"allowManualEntry": false,
"options": [
{
Expand All @@ -54,7 +53,6 @@
"description": "When enabled, the LED indicator will turn on when the light is turned off",
"valueSize": 1,
"defaultValue": 0,
"unsigned": true,
"allowManualEntry": false,
"options": [
{
Expand All @@ -72,7 +70,6 @@
"label": "Invert Switch",
"valueSize": 1,
"defaultValue": 0,
"unsigned": true,
"allowManualEntry": false,
"options": [
{
Expand All @@ -90,7 +87,6 @@
"label": "Shade Control Group 2",
"valueSize": 1,
"defaultValue": 0,
"unsigned": true,
"allowManualEntry": false,
"options": [
{
Expand All @@ -108,7 +104,6 @@
"label": "Shade Control Group 3",
"valueSize": 1,
"defaultValue": 0,
"unsigned": true,
"allowManualEntry": false,
"options": [
{
Expand All @@ -126,7 +121,6 @@
"label": "LED Indicator",
"valueSize": 1,
"defaultValue": 2,
"unsigned": true,
"allowManualEntry": false,
"options": [
{
Expand All @@ -148,7 +142,6 @@
"label": "Load Sense",
"valueSize": 1,
"defaultValue": 0,
"unsigned": true,
"allowManualEntry": false,
"options": [
{
Expand Down
3 changes: 0 additions & 3 deletions packages/config/config/devices/0x001a/rf9501.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
"description": "Power Up State of the switch",
"valueSize": 1,
"defaultValue": 1,
"unsigned": true,
"allowManualEntry": false,
"options": [
{
Expand All @@ -91,7 +90,6 @@
"description": "Enables this switch to participate in panic mode",
"valueSize": 1,
"defaultValue": 1,
"unsigned": true,
"allowManualEntry": false,
"options": [
{
Expand All @@ -110,7 +108,6 @@
"description": "Keep associated accessory switches in sync",
"valueSize": 1,
"defaultValue": 0,
"unsigned": true,
"allowManualEntry": false,
"options": [
{
Expand Down
3 changes: 0 additions & 3 deletions packages/config/config/devices/0x001a/rf9536-n.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
"description": "Power Up State of the switch",
"valueSize": 1,
"defaultValue": 1,
"unsigned": true,
"allowManualEntry": false,
"options": [
{
Expand All @@ -98,7 +97,6 @@
"description": "Enables this switch to participate in panic mode",
"valueSize": 1,
"defaultValue": 1,
"unsigned": true,
"allowManualEntry": false,
"options": [
{
Expand Down Expand Up @@ -128,7 +126,6 @@
"description": "Turn on or off rapid start feature",
"valueSize": 1,
"defaultValue": 1,
"unsigned": true,
"allowManualEntry": false,
"options": [
{
Expand Down
3 changes: 0 additions & 3 deletions packages/config/config/devices/0x001a/rf9537.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
"description": "Power Up State of the switch",
"valueSize": 1,
"defaultValue": 1,
"unsigned": true,
"allowManualEntry": false,
"options": [
{
Expand All @@ -98,7 +97,6 @@
"description": "Enables this switch to participate in panic mode",
"valueSize": 1,
"defaultValue": 1,
"unsigned": true,
"allowManualEntry": false,
"options": [
{
Expand Down Expand Up @@ -128,7 +126,6 @@
"description": "Turn on or off rapid start feature",
"valueSize": 1,
"defaultValue": 1,
"unsigned": true,
"allowManualEntry": false,
"options": [
{
Expand Down
4 changes: 0 additions & 4 deletions packages/config/config/devices/0x001a/rf9540-n_0.0_1.1.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@
"description": "Power Up State of the switch",
"valueSize": 1,
"defaultValue": 1,
"unsigned": true,
"allowManualEntry": false,
"options": [
{
Expand All @@ -106,7 +105,6 @@
"description": "Enables this switch to participate in panic mode",
"valueSize": 1,
"defaultValue": 1,
"unsigned": true,
"allowManualEntry": false,
"options": [
{
Expand Down Expand Up @@ -136,7 +134,6 @@
"description": "Turn on or off rapid start feature",
"valueSize": 1,
"defaultValue": 1,
"unsigned": true,
"allowManualEntry": false,
"options": [
{
Expand All @@ -155,7 +152,6 @@
"description": "Keep associated accessory switches in sync",
"valueSize": 1,
"defaultValue": 0,
"unsigned": true,
"allowManualEntry": false,
"options": [
{
Expand Down
4 changes: 0 additions & 4 deletions packages/config/config/devices/0x001a/rf9540-n_1.2.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
"description": "Power Up State of the switch",
"valueSize": 1,
"defaultValue": 1,
"unsigned": true,
"allowManualEntry": false,
"options": [
{
Expand All @@ -102,7 +101,6 @@
"description": "Enables this switch to participate in panic mode",
"valueSize": 1,
"defaultValue": 1,
"unsigned": true,
"allowManualEntry": false,
"options": [
{
Expand Down Expand Up @@ -132,7 +130,6 @@
"description": "Turn on or off rapid start feature",
"valueSize": 1,
"defaultValue": 1,
"unsigned": true,
"allowManualEntry": false,
"options": [
{
Expand All @@ -151,7 +148,6 @@
"description": "Keep associated accessory switches in sync",
"valueSize": 1,
"defaultValue": 0,
"unsigned": true,
"allowManualEntry": false,
"options": [
{
Expand Down
2 changes: 0 additions & 2 deletions packages/config/config/devices/0x001a/rf9542.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
"description": "Power Up State of the switch",
"valueSize": 1,
"defaultValue": 1,
"unsigned": true,
"allowManualEntry": false,
"options": [
{
Expand All @@ -98,7 +97,6 @@
"description": "Enables this switch to participate in panic mode",
"valueSize": 1,
"defaultValue": 1,
"unsigned": true,
"allowManualEntry": false,
"options": [
{
Expand Down
Loading

0 comments on commit 7f8af76

Please sign in to comment.