node-red-contrib-homebridge-automation 0.3.0-beta.14 → 0.3.0-beta.15

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red-contrib-homebridge-automation",
3
- "version": "0.3.0-beta.14",
3
+ "version": "0.3.0-beta.15",
4
4
  "description": "NodeRED Automation for HomeBridge",
5
5
  "main": "src/HAP-NodeRed.js",
6
6
  "scripts": {
@@ -41,8 +41,8 @@
41
41
  },
42
42
  "dependencies": {
43
43
  "better-queue": ">=3.8.12",
44
- "debug": "^4.3.7",
45
- "@homebridge/hap-client": "^2.1.0"
44
+ "debug": "^4.4.1",
45
+ "@homebridge/hap-client": "^3.1.1"
46
46
  },
47
47
  "author": "NorthernMan54",
48
48
  "license": "ISC",
@@ -174,8 +174,11 @@ class HBConfigNode {
174
174
  this.monitor = await this.hapClient.monitorCharacteristics(monitorNodes);
175
175
  this.monitor.on('service-update', (services) => {
176
176
  services.forEach(service => {
177
- const eventNodes = Object.values(this.clientNodes).filter(clientNode =>
178
- clientNode.config.device === `${service.instance.name}${service.instance.username}${service.accessoryInformation.Manufacturer}${service.serviceName}${service.uuid.slice(0, 8)}`
177
+ const eventNodes = Object.values(this.clientNodes).filter(clientNode => {
178
+ const deviceIdentifier = `${service.instance.name}${service.instance.username}${service.accessoryInformation.Manufacturer}${(service.accessoryInformation.Name ? service.accessoryInformation.Name : service.serviceName)}${service.uuid.slice(0, 8)}`;
179
+ // debug('service-update: compare', clientNode.config.device, deviceIdentifier);
180
+ return clientNode.config.device === deviceIdentifier;
181
+ }
179
182
  );
180
183
  // debug('service-update', service.serviceName, eventNodes);
181
184
  eventNodes.forEach(eventNode => eventNode.emit('hbEvent', service));
@@ -35,7 +35,7 @@
35
35
  "id": "4138921fd7b9a926",
36
36
  "type": "tab",
37
37
  "label": "Flow 5",
38
- "disabled": false,
38
+ "disabled": true,
39
39
  "info": "",
40
40
  "env": []
41
41
  },
@@ -43,7 +43,7 @@
43
43
  "id": "92f59d974b9c8a86",
44
44
  "type": "tab",
45
45
  "label": "Camera Test",
46
- "disabled": true,
46
+ "disabled": false,
47
47
  "info": "",
48
48
  "env": []
49
49
  },
@@ -2883,14 +2883,14 @@
2883
2883
  "id": "6df154716efd4949",
2884
2884
  "type": "hb-event",
2885
2885
  "z": "92f59d974b9c8a86",
2886
- "name": "Side door",
2887
- "Homebridge": "homebridge",
2888
- "Manufacturer": "Eufy",
2886
+ "name": "North Sidewalk 6EED",
2887
+ "Homebridge": "ECI-T24F2",
2888
+ "Manufacturer": "HikVision",
2889
2889
  "Service": "MotionSensor",
2890
- "device": "homebridge0E:89:A7:DA:D3:21EufySide door00000085",
2890
+ "device": "ECI-T24F28E:88:AB:7A:D0:54HikVisionNorth Sidewalk 6EED00000085",
2891
2891
  "conf": "7e647d67.f33acc",
2892
2892
  "sendInitialState": true,
2893
- "x": 100,
2893
+ "x": 140,
2894
2894
  "y": 220,
2895
2895
  "wires": [
2896
2896
  [
@@ -2916,7 +2916,7 @@
2916
2916
  "checkall": "true",
2917
2917
  "repair": false,
2918
2918
  "outputs": 1,
2919
- "x": 270,
2919
+ "x": 370,
2920
2920
  "y": 220,
2921
2921
  "wires": [
2922
2922
  [
@@ -2943,7 +2943,7 @@
2943
2943
  "from": "",
2944
2944
  "to": "",
2945
2945
  "reg": false,
2946
- "x": 460,
2946
+ "x": 540,
2947
2947
  "y": 220,
2948
2948
  "wires": [
2949
2949
  [
@@ -2955,14 +2955,14 @@
2955
2955
  "id": "769d2de2c6bd3544",
2956
2956
  "type": "hb-control",
2957
2957
  "z": "92f59d974b9c8a86",
2958
- "name": "Side door",
2959
- "Homebridge": "homebridge",
2960
- "Manufacturer": "Eufy",
2958
+ "name": "North Sidewalk 6EED",
2959
+ "Homebridge": "ECI-T24F2",
2960
+ "Manufacturer": "HikVision",
2961
2961
  "Service": "CameraRTPStreamManagement",
2962
- "device": "homebridge0E:89:A7:DA:D3:21EufySide door00000110",
2962
+ "device": "ECI-T24F28E:88:AB:7A:D0:54HikVisionNorth Sidewalk 6EED00000110",
2963
2963
  "conf": "7e647d67.f33acc",
2964
2964
  "outputs": 1,
2965
- "x": 660,
2965
+ "x": 760,
2966
2966
  "y": 220,
2967
2967
  "wires": [
2968
2968
  [
@@ -2977,13 +2977,13 @@
2977
2977
  "name": "debug 21",
2978
2978
  "active": true,
2979
2979
  "tosidebar": true,
2980
- "console": false,
2980
+ "console": true,
2981
2981
  "tostatus": true,
2982
2982
  "complete": "payload",
2983
2983
  "targetType": "msg",
2984
2984
  "statusVal": "payload",
2985
2985
  "statusType": "auto",
2986
- "x": 840,
2986
+ "x": 850,
2987
2987
  "y": 280,
2988
2988
  "wires": []
2989
2989
  },
@@ -3024,7 +3024,7 @@
3024
3024
  "checkall": "true",
3025
3025
  "repair": false,
3026
3026
  "outputs": 1,
3027
- "x": 270,
3027
+ "x": 330,
3028
3028
  "y": 340,
3029
3029
  "wires": [
3030
3030
  [
@@ -3051,7 +3051,7 @@
3051
3051
  "from": "",
3052
3052
  "to": "",
3053
3053
  "reg": false,
3054
- "x": 460,
3054
+ "x": 540,
3055
3055
  "y": 340,
3056
3056
  "wires": [
3057
3057
  [
@@ -3070,7 +3070,7 @@
3070
3070
  "device": "ECI-T24F2CB:6F:94:DD:43:77HikVisionDriveway 8E5200000110",
3071
3071
  "conf": "7e647d67.f33acc",
3072
3072
  "outputs": 1,
3073
- "x": 680,
3073
+ "x": 740,
3074
3074
  "y": 340,
3075
3075
  "wires": [
3076
3076
  [
@@ -3114,13 +3114,13 @@
3114
3114
  "name": "debug 22",
3115
3115
  "active": true,
3116
3116
  "tosidebar": true,
3117
- "console": false,
3117
+ "console": true,
3118
3118
  "tostatus": true,
3119
3119
  "complete": "payload",
3120
3120
  "targetType": "msg",
3121
3121
  "statusVal": "payload",
3122
3122
  "statusType": "auto",
3123
- "x": 700,
3123
+ "x": 710,
3124
3124
  "y": 500,
3125
3125
  "wires": []
3126
3126
  },
@@ -3152,5 +3152,115 @@
3152
3152
  "d376945f7d6314f9"
3153
3153
  ]
3154
3154
  ]
3155
+ },
3156
+ {
3157
+ "id": "448a23fd99b4e52a",
3158
+ "type": "hb-event",
3159
+ "z": "92f59d974b9c8a86",
3160
+ "name": "Side door",
3161
+ "Homebridge": "homebridge",
3162
+ "Manufacturer": "Eufy",
3163
+ "Service": "MotionSensor",
3164
+ "device": "homebridge0E:89:A7:DA:D3:21EufySide door00000085",
3165
+ "conf": "7e647d67.f33acc",
3166
+ "sendInitialState": true,
3167
+ "x": 100,
3168
+ "y": 420,
3169
+ "wires": [
3170
+ [
3171
+ "943911317b27b4bc",
3172
+ "5b0570544efae122"
3173
+ ]
3174
+ ]
3175
+ },
3176
+ {
3177
+ "id": "5b0570544efae122",
3178
+ "type": "switch",
3179
+ "z": "92f59d974b9c8a86",
3180
+ "name": "",
3181
+ "property": "payload.MotionDetected",
3182
+ "propertyType": "msg",
3183
+ "rules": [
3184
+ {
3185
+ "t": "eq",
3186
+ "v": "1",
3187
+ "vt": "num"
3188
+ }
3189
+ ],
3190
+ "checkall": "true",
3191
+ "repair": false,
3192
+ "outputs": 1,
3193
+ "x": 330,
3194
+ "y": 420,
3195
+ "wires": [
3196
+ [
3197
+ "7840c24c88d831cc"
3198
+ ]
3199
+ ]
3200
+ },
3201
+ {
3202
+ "id": "7840c24c88d831cc",
3203
+ "type": "change",
3204
+ "z": "92f59d974b9c8a86",
3205
+ "name": "",
3206
+ "rules": [
3207
+ {
3208
+ "t": "set",
3209
+ "p": "payload",
3210
+ "pt": "msg",
3211
+ "to": "",
3212
+ "tot": "date"
3213
+ }
3214
+ ],
3215
+ "action": "",
3216
+ "property": "",
3217
+ "from": "",
3218
+ "to": "",
3219
+ "reg": false,
3220
+ "x": 540,
3221
+ "y": 420,
3222
+ "wires": [
3223
+ [
3224
+ "389516e4379cfcc8"
3225
+ ]
3226
+ ]
3227
+ },
3228
+ {
3229
+ "id": "389516e4379cfcc8",
3230
+ "type": "hb-control",
3231
+ "z": "92f59d974b9c8a86",
3232
+ "name": "Side door",
3233
+ "Homebridge": "homebridge",
3234
+ "Manufacturer": "Eufy",
3235
+ "Service": "CameraRTPStreamManagement",
3236
+ "device": "homebridge0E:89:A7:DA:D3:21EufySide door00000110",
3237
+ "conf": "7e647d67.f33acc",
3238
+ "outputs": 1,
3239
+ "x": 720,
3240
+ "y": 420,
3241
+ "wires": [
3242
+ [
3243
+ "1c18c4d5c4cd94db"
3244
+ ]
3245
+ ]
3246
+ },
3247
+ {
3248
+ "id": "2802a70d3cd5570b",
3249
+ "type": "hb-event",
3250
+ "z": "92f59d974b9c8a86",
3251
+ "name": "Canoe 5036",
3252
+ "Homebridge": "ECI-T24F2",
3253
+ "Manufacturer": "HikVision",
3254
+ "Service": "MotionSensor",
3255
+ "device": "ECI-T24F25C:EE:FE:4D:64:B4HikVisionCanoe 503600000085",
3256
+ "conf": "7e647d67.f33acc",
3257
+ "sendInitialState": true,
3258
+ "x": 130,
3259
+ "y": 600,
3260
+ "wires": [
3261
+ [
3262
+ "943911317b27b4bc"
3263
+ ]
3264
+ ]
3155
3265
  }
3156
3266
  ]