homebridge-cmd4 8.0.6 → 8.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,8 +1,22 @@
1
1
  # Homebridges-cmd4 - CMD4 Plugin for Homebridge - Supports ~All Accessory Types and now all Characteristics too!!
2
- #### 8.0.6 (2026-11-08)
2
+ #### 8.0.7 (2026-11-18)
3
+
4
+ ##### Build System / Dependencies
5
+
6
+ * npm pkg fixes ([e5a48a47](https://github.com/ztalbot2000/homebridge-cmd4/commit/e5a48a478f78417b4836b0b532b0c67163a8a9e7))
3
7
 
4
8
  ##### Bug Fixes
5
9
 
6
- * Bug [#154](https://github.com/ztalbot2000/homebridge-cmd4/pull/154) NodeJS needs jwa2.0.1 to solve Fakegato startup failure ([eba93e1f](https://github.com/ztalbot2000/homebridge-cmd4/commit/eba93e1fb630573c8872999afb4fc557f2a488c0))
10
+ * Changes to match homebridge v1.11.4 including pkg tests and lint tests. Additions for testing homebridge v2+ ([d139ae0e](https://github.com/ztalbot2000/homebridge-cmd4/commit/d139ae0e2f2fcb6754cc8ed63c5d0ef21ef5911d))
11
+ * to latest commitlint dependencies ([ca3c9f0b](https://github.com/ztalbot2000/homebridge-cmd4/commit/ca3c9f0bda64c7a738c8ccd902eb0e39ed34778c))
12
+ * latest dev dependency of sinon ([21e93212](https://github.com/ztalbot2000/homebridge-cmd4/commit/21e932121d17c21173e4d8a212db1ea46081a7b1))
13
+ * Dependency change to latest eslint and globals ([86f89a2a](https://github.com/ztalbot2000/homebridge-cmd4/commit/86f89a2a42b92b8bb5eb02bc71f1d6f83393c73f))
14
+ * post install failed, No need to check for latest version after doing an install ([d1be5756](https://github.com/ztalbot2000/homebridge-cmd4/commit/d1be5756310dff4fce996f05b19d0a81f18a1bcb))
15
+ * dependency for version-checker, updates old glob security issue ([76f26633](https://github.com/ztalbot2000/homebridge-cmd4/commit/76f266332ef4276e4d553b5b50ddea912670d8f5))
16
+ * Outdated dependancies of NodeJS 24 and add NodeJS 26 ([f98058f0](https://github.com/ztalbot2000/homebridge-cmd4/commit/f98058f0cc412e522a887869d50c7af7eb70b1bd))
17
+
18
+ ##### Tests
19
+
20
+ * For homebridge 2+ api path changes for testing ([4ded361b](https://github.com/ztalbot2000/homebridge-cmd4/commit/4ded361b55443dbf7720c7dfb339b5ffc04c0a8b))
7
21
 
8
22
 
package/Cmd4Accessory.js CHANGED
@@ -481,7 +481,7 @@ class Cmd4Accessory
481
481
  case constants.CHARACTERISTIC:
482
482
  {
483
483
  //2 checkPollingOfUnsetCharacteristics
484
- valueToStore = null;
484
+ // linted out valueToStore = null;
485
485
 
486
486
  let rcDirective = isAccDirective( value, false );
487
487
  if ( rcDirective.accTypeEnumIndex == null )
@@ -776,7 +776,8 @@ class Cmd4Accessory
776
776
  {
777
777
  if ( settings.cmd4Dbg ) accessory.log.debug( `Adding All Service Characteristics for: ${ accessory.displayName }` );
778
778
 
779
- let perms = "";
779
+ // linted out let perms = "";
780
+ let perms;
780
781
 
781
782
  // Check every possible characteristic
782
783
  for ( let accTypeEnumIndex = 0; accTypeEnumIndex < CMD4_ACC_TYPE_ENUM.EOL; accTypeEnumIndex++ )
@@ -192,7 +192,7 @@
192
192
  "DISARMED",
193
193
  "securitySystemTargetState":
194
194
  "DISARM",
195
- "securitySystemAlarmType": 0,
195
+ "securitySystemAlarmType": "NO_ALARM",
196
196
  "statusFault": "NO_FAULT",
197
197
  "statusTampered": "NOT_TAMPERED",
198
198
  "name": "MySecuritySystem",
@@ -536,7 +536,7 @@
536
536
  // 3 - "DISARM"
537
537
 
538
538
  // Optional Characteristics
539
- "securitySystemAlarmType": 0, // Range: 0-1, Step 1
539
+ "securitySystemAlarmType": "NO_ALARM", // Range: 0-1, Step 1
540
540
  // Meaning Unknown
541
541
 
542
542
  "statusFault": "NO_FAULT", // 0 - "NO_FAULT"
@@ -4,6 +4,7 @@
4
4
 
5
5
 
6
6
  ## ChangeLog
7
+ * <a href="#Whats-new-in-8-0-7">**Whats new in 8.0.7**</a>
7
8
  * <a href="#Whats-new-in-8-0-6">**Whats new in 8.0.6**</a>
8
9
  * <a href="#Whats-new-in-8-0-4">**Whats new in 8.0.4**</a>
9
10
  * <a href="#Whats-new-in-8-0-3">**Whats new in 8.0.3**</a>
@@ -97,6 +98,28 @@
97
98
  * <a href="#Whats-new-in-2-1">**Whats new in 2.1**</a>
98
99
  * <a href="#Whats-new-in-2-0">**Whats new in 2.0**</a>
99
100
 
101
+ <a name="Whats-new-in-8-0-7">## Whats new in 8.0.7</a>
102
+ #### 8.0.7 (2026-11-18)
103
+
104
+ ##### Build System / Dependencies
105
+
106
+ * npm pkg fixes ([e5a48a47](https://github.com/ztalbot2000/homebridge-cmd4/commit/e5a48a478f78417b4836b0b532b0c67163a8a9e7))
107
+
108
+ ##### Bug Fixes
109
+
110
+ * Changes to match homebridge v1.11.4 including pkg tests and lint tests. Additions for testing homebridge v2+ ([d139ae0e](https://github.com/ztalbot2000/homebridge-cmd4/commit/d139ae0e2f2fcb6754cc8ed63c5d0ef21ef5911d))
111
+ * to latest commitlint dependencies ([ca3c9f0b](https://github.com/ztalbot2000/homebridge-cmd4/commit/ca3c9f0bda64c7a738c8ccd902eb0e39ed34778c))
112
+ * latest dev dependency of sinon ([21e93212](https://github.com/ztalbot2000/homebridge-cmd4/commit/21e932121d17c21173e4d8a212db1ea46081a7b1))
113
+ * Dependency change to latest eslint and globals ([86f89a2a](https://github.com/ztalbot2000/homebridge-cmd4/commit/86f89a2a42b92b8bb5eb02bc71f1d6f83393c73f))
114
+ * post install failed, No need to check for latest version after doing an install ([d1be5756](https://github.com/ztalbot2000/homebridge-cmd4/commit/d1be5756310dff4fce996f05b19d0a81f18a1bcb))
115
+ * dependency for version-checker, updates old glob security issue ([76f26633](https://github.com/ztalbot2000/homebridge-cmd4/commit/76f266332ef4276e4d553b5b50ddea912670d8f5))
116
+ * Outdated dependancies of NodeJS 24 and add NodeJS 26 ([f98058f0](https://github.com/ztalbot2000/homebridge-cmd4/commit/f98058f0cc412e522a887869d50c7af7eb70b1bd))
117
+
118
+ ##### Tests
119
+
120
+ * For homebridge 2+ api path changes for testing ([4ded361b](https://github.com/ztalbot2000/homebridge-cmd4/commit/4ded361b55443dbf7720c7dfb339b5ffc04c0a8b))
121
+
122
+
100
123
  <a name="Whats-new-in-8-0-6">## Whats new in 8.0.6</a>
101
124
  #### 8.0.6 (2026-11-08)
102
125
 
@@ -0,0 +1,60 @@
1
+ import { defineConfig } from "eslint/config";
2
+ import globals from "globals";
3
+ import path from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+ import js from "@eslint/js";
6
+ import { FlatCompat } from "@eslint/eslintrc";
7
+
8
+ const __filename = fileURLToPath(import.meta.url);
9
+ const __dirname = path.dirname(__filename);
10
+ const compat = new FlatCompat({
11
+ baseDirectory: __dirname,
12
+ recommendedConfig: js.configs.recommended,
13
+ allConfig: js.configs.all
14
+ });
15
+
16
+ export default defineConfig([{
17
+ extends: compat.extends("eslint:recommended"),
18
+
19
+ languageOptions: {
20
+ globals: {
21
+ ...Object.fromEntries(Object.entries(globals.browser).map(([key]) => [key, "off"])),
22
+ ...Object.fromEntries(Object.entries(globals.commonjs).map(([key]) => [key, "off"])),
23
+ ...globals.node,
24
+ ...globals.mocha,
25
+ assert: "writeable",
26
+ expect: "writeable",
27
+ sinon: "writeable",
28
+ ACC_EOL: "readonly",
29
+ DEVICE_EOL: "readonly",
30
+ FORMAT_EOL: "readonly",
31
+ UNITS_EOL: "readonly",
32
+ PERMS_EOL: "readonly",
33
+ DEVICE_DATA: "readonly",
34
+ ACC_DATA: "readonly",
35
+ CHAR_DATA: "readonly",
36
+ CMD4_CHAR_TYPE_ENUMS: "readonly",
37
+ CMD4_ACC_TYPE_ENUM: "readonly",
38
+ CMD4_DEVICE_TYPE_ENUM: "readonly",
39
+ cleanStatesDir: "readonly",
40
+ accEnumIndexToC: "readonly",
41
+ devEnumIndexToC: "readonly",
42
+ fs: "writeable",
43
+ HomebridgeAPI: "writeable",
44
+ Logger: "writeable",
45
+ platformAccessory_1: "writeable",
46
+ },
47
+
48
+ ecmaVersion: 12,
49
+ sourceType: "commonjs",
50
+ },
51
+
52
+ rules: {
53
+ "no-fallthrough": ["error", {
54
+ commentPattern: "break[\\s\\w]*omitted",
55
+ }],
56
+
57
+ "no-whitespace-before-property": ["error"],
58
+ "arrow-spacing": ["error"],
59
+ },
60
+ }]);
@@ -42,7 +42,10 @@ function stringToString( str )
42
42
  return str;
43
43
  // more or less to pass previous testcases
44
44
  if ( typeof str == "number" )
45
- return str += '';
45
+ {
46
+ str += '';
47
+ return str;
48
+ }
46
49
 
47
50
  return undefined;
48
51
  }
@@ -353,8 +356,7 @@ var CMD4_ACC_TYPE_ENUM =
353
356
  },
354
357
  indexOfEnum: function( characteristicString )
355
358
  {
356
- let accTypeEnumIndex = -1;
357
- accTypeEnumIndex = CMD4_ACC_TYPE_ENUM.properties.indexOfEnum( i => i.type === characteristicString );
359
+ let accTypeEnumIndex = CMD4_ACC_TYPE_ENUM.properties.indexOfEnum( i => i.type === characteristicString );
358
360
  if ( accTypeEnumIndex >= 0 )
359
361
  return accTypeEnumIndex;
360
362
 
@@ -3036,7 +3038,7 @@ module.exports =
3036
3038
  "PROGRAM_SCHEDULED":
3037
3039
  Characteristic.ProgramMode.PROGRAM_SCHEDULED,
3038
3040
  "PROGRAM_SCHEDULED_MANUAL_MODE":
3039
- Characteristic.ProgramMode.PROGRAM_SCHEDULED_MANUAL_MODE
3041
+ Characteristic.ProgramMode.PROGRAM_SCHEDULED_MANUAL_MODE_
3040
3042
  }
3041
3043
  },
3042
3044
  125: { type: "ProgrammableSwitchEvent",
@@ -3446,7 +3448,9 @@ module.exports =
3446
3448
  hapPerms.NOTIFY
3447
3449
  ]
3448
3450
  },
3449
- validValues: {}
3451
+ validValues: {"NO_ALARM": Characteristic.SecuritySystemAlarmType.NO_ALARM, // 0
3452
+ "UNKNOWN" : Characteristic.SecuritySystemAlarmType.UNKNOWN // 1
3453
+ }
3450
3454
  },
3451
3455
  144: { type: "SecuritySystemCurrentState",
3452
3456
  sche: "securitySystemCurrentState",