homebridge-cmd4 8.0.4 → 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 +16 -2
- package/Cmd4Accessory.js +3 -2
- package/Extras/config.json +1 -1
- package/Extras/config.min.json +1 -1
- package/RUNNING_CHANGELOG.md +32 -0
- package/eslint.config.mjs +60 -0
- package/lib/CMD4_ACC_TYPE_ENUM.js +9 -5
- package/lib/CMD4_ACC_TYPE_ENUM.js.2.0.1 +5665 -0
- package/package.json +20 -16
- package/package.json.1 +120 -0
- package/postinstall.js +7 -26
- package/utils/Cmd4Storage.js +1 -1
- package/utils/isJSON.js +2 -2
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.
|
|
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
|
-
*
|
|
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++ )
|
package/Extras/config.json
CHANGED
package/Extras/config.min.json
CHANGED
|
@@ -536,7 +536,7 @@
|
|
|
536
536
|
// 3 - "DISARM"
|
|
537
537
|
|
|
538
538
|
// Optional Characteristics
|
|
539
|
-
"securitySystemAlarmType":
|
|
539
|
+
"securitySystemAlarmType": "NO_ALARM", // Range: 0-1, Step 1
|
|
540
540
|
// Meaning Unknown
|
|
541
541
|
|
|
542
542
|
"statusFault": "NO_FAULT", // 0 - "NO_FAULT"
|
package/RUNNING_CHANGELOG.md
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
## ChangeLog
|
|
7
|
+
* <a href="#Whats-new-in-8-0-7">**Whats new in 8.0.7**</a>
|
|
8
|
+
* <a href="#Whats-new-in-8-0-6">**Whats new in 8.0.6**</a>
|
|
7
9
|
* <a href="#Whats-new-in-8-0-4">**Whats new in 8.0.4**</a>
|
|
8
10
|
* <a href="#Whats-new-in-8-0-3">**Whats new in 8.0.3**</a>
|
|
9
11
|
* <a href="#Whats-new-in-8-0-2">**Whats new in 8.0.2**</a>
|
|
@@ -96,6 +98,36 @@
|
|
|
96
98
|
* <a href="#Whats-new-in-2-1">**Whats new in 2.1**</a>
|
|
97
99
|
* <a href="#Whats-new-in-2-0">**Whats new in 2.0**</a>
|
|
98
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
|
+
|
|
123
|
+
<a name="Whats-new-in-8-0-6">## Whats new in 8.0.6</a>
|
|
124
|
+
#### 8.0.6 (2026-11-08)
|
|
125
|
+
|
|
126
|
+
##### Bug Fixes
|
|
127
|
+
|
|
128
|
+
* 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))
|
|
129
|
+
|
|
130
|
+
|
|
99
131
|
<a name="Whats-new-in-8-0-4">## Whats new in 8.0.4</a>
|
|
100
132
|
#### 8.0.4 (2026-02-03)
|
|
101
133
|
|
|
@@ -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
|
-
|
|
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 =
|
|
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.
|
|
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",
|