homebridge-cmd4 5.1.0 → 6.0.1

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/README.md CHANGED
@@ -82,7 +82,7 @@ See [homebridge](https://github.com/homebridge/homebridge) for complete details.
82
82
      Use the provided config.json file or add it to your own.
83
83
 
84
84
  ```bash
85
- *SHELL*> cp /usr/lib/node_modules/homebridge-cmd4/Extras/config.json $HOME/.homebridge/
85
+ *SHELL*> cp /usr/local/lib/node_modules/homebridge-cmd4/Extras/config.json $HOME/.homebridge/
86
86
  ```
87
87
 
88
88
 
@@ -3,6 +3,10 @@
3
3
  ## Homebridge UI User. Do not click on any inline links. Homebridge UI does not supprt them. Bug#1098
4
4
 
5
5
  ## ChangeLog
6
+ * <a href="#Whats-new-in-6-0-1">**Whats new in 6.0.1**</a>
7
+ * <a href="#Whats-new-in-6-0-0">**Whats new in 6.0.0**</a>
8
+ * <a href="#Whats-new-in-6-0-0-beta1">**Whats new in 6.0.0.beta1**</a>
9
+ * <a href="#Whats-new-in-5-1-1">**Whats new in 5.1.1**</a>
6
10
  * <a href="#Whats-new-in-5-1-0">**Whats new in 5.1.0**</a>
7
11
  * <a href="#Whats-new-in-5-0-2">**Whats new in 5.0.2**</a>
8
12
  * <a href="#Whats-new-in-5-0-1">**Whats new in 5.0.1**</a>
@@ -72,6 +76,59 @@
72
76
  * <a href="#Whats-new-in-2-1">**Whats new in 2.1**</a>
73
77
  * <a href="#Whats-new-in-2-0">**Whats new in 2.0**</a>
74
78
 
79
+ <a name="Whats-new-in-6-0-1">## Whats new in 6.0.1</a>
80
+ #### 6.0.1 (2021-11-07)
81
+
82
+ ##### Bug Fixes
83
+
84
+ * For bug[#116](https://github.com/ztalbot2000/homebridge-cmd4/pull/116) remove stateCmd validation and for AirCon add global const parsing ([e7bc4963](https://github.com/ztalbot2000/homebridge-cmd4/commit/e7bc49630c47d16d296ff9751df7c7666cf2ecd3))
85
+
86
+
87
+ <a name="Whats-new-in-6-0-0">## Whats new in 6.0.0</a>
88
+ ## 6.0.0 (2021-10-01)
89
+
90
+ * Schema Prep - Found in Beta Check case of type ([9a394de0](https://github.com/ztalbot2000/homebridge-cmd4/commit/9a394de020b2ccf67a9c30194163807ea3a226a9))
91
+
92
+ <a name="Whats-new-in-6-0-0-beta1">## Whats new in 6.0.0-beta1</a>
93
+ ## 6.0.0-beta1 (2021-09-27)
94
+
95
+ ##### New Features
96
+
97
+ * Schema Prep - More documentation changes ([c6d68f1f](https://github.com/ztalbot2000/homebridge-cmd4/commit/c6d68f1f8a7c24e786a54dbf1660dba98a5d1b6a))
98
+ * Schema Prep - Documentation changes for feat ([5be7393d](https://github.com/ztalbot2000/homebridge-cmd4/commit/5be7393d4b722c602862a382b1bd710556ff196a))
99
+ * Schema Prep. More fakegato testing, Make cmd4Dbg not be file global scope ([50355797](https://github.com/ztalbot2000/homebridge-cmd4/commit/503557973758fd4103ab13f34680a4f08eaed3c2))
100
+ * Schema Prep - for fakegato and others, correct key/value pair the first time it is found ([335ca7e5](https://github.com/ztalbot2000/homebridge-cmd4/commit/335ca7e50958a089c21bfac61ee1982756b7965b))
101
+ * Schema Prep - Make sure fakegato characteristics are correct ([a8274c7a](https://github.com/ztalbot2000/homebridge-cmd4/commit/a8274c7adb9ffdc2c34d048057f8334d6da9ef8a))
102
+ * Schema Prep - Should save by index, like others ([20872e2b](https://github.com/ztalbot2000/homebridge-cmd4/commit/20872e2b0f8a5c52131bb9247ba6e6ae11b20fb4))
103
+ * Schema-Prep This works with all lower case, still sends Get/Set upper case ([d3764584](https://github.com/ztalbot2000/homebridge-cmd4/commit/d3764584f5e0faf369490ad85ed16ba3f19e41c8))
104
+ * Schema Prep - constants are now lower case and the input is lowered instead ([03b232a1](https://github.com/ztalbot2000/homebridge-cmd4/commit/03b232a152a622025ccfe7c6dc32ab3fa59d6df2))
105
+ * New tset tool to check where constant is defined ([4fc3668a](https://github.com/ztalbot2000/homebridge-cmd4/commit/4fc3668ad0e1fe51dde4a32ef83f3c78584f4e91))
106
+ * Schema Prep - Change variables to lower case, still check for Upper case ([2b8f4bf7](https://github.com/ztalbot2000/homebridge-cmd4/commit/2b8f4bf768d1c7aebb3c45f6b019de8201c1656e))
107
+ * Schema prep- Change constants to an object ([f0dd0de9](https://github.com/ztalbot2000/homebridge-cmd4/commit/f0dd0de923c12fe6dd52cf5469ff87b2d762ee37))
108
+ * Continue Schema Prep. Cmd4Storage is now referenced accordingly ([79d85b01](https://github.com/ztalbot2000/homebridge-cmd4/commit/79d85b01bac8d1d3a79a407bcbec0163f19f4e4d))
109
+ * Schema Prep. FakeGato simplification ([fd26104b](https://github.com/ztalbot2000/homebridge-cmd4/commit/fd26104b0d9c35a53209e91b3efb9ccf820c0333))
110
+ * Prep for Schema. Stored data now version controlled and assoc array class ([59d7a229](https://github.com/ztalbot2000/homebridge-cmd4/commit/59d7a22903fbb95b4e1b55a7fca4629960c89bfe))
111
+ * Prep for schema. Warn keys must be lower case ([fe3c155c](https://github.com/ztalbot2000/homebridge-cmd4/commit/fe3c155c5b00574ca3b03baf6d3a32f942756988))
112
+ * "Prep for Schema. Unclutter namespace" ([12a63fb5](https://github.com/ztalbot2000/homebridge-cmd4/commit/12a63fb5339f346b31702bc2f52aa60f299c0de4))
113
+
114
+ ##### Bug Fixes
115
+
116
+ * Unit testing order is relevant. Add --bail for sanityTests ([3d3eb844](https://github.com/ztalbot2000/homebridge-cmd4/commit/3d3eb844499c768efbbfdbda88f2164b276e927e))
117
+ * missed with last update ([2282996c](https://github.com/ztalbot2000/homebridge-cmd4/commit/2282996c5056a1b37edc998766e29c90a74f2cfb))
118
+ * The warning should read Capitalized, not Upper case ([9b7f7957](https://github.com/ztalbot2000/homebridge-cmd4/commit/9b7f7957613c2c36cb61c86d1f66b3bfa34d49fc))
119
+ * Found in demo mode, polling for default characteristics was attempted ([01960b73](https://github.com/ztalbot2000/homebridge-cmd4/commit/01960b73c696d788ea06469c5749da2272662e55))
120
+ * For Demo mode, Target states must be defined so warning is not shown ([a1e00e3f](https://github.com/ztalbot2000/homebridge-cmd4/commit/a1e00e3f84e80300c190b50473ee44026bfe42bc))
121
+ * Testing Prep Schema fix. Added unit test so will not happen again ([85ab69f7](https://github.com/ztalbot2000/homebridge-cmd4/commit/85ab69f7c366d2ab37ffe76c9eda7ba0d480e3d1))
122
+
123
+
124
+ <a name="Whats-new-in-5-1-1">## Whats new in 5.1.1</a>
125
+ #### 5.1.1 (2021-09-16)
126
+
127
+ ##### Bug Fixes
128
+
129
+ * Bug [#113](https://github.com/ztalbot2000/homebridge-cmd4/pull/113) Add example SecuritySystem script, fixing TargetState ([fc892370](https://github.com/ztalbot2000/homebridge-cmd4/commit/fc89237021e828831c3fef6b340fd9ae0211cfdf))
130
+
131
+
75
132
  <a name="Whats-new-in-5-1-0">## Whats new in 5.1.0</a>
76
133
  ### 5.1.0 (2021-08-16)
77
134
 
package/cmd4Constants.js CHANGED
@@ -7,143 +7,142 @@
7
7
 
8
8
  // Triggers which Array CMD4Accessory will be placed
9
9
  // Either cmd4Accessories or cmd4StandaloneAccessories
10
- exports.STANDALONE = "Standalone";
11
- exports.PLATFORM = "Platform";
12
-
13
- // Default intervals
14
- exports.SLOW_STATE_CHANGE_RESPONSE_TIME = 10000; // 10 seconds
15
- exports.MEDIUM_STATE_CHANGE_RESPONSE_TIME = 3000; // 3 seconds
16
- exports.DEFAULT_STATE_CHANGE_RESPONSE_TIME = 3000; // 3 seconds
17
- exports.FAST_STATE_CHANGE_RESPONSE_TIME = 1000; // 1 second
18
-
19
- exports.DEFAULT_TIMEOUT = 60000; // 1 minute
20
- exports.DEFAULT_INTERVAL = 60000; // 1 minute
21
-
22
- // Not a Bool, otherwise conditional check fails
23
- exports.DEFAULT_STATUSMSG = "TRUE";
24
-
25
- exports.DEFAULT_OUTPUTCONSTANTS = false;
26
- exports.DEFAULT_QUEUE_TYPE = "WoRm";
27
- exports.DEFAULT_QUEUE_PAUSE_TIMEOUT = 10000; // 10 seconds
28
-
29
-
30
- // Fakegato Constants
31
- exports.FAKEGATO_TYPE_ENERGY_l = "energy";
32
- exports.FAKEGATO_TYPE_ROOM_l = "room";
33
- exports.FAKEGATO_TYPE_WEATHER_l = "weather";
34
- exports.FAKEGATO_TYPE_DOOR_l = "door";
35
- exports.FAKEGATO_TYPE_MOTION_l = "motion";
36
- exports.FAKEGATO_TYPE_THERMO_l = "thermo";
37
- exports.FAKEGATO_TYPE_AQUA_l = "aqua";
38
- exports.EVE = "Eve";
39
- exports.STORAGE = "Storage";
40
- exports.STORAGE_l = "storage";
41
- exports.STORAGEPATH = "StoragePath";
42
- exports.FOLDER = "Folder";
43
- exports.FOLDER_l = "folder";
44
- exports.KEYPATH = "KeyPath";
45
- exports.STATUS = "Status";
46
- exports.STATUS_l = "status";
47
- exports.TEMP = "Temp";
48
- exports.TEMP_l = "temp";
49
- exports.SETTEMP = "SetTemp";
50
- exports.SETTEMP_l = "setTemp";
51
- exports.HUMIDITY = "Humidity";
52
- exports.HUMIDITY_l = "humidity";
53
- exports.PPM = "Ppm";
54
- exports.PPM_l = "ppm";
55
- exports.POWER = "Power";
56
- exports.POWER_l = "power";
57
- exports.PRESSURE = "Pressure";
58
- exports.PRESSURE_l = "pressure";
59
- exports.CURRENTTEMP = "CurrentTemp";
60
- exports.CURRENTTEMP_l = "currentTemp";
61
- exports.VALVEPOSITION = "ValvePosition";
62
- exports.VALVEPOSITION_l = "valvePosition";
63
- exports.WATERAMOUNT_l = "waterAmount";
64
- exports.TIME_l = "time";
65
- exports.PATH_l = "path";
66
- exports.KEYPATH_l = "keyPath";
67
-
68
- exports.FS_l = "fs";
69
- exports.GOOGLE_DRIVE_l = "googleDrive";
70
-
71
- // Config Constnts
72
- exports.DEBUG = "Debug";
73
- exports.DEBUG_l = "debug";
74
- exports.OUTPUTCONSTANTS = "OutputConstants";
75
- exports.STATUSMSG = "StatusMsg";
76
- exports.QUEUETYPE = "QueueType";
77
- exports.QUEUETYPES = "QueueTypes";
78
-
79
- // Queue Types
80
- exports.QUEUETYPE_SEQUENTIAL = "Sequential";
81
- exports.QUEUETYPE_WORM = "WoRm";
82
- // Used internally to mean only polled entries go straight through the queue
83
- exports.QUEUETYPE_STANDARD = "StandarD";
84
- // Used internally to mean entries go straight through the queue
85
- exports.QUEUETYPE_PASSTHRU = "None";
86
-
87
-
88
- // Platform Config Constnts
89
- exports.TYPE = "Type";
90
- exports.SUBTYPE = "SubType";
91
- exports.DISPLAYNAME = "DisplayName";
92
- exports.UUID = "UUID";
93
- exports.ACCESSORY = "Accessory";
94
- exports.CATEGORY = "Category";
95
- exports.PUBLISHEXTERNALLY = "PublishExternally";
96
- exports.NAME = "Name";
97
- exports.MODEL = "Model";
98
- exports.MANUFACTURER = "Manufacturer";
99
- exports.SERIALNUMBER = "SerialNumber";
100
- exports.FIRMWAREREVISION = "FirmwareRevision";
101
- exports.CHARACTERISTIC = "Characteristic";
102
- exports.TIMEOUT = "Timeout";
103
- exports.QUEUE = "Queue";
104
- exports.POLLING = "Polling";
105
- exports.INTERVAL = "Interval";
106
- exports.STATECHANGERESPONSETIME = "StateChangeResponseTime";
107
- exports.STATE_CMD_PREFIX = "State_cmd_prefix";
108
- exports.STATE_CMD_SUFFIX = "State_cmd_suffix";
109
- exports.STATE_CMD = "State_cmd";
110
- exports.FAKEGATO = "Fakegato";
111
- exports.REQUIRES = "Requires";
112
- exports.CONSTANTS = "Constants";
113
- exports.VARIABLES = "Variables";
114
- exports.LINKEDTYPES = "LinkedTypes";
115
- exports.ACCESSORIES = "Accessories";
116
- exports.URL = "Url";
117
- exports.ALLOWTLV8 = "AllowTLV8";
118
-
119
- exports.DEFINITIONS = "Definitions";
120
- exports.PROPS = "Props";
121
-
122
-
123
- // Internal list variables
124
- exports.ACCESSORY_lv = "accessory";
125
- exports.CHARACTERISTIC_STRING_lv = "characteristicString";
126
- exports.CALLBACK_lv = "callback";
127
- exports.ACC_TYPE_ENUM_INDEX_lv = "accTypeEnumIndex";
128
- exports.INTERVAL_lv = "interval";
129
- exports.IS_SET_lv = "isSet";
130
- exports.QUEUE_NAME_lv = "queueName";
131
- exports.QUEUE_GET_IS_UPDATE_lv = "queueGetIsUpdate";
132
- exports.STATE_CHANGE_RESPONSE_TIME_lv = "stateChangeResponseTime";
133
- exports.TIMEOUT_lv = "timeout";
134
- exports.VALUE_lv = "value";
135
- exports.STORED_VALUES_PER_CHARACTERISTIC_lv = "storedValuesPerCharacteristic";
136
-
137
- exports.ERROR_TIMER_EXPIRED = -151;
138
- //Exports.ERROR_CMD_FAILED_REPLY = -152;
139
- exports.ERROR_NULL_REPLY = -153;
140
- exports.ERROR_NULL_STRING_REPLY = -154;
141
- exports.ERROR_EMPTY_STRING_REPLY = -155;
142
- exports.ERROR_2ND_NULL_STRING_REPLY = -156;
143
- exports.ERROR_NON_CONVERTABLE_REPLY = -157;
144
- exports.ERROR_NO_DATA_REPLY = -158;
145
-
146
-
147
-
148
- // Static Messages
149
- exports.DBUSY = "Perhaps your device is busy?";
10
+ //
11
+
12
+
13
+ var cmd4Constants = {
14
+ STANDALONE: "Standalone",
15
+ PLATFORM: "Platform",
16
+
17
+ // Default intervals
18
+ // 10 seconds
19
+ SLOW_STATE_CHANGE_RESPONSE_TIME: 10000,
20
+ // 3 seconds
21
+ MEDIUM_STATE_CHANGE_RESPONSE_TIME: 3000,
22
+ // 3 seconds
23
+ DEFAULT_STATE_CHANGE_RESPONSE_TIME: 3000,
24
+ // 1 second
25
+ FAST_STATE_CHANGE_RESPONSE_TIME: 1000,
26
+
27
+ // 1 minute
28
+ DEFAULT_INTERVAL: 60000,
29
+ // 1 minute
30
+ DEFAULT_TIMEOUT: 60000,
31
+
32
+ // Not a Bool, otherwise conditional check fails
33
+ DEFAULT_STATUSMSG: "TRUE",
34
+
35
+ DEFAULT_QUEUE_TYPE: "WoRm",
36
+ // 10 seconds
37
+ DEFAULT_QUEUE_PAUSE_TIMEOUT: 10000,
38
+
39
+ // No debug
40
+ DEFAULT_DEBUG: false,
41
+ // No funny TLV8 characteristics
42
+ DEFAULT_ALLOW_TLV8: false,
43
+ DEFAULT_OUTPUTCONSTANTS: false,
44
+
45
+ // Fakegato Constants
46
+ FAKEGATO_TYPE_ENERGY: "energy",
47
+ FAKEGATO_TYPE_ROOM: "room",
48
+ FAKEGATO_TYPE_WEATHER: "weather",
49
+ FAKEGATO_TYPE_DOOR: "door",
50
+ FAKEGATO_TYPE_MOTION: "motion",
51
+ FAKEGATO_TYPE_THERMO: "thermo",
52
+ FAKEGATO_TYPE_AQUA: "aqua",
53
+ EVE: "eve",
54
+ STORAGE: "storage",
55
+ STORAGEPATH: "storagePath",
56
+ FOLDER: "folder",
57
+ KEYPATH: "keyPath",
58
+ STATUS: "status",
59
+ TEMP: "temp",
60
+ SETTEMP: "setTemp",
61
+ HUMIDITY: "humidity",
62
+ PPM: "ppm",
63
+ POWER: "power",
64
+ PRESSURE: "pressure",
65
+ CURRENTTEMP: "currentTemp",
66
+ VALVEPOSITION: "valvePosition",
67
+ WATERAMOUNT: "waterAmount",
68
+ TIME: "time",
69
+ PATH: "path",
70
+
71
+ FS: "fs",
72
+ GOOGLE_DRIVE: "googleDrive",
73
+
74
+ // Config Constants
75
+ DEBUG: "debug",
76
+ OUTPUTCONSTANTS: "outputConstants",
77
+ STATUSMSG: "statusMsg",
78
+ QUEUETYPE: "queueType",
79
+ QUEUETYPES: "queueTypes",
80
+
81
+ // Queue Types
82
+ QUEUETYPE_SEQUENTIAL: "Sequential",
83
+ QUEUETYPE_WORM: "WoRm",
84
+ // Used internally to mean only polled entries go straight through the queue
85
+ QUEUETYPE_STANDARD: "StandarD",
86
+ // Used internally to mean entries go straight through the queue
87
+ QUEUETYPE_PASSTHRU: "None",
88
+
89
+
90
+ // Platform/Accessory Config Constants
91
+ TYPE: "type",
92
+ SUBTYPE: "subType",
93
+ DISPLAYNAME: "displayName",
94
+ UUID: "uuid",
95
+ ACCESSORY: "accessory",
96
+ CATEGORY: "category",
97
+ PUBLISHEXTERNALLY: "publishExternally",
98
+ CHARACTERISTIC: "characteristic",
99
+ TIMEOUT: "timeout",
100
+ QUEUE: "queue",
101
+ POLLING: "polling",
102
+ INTERVAL: "interval",
103
+ STATECHANGERESPONSETIME: "stateChangeResponseTime",
104
+ STATE_CMD_PREFIX: "state_cmd_prefix",
105
+ STATE_CMD_SUFFIX: "state_cmd_suffix",
106
+ STATE_CMD: "state_cmd",
107
+ FAKEGATO: "fakegato",
108
+ REQUIRES: "requires",
109
+ CONSTANTS: "constants",
110
+ VARIABLES: "variables",
111
+ LINKEDTYPES: "linkedTypes",
112
+ ACCESSORIES: "accessories",
113
+ URL: "url",
114
+ ALLOWTLV8: "allowTLV8",
115
+
116
+ DEFINITIONS: "definitions",
117
+ PROPS: "props",
118
+
119
+
120
+ // Internal list variables
121
+ ACCESSORY_lv: "accessory",
122
+ CHARACTERISTIC_STRING_lv: "characteristicString",
123
+ CALLBACK_lv: "callback",
124
+ ACC_TYPE_ENUM_INDEX_lv: "accTypeEnumIndex",
125
+ INTERVAL_lv: "interval",
126
+ IS_SET_lv: "isSet",
127
+ QUEUE_NAME_lv: "queueName",
128
+ QUEUE_GET_IS_UPDATE_lv: "queueGetIsUpdate",
129
+ STATE_CHANGE_RESPONSE_TIME_lv: "stateChangeResponseTime",
130
+ TIMEOUT_lv: "timeout",
131
+ VALUE_lv: "value",
132
+ CMD4_STORAGE_lv: "cmd4Storage",
133
+
134
+ ERROR_TIMER_EXPIRED: -151,
135
+ //Exports.ERROR_CMD_FAILED_REPLY: -152,
136
+ ERROR_NULL_REPLY: -153,
137
+ ERROR_NULL_STRING_REPLY: -154,
138
+ ERROR_EMPTY_STRING_REPLY: -155,
139
+ ERROR_2ND_NULL_STRING_REPLY: -156,
140
+ ERROR_NON_CONVERTABLE_REPLY: -157,
141
+ ERROR_NO_DATA_REPLY: -158,
142
+
143
+
144
+
145
+ // Static Messages
146
+ DBUSY: "Perhaps your device is busy?"
147
+ };
148
+ module.exports = cmd4Constants;
@@ -105,9 +105,9 @@ See [fakegato-history](https://github.com/simont77/fakegato-history)
105
105
  ### Step 1. Check that the characteristic is polled.
106
106
  &nbsp;&nbsp;&nbsp; Only polled characteristics are recorded. For history to be collected you will have to enable polling and interval for the accessory, and according to the fakegato-history documents it should be less than 10 minutes (600 seconds). The new polling config section allows for each characteristic to be polled at their individual times. Check your config.json for this setup. An example of polling is:
107
107
  ```json
108
- "polling": [{"currentHeatingCoolingState": 0,
108
+ "polling": [{"characteristic": "currentHeatingCoolingState",
109
109
  "interval": 540, "timeout": 4000},
110
- {"currentTemperature": 50.0,
110
+ {"characteristic": "currentTemperature",
111
111
  "interval": 60, "timeout": 4000}
112
112
  ],
113
113
  ```