node-red-contrib-homebridge-automation 0.3.0-beta.9 → 0.3.1-beta.0

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.
@@ -11,3 +11,17 @@ updates:
11
11
  versions:
12
12
  - 13.2.0
13
13
  - 13.2.1
14
+ groups:
15
+ npm-dependencies:
16
+ patterns:
17
+ - "*"
18
+ - package-ecosystem: github-actions
19
+ directory: "/"
20
+ schedule:
21
+ interval: daily
22
+ time: "10:00"
23
+ open-pull-requests-limit: 10
24
+ groups:
25
+ github-actions:
26
+ patterns:
27
+ - "*"
@@ -1,43 +1,47 @@
1
- name:
2
- 'Build, Publish and Release'
3
-
4
- #
5
- # Automatically publish beta releases on pushes, require a manual workflow action for production releases
6
- #
7
- # Does the following
8
- # 1 - Run the documentation script against the package
9
- # 2 - Create the npm package using the package.json version tag ( or for beta releases, adds a beta tag and increments as needed )
10
- # 3 - Publish the npm package
11
- # 4 - For releases against the latest branch, create a github release as well
1
+ name: "Build, Publish and Release"
2
+
3
+
4
+ #
5
+ # Automatically publish beta releases on pushes, require a manual workflow action for production releases
6
+ #
7
+ # Does the following
8
+ # 1 - Run the documentation script against the package
9
+ # 2 - Create the npm package using the package.json version tag ( or for beta releases, adds a beta tag and increments as needed )
10
+ # 3 - Publish the npm package
11
+ # 4 - For releases against the main branch, create a github release as well
12
12
 
13
13
  on:
14
14
  push:
15
15
  branches: [beta-*.*.*, beta]
16
16
  workflow_dispatch:
17
17
 
18
+ concurrency:
19
+ group: build_and_publish
20
+ cancel-in-progress: true
21
+
18
22
  jobs:
19
23
  get_tags:
20
24
  runs-on: ubuntu-latest
21
25
 
22
26
  steps:
23
- # checkout repo
24
- - uses: actions/checkout@v4
25
-
26
- # get branch / tag name
27
- - name: Get Branch / Tag Name
28
- id: get_branch
29
- run: |
30
- export BRANCH_NAME=$(if [[ ${GITHUB_REF} =~ "refs/tags/" ]]; then echo ${GITHUB_REF/refs\/tags\//}; else echo ${GITHUB_REF/refs\/heads\//}; fi)
31
- echo $BRANCH_NAME
32
- echo "BRANCH_NAME=${BRANCH_NAME}" >> $GITHUB_OUTPUT
33
-
34
- # generate the image tag
35
- - name: Get Image Tag
36
- id: get_tag
37
- run: |
38
- export TARGET_IMAGE_TAG=$(if [ "${{ steps.get_branch.outputs.BRANCH_NAME }}" = "main" ]; then echo "main"; else echo "${{ steps.get_branch.outputs.BRANCH_NAME }}" | awk -F- '{ print $1 }'; fi)
39
- echo $TARGET_IMAGE_TAG
40
- echo "TARGET_IMAGE_TAG=${TARGET_IMAGE_TAG}" >> $GITHUB_OUTPUT
27
+ # checkout repo
28
+ - uses: actions/checkout@v5
29
+
30
+ # get branch / tag name
31
+ - name: Get Branch / Tag Name
32
+ id: get_branch
33
+ run: |
34
+ export BRANCH_NAME=$(if [[ ${GITHUB_REF} =~ "refs/tags/" ]]; then echo ${GITHUB_REF/refs\/tags\//}; else echo ${GITHUB_REF/refs\/heads\//}; fi)
35
+ echo $BRANCH_NAME
36
+ echo "BRANCH_NAME=${BRANCH_NAME}" >> $GITHUB_OUTPUT
37
+
38
+ # generate the image tag
39
+ - name: Get Image Tag
40
+ id: get_tag
41
+ run: |
42
+ export TARGET_IMAGE_TAG=$(if [ "${{ steps.get_branch.outputs.BRANCH_NAME }}" = "main" ]; then echo "main"; else echo "${{ steps.get_branch.outputs.BRANCH_NAME }}" | awk -F- '{ print $1 }'; fi)
43
+ echo $TARGET_IMAGE_TAG
44
+ echo "TARGET_IMAGE_TAG=${TARGET_IMAGE_TAG}" >> $GITHUB_OUTPUT
41
45
 
42
46
  outputs:
43
47
  BRANCH_NAME: ${{ steps.get_branch.outputs.BRANCH_NAME }}
@@ -47,38 +51,38 @@ jobs:
47
51
  runs-on: ubuntu-latest
48
52
 
49
53
  steps:
50
- # checkout repo
51
- - uses: actions/checkout@v4
52
- with:
53
- persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
54
- fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
55
-
56
- - uses: actions/setup-node@v4
57
- with:
58
- node-version: lts/*
59
-
60
- - name: Retrieve github-markdown-toc
61
- run: |
62
- wget -q https://raw.githubusercontent.com/ekalinin/github-markdown-toc/master/gh-md-toc
63
- chmod a+x gh-md-toc
64
-
65
- - name: Create Table of Contents
66
- run: |
67
- npm run-script document --if-present
68
- rm gh-md-toc
69
-
70
- - name: Commit files
71
- run: |
72
- git config --local user.email "github-actions[bot]@users.noreply.github.com"
73
- git config --local user.name "github-actions[bot]"
74
- git add * || true
75
- git commit -a -m "Update TOC" || true
76
-
77
- - name: Push changes
78
- uses: ad-m/github-push-action@master
79
- with:
80
- github_token: ${{ secrets.GITHUB_TOKEN }}
81
- branch: ${{ github.ref }}
54
+ # checkout repo
55
+ - uses: actions/checkout@v5
56
+ with:
57
+ persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
58
+ fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
59
+
60
+ - uses: actions/setup-node@v6
61
+ with:
62
+ node-version: lts/*
63
+
64
+ - name: Retrieve github-markdown-toc
65
+ run: |
66
+ wget -q https://raw.githubusercontent.com/ekalinin/github-markdown-toc/master/gh-md-toc
67
+ chmod a+x gh-md-toc
68
+
69
+ - name: Create Table of Contents
70
+ run: |
71
+ npm run-script document
72
+ rm gh-md-toc
73
+
74
+ - name: Commit files
75
+ run: |
76
+ git config --local user.email "github-actions[bot]@users.noreply.github.com"
77
+ git config --local user.name "github-actions[bot]"
78
+ git add *
79
+ git commit -a -m "Update TOC" || true
80
+
81
+ - name: Push changes
82
+ uses: ad-m/github-push-action@master
83
+ with:
84
+ github_token: ${{ secrets.GITHUB_TOKEN }}
85
+ branch: ${{ github.ref }}
82
86
 
83
87
  publish_prod_release:
84
88
  permissions:
@@ -88,9 +92,9 @@ jobs:
88
92
  if: ${{ needs.get_tags.outputs.BRANCH_NAME == 'main' }}
89
93
  uses: homebridge/.github/.github/workflows/npm-publish.yml@latest
90
94
  with:
91
- install_cmd: npm ci
95
+ install_cmd: npm ci
92
96
  secrets:
93
- npm_auth_token: ${{ secrets.NPM_TOKEN }}
97
+ npm_auth_token: ${{ secrets.npm_token }}
94
98
 
95
99
  publish_test_release:
96
100
  permissions:
@@ -102,24 +106,23 @@ jobs:
102
106
  with:
103
107
  tag: ${{ needs.get_tags.outputs.TARGET_IMAGE_TAG }}
104
108
  dynamically_adjust_version: true
105
- npm_version_command: pre
109
+ npm_version_command: 'pre'
106
110
  pre_id: ${{ needs.get_tags.outputs.TARGET_IMAGE_TAG }}
107
- install_cmd: npm ci
108
111
  secrets:
109
- npm_auth_token: ${{ secrets.NPM_TOKEN }}
112
+ npm_auth_token: ${{ secrets.npm_token }}
110
113
 
111
114
  publish_github_release:
112
115
  needs: [publish_prod_release]
113
116
  runs-on: ubuntu-latest
114
117
  steps:
115
- - uses: actions/checkout@v4
116
- - name: Create Release
117
- uses: softprops/action-gh-release@v1
118
- env:
119
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
120
- with:
121
- tag_name: ${{ needs.publish_prod_release.outputs.NPM_VERSION }}
122
- name: Release ${{ needs.publish_prod_release.outputs.NPM_VERSION }}
123
- generate_release_notes: true
124
- draft: false
125
- prerelease: false
118
+ - uses: actions/checkout@v5
119
+ - name: Create Release
120
+ uses: softprops/action-gh-release@v2
121
+ env:
122
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
123
+ with:
124
+ tag_name: ${{ needs.publish_prod_release.outputs.NPM_VERSION }}
125
+ name: Release ${{ needs.publish_prod_release.outputs.NPM_VERSION }}
126
+ generate_release_notes: true
127
+ draft: false
128
+ prerelease: false
package/README.md CHANGED
@@ -200,6 +200,7 @@ With a plugin, you can see if it supports Real Time events, by opening the Home
200
200
  - Add common supported types Window, Window Covering, Light Sensor #151, tks @HDeKnop
201
201
  - HB-Control Node Turns Off then On when this message is received #152
202
202
  - Added `Debug logging` configuration option that creates a file `homebridge-automation-endpoints.json`, which contains all the homebridge devices discovered. It can be used as part of troubleshooting device issues.
203
+ - Fix for some camara devices not outputing events
203
204
 
204
205
  # Backlog / Roadmap
205
206
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red-contrib-homebridge-automation",
3
- "version": "0.3.0-beta.9",
3
+ "version": "0.3.1-beta.0",
4
4
  "description": "NodeRED Automation for HomeBridge",
5
5
  "main": "src/HAP-NodeRed.js",
6
6
  "scripts": {
@@ -28,10 +28,10 @@
28
28
  "@types/node-red": "^1.3.5",
29
29
  "@types/jest": "^29.5.14",
30
30
  "@eslint/js": "^9.16.0",
31
- "eslint": "^8.57.1",
32
- "eslint-plugin-format": "^0.1.2",
33
- "eslint-plugin-jest": "^28.8.3",
34
- "globals": "^15.13.0",
31
+ "eslint": "^9.36.0",
32
+ "eslint-plugin-format": "^1.0.2",
33
+ "eslint-plugin-jest": "^29.0.1",
34
+ "globals": "^16.4.0",
35
35
  "jest": "^29.7.0",
36
36
  "node-red": "^4.0.2",
37
37
  "node-red-node-test-helper": "^0.3.4",
@@ -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-beta.5"
44
+ "debug": "^4.4.1",
45
+ "@homebridge/hap-client": "^3.1.1"
46
46
  },
47
47
  "author": "NorthernMan54",
48
48
  "license": "ISC",
@@ -88,9 +88,9 @@ class HBConfigNode {
88
88
 
89
89
  toList(perms) {
90
90
  const supportedTypes = new Set([
91
- 'Battery', 'Carbon Dioxide Sensor', 'Carbon Monoxide Sensor', 'Camera Rtp Stream Management',
91
+ 'Air Purifier', 'Air Quality Sensor', 'Battery', 'Carbon Dioxide Sensor', 'Carbon Monoxide Sensor', 'Camera Rtp Stream Management',
92
92
  'Doorbell', 'Fan', 'Fanv2', 'Garage Door Opener', 'Humidity Sensor', 'Input Source',
93
- 'Leak Sensor', 'Lightbulb', 'Lock Mechanism', 'Motion Sensor', 'Occupancy Sensor',
93
+ 'Leak Sensor', 'Light Sensor', 'Lightbulb', 'Lock Mechanism', 'Motion Sensor', 'Occupancy Sensor',
94
94
  'Outlet', 'Smoke Sensor', 'Speaker', 'Stateless Programmable Switch', 'Switch',
95
95
  'Television', 'Temperature Sensor', 'Thermostat', 'Contact Sensor',
96
96
  'Window', 'Window Covering', 'Light Sensor'
@@ -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));
@@ -17,12 +17,12 @@ class HbControlNode extends hbBaseNode {
17
17
  const isCamera = this.hbDevice.type === 'CameraRTPStreamManagement';
18
18
  const payloadType = typeof message.payload;
19
19
 
20
- // Validate payload
20
+ // Is the payload a valid JSON object?
21
+
21
22
  if (!isCamera && payloadType !== 'object') {
22
23
  const validNames = Object.keys(this.hbDevice.values)
23
24
  .filter(key => key !== 'ConfiguredName')
24
25
  .join(', ');
25
-
26
26
  this.error(
27
27
  `Invalid payload. Expected JSON object, e.g., {"On":false, "Brightness":0}. Valid values: ${validNames}`
28
28
  );
@@ -30,6 +30,16 @@ class HbControlNode extends hbBaseNode {
30
30
  return;
31
31
  }
32
32
 
33
+ // Validate payload
34
+ let keysToKeep = Object.keys(this.hbDevice.values);
35
+
36
+ Object.keys(message.payload).forEach(key => {
37
+ if (!keysToKeep.includes(key)) {
38
+ this.handleWarning(`Unhandled Characteristic '${key}'`);
39
+ delete message.payload[key];
40
+ }
41
+ });
42
+
33
43
  const results = [];
34
44
  let fill = 'green';
35
45
 
@@ -50,11 +60,13 @@ class HbControlNode extends hbBaseNode {
50
60
  } else {
51
61
  // Handle other characteristics
52
62
  try {
63
+ // debug('Setting value for', message.payload);
53
64
  const result = await this.hbDevice.setCharacteristicsByTypes(filterIfOff(message.payload));
65
+ // debug('Result', result.values);
54
66
  results.push(result.values);
55
67
  } catch (error) {
56
- this.error(`Failed to set value for "${JSON.stringify(message.payload)}": ${error.message}`);
57
- results.push({ 'Error': `Error: ${error.message}` });
68
+ this.error(`${error.message} for ${JSON.stringify(message.payload)}`);
69
+ results.push({ Error: `${error.message} for ${JSON.stringify(message.payload)}` });
58
70
  fill = 'red';
59
71
  this.hbConfigNode.disconnectClientNodes(this.hbDevice.instance);
60
72
  }
@@ -54,37 +54,6 @@
54
54
  "macAddress": "",
55
55
  "debug": true
56
56
  },
57
- {
58
- "id": "df5dd49178c517fa",
59
- "type": "mqtt-broker",
60
- "name": "",
61
- "broker": "mqtt.local",
62
- "port": "1883",
63
- "clientid": "",
64
- "autoConnect": true,
65
- "usetls": false,
66
- "protocolVersion": "4",
67
- "keepalive": "60",
68
- "cleansession": true,
69
- "autoUnsubscribe": true,
70
- "birthTopic": "",
71
- "birthQos": "0",
72
- "birthRetain": "false",
73
- "birthPayload": "",
74
- "birthMsg": {},
75
- "closeTopic": "",
76
- "closeQos": "0",
77
- "closeRetain": "false",
78
- "closePayload": "",
79
- "closeMsg": {},
80
- "willTopic": "",
81
- "willQos": "0",
82
- "willRetain": "false",
83
- "willPayload": "",
84
- "willMsg": {},
85
- "userProps": "",
86
- "sessionExpiry": ""
87
- },
88
57
  {
89
58
  "id": "902c5887b6877df6",
90
59
  "type": "debug",
@@ -2629,28 +2598,41 @@
2629
2598
  ]
2630
2599
  },
2631
2600
  {
2632
- "id": "5a0779448d4dcdb3",
2633
- "type": "mqtt in",
2601
+ "id": "50af5bb963e4a186",
2602
+ "type": "hb-resume",
2634
2603
  "z": "4138921fd7b9a926",
2635
- "name": "",
2636
- "topic": "home/#",
2637
- "qos": "2",
2638
- "datatype": "auto-detect",
2639
- "broker": "df5dd49178c517fa",
2640
- "nl": false,
2641
- "rap": true,
2642
- "rh": 0,
2643
- "inputs": 0,
2644
- "x": 130,
2645
- "y": 180,
2604
+ "name": "Floor Lamp One",
2605
+ "Homebridge": "homebridge",
2606
+ "Manufacturer": "Signify Netherlands B.V.",
2607
+ "Service": "Lightbulb",
2608
+ "device": "homebridgeCC:22:3D:E3:CF:33Signify Netherlands B.V.Floor Lamp One00000043",
2609
+ "conf": "7e647d67.f33acc",
2610
+ "x": 500,
2611
+ "y": 80,
2646
2612
  "wires": [
2647
2613
  [
2648
- "4510eba830da4c9d"
2614
+ "8ba7a5a4aa28dc2f",
2615
+ "29580d01ef2e651d"
2649
2616
  ]
2650
2617
  ]
2651
2618
  },
2652
2619
  {
2653
- "id": "d82488396ae950bf",
2620
+ "id": "8ba7a5a4aa28dc2f",
2621
+ "type": "hb-control",
2622
+ "z": "4138921fd7b9a926",
2623
+ "name": "Floor Lamp One",
2624
+ "Homebridge": "homebridge",
2625
+ "Manufacturer": "Signify Netherlands B.V.",
2626
+ "Service": "Lightbulb",
2627
+ "device": "homebridgeCC:22:3D:E3:CF:33Signify Netherlands B.V.Floor Lamp One00000043",
2628
+ "conf": "7e647d67.f33acc",
2629
+ "outputs": 0,
2630
+ "x": 720,
2631
+ "y": 80,
2632
+ "wires": []
2633
+ },
2634
+ {
2635
+ "id": "29580d01ef2e651d",
2654
2636
  "type": "debug",
2655
2637
  "z": "4138921fd7b9a926",
2656
2638
  "name": "debug 17",
@@ -2660,141 +2642,255 @@
2660
2642
  "tostatus": true,
2661
2643
  "complete": "payload",
2662
2644
  "targetType": "msg",
2663
- "statusVal": "device",
2664
- "statusType": "msg",
2645
+ "statusVal": "payload",
2646
+ "statusType": "auto",
2665
2647
  "x": 720,
2666
2648
  "y": 140,
2667
2649
  "wires": []
2668
2650
  },
2669
2651
  {
2670
- "id": "6f6d507ccce7460f",
2671
- "type": "switch",
2652
+ "id": "b3c8e4dcd5b62de4",
2653
+ "type": "inject",
2672
2654
  "z": "4138921fd7b9a926",
2673
2655
  "name": "",
2674
- "property": "shortTopic",
2675
- "propertyType": "msg",
2676
- "rules": [
2656
+ "props": [
2677
2657
  {
2678
- "t": "eq",
2679
- "v": "SYStoMQTT",
2680
- "vt": "str"
2658
+ "p": "payload"
2681
2659
  },
2682
2660
  {
2683
- "t": "eq",
2684
- "v": "version",
2661
+ "p": "topic",
2685
2662
  "vt": "str"
2663
+ }
2664
+ ],
2665
+ "repeat": "",
2666
+ "crontab": "",
2667
+ "once": false,
2668
+ "onceDelay": 0.1,
2669
+ "topic": "",
2670
+ "payload": "{\"On\": true}",
2671
+ "payloadType": "json",
2672
+ "x": 170,
2673
+ "y": 80,
2674
+ "wires": [
2675
+ [
2676
+ "50af5bb963e4a186"
2677
+ ]
2678
+ ]
2679
+ },
2680
+ {
2681
+ "id": "a74ef133a980c5f3",
2682
+ "type": "inject",
2683
+ "z": "4138921fd7b9a926",
2684
+ "name": "",
2685
+ "props": [
2686
+ {
2687
+ "p": "payload"
2686
2688
  },
2687
2689
  {
2688
- "t": "eq",
2689
- "v": "LWT",
2690
+ "p": "topic",
2690
2691
  "vt": "str"
2692
+ }
2693
+ ],
2694
+ "repeat": "",
2695
+ "crontab": "",
2696
+ "once": false,
2697
+ "onceDelay": 0.1,
2698
+ "topic": "",
2699
+ "payload": "{\"On\": false}",
2700
+ "payloadType": "json",
2701
+ "x": 170,
2702
+ "y": 140,
2703
+ "wires": [
2704
+ [
2705
+ "50af5bb963e4a186"
2706
+ ]
2707
+ ]
2708
+ },
2709
+ {
2710
+ "id": "1e6b8797f5279a1f",
2711
+ "type": "inject",
2712
+ "z": "4138921fd7b9a926",
2713
+ "name": "{\"Brightness\":40,\"On\":true,\"ColorTemperature\":242}",
2714
+ "props": [
2715
+ {
2716
+ "p": "payload"
2691
2717
  },
2692
2718
  {
2693
- "t": "else"
2719
+ "p": "topic",
2720
+ "vt": "str"
2694
2721
  }
2695
2722
  ],
2696
- "checkall": "false",
2697
- "repair": false,
2698
- "outputs": 4,
2699
- "x": 530,
2700
- "y": 180,
2723
+ "repeat": "",
2724
+ "crontab": "",
2725
+ "once": false,
2726
+ "onceDelay": 0.1,
2727
+ "topic": "",
2728
+ "payload": "{\"Brightness\":40,\"On\":true,\"ColorTemperature\":242}",
2729
+ "payloadType": "json",
2730
+ "x": 290,
2731
+ "y": 260,
2701
2732
  "wires": [
2702
2733
  [
2703
- "d82488396ae950bf"
2704
- ],
2705
- [],
2706
- [
2707
- "1649c3dc535b26f2"
2708
- ],
2734
+ "50af5bb963e4a186"
2735
+ ]
2736
+ ]
2737
+ },
2738
+ {
2739
+ "id": "4bb2bae9fe4ffbbb",
2740
+ "type": "hb-status",
2741
+ "z": "4138921fd7b9a926",
2742
+ "name": "Floor Lamp One",
2743
+ "Homebridge": "homebridge",
2744
+ "Manufacturer": "Signify Netherlands B.V.",
2745
+ "Service": "Lightbulb",
2746
+ "device": "homebridgeCC:22:3D:E3:CF:33Signify Netherlands B.V.Floor Lamp One00000043",
2747
+ "conf": "7e647d67.f33acc",
2748
+ "x": 300,
2749
+ "y": 440,
2750
+ "wires": [
2709
2751
  [
2710
- "d7a34617ef5e9f31"
2752
+ "96ad615138d1254e"
2711
2753
  ]
2712
2754
  ]
2713
2755
  },
2714
2756
  {
2715
- "id": "45cb1d621afc9b52",
2757
+ "id": "96ad615138d1254e",
2716
2758
  "type": "debug",
2717
2759
  "z": "4138921fd7b9a926",
2718
2760
  "name": "debug 18",
2719
- "active": false,
2761
+ "active": true,
2720
2762
  "tosidebar": true,
2721
2763
  "console": false,
2722
2764
  "tostatus": true,
2723
- "complete": "true",
2724
- "targetType": "full",
2725
- "statusVal": "topic",
2765
+ "complete": "payload",
2766
+ "targetType": "msg",
2767
+ "statusVal": "payload",
2726
2768
  "statusType": "auto",
2727
- "x": 320,
2728
- "y": 360,
2769
+ "x": 520,
2770
+ "y": 400,
2729
2771
  "wires": []
2730
2772
  },
2731
2773
  {
2732
- "id": "4510eba830da4c9d",
2733
- "type": "function",
2774
+ "id": "7b085aa32101811e",
2775
+ "type": "hb-event",
2734
2776
  "z": "4138921fd7b9a926",
2735
- "name": "function 3",
2736
- "func": "const [home, device, shortTopic] = msg.topic.split(\"/\");\nmsg.shortTopic = shortTopic;\nmsg.device = device;\nreturn msg;",
2737
- "outputs": 1,
2738
- "timeout": 0,
2739
- "noerr": 0,
2740
- "initialize": "",
2741
- "finalize": "",
2742
- "libs": [],
2743
- "x": 320,
2744
- "y": 180,
2777
+ "name": "Floor Lamp One",
2778
+ "Homebridge": "homebridge",
2779
+ "Manufacturer": "Signify Netherlands B.V.",
2780
+ "Service": "Lightbulb",
2781
+ "device": "homebridgeCC:22:3D:E3:CF:33Signify Netherlands B.V.Floor Lamp One00000043",
2782
+ "conf": "7e647d67.f33acc",
2783
+ "sendInitialState": true,
2784
+ "x": 300,
2785
+ "y": 360,
2786
+ "wires": [
2787
+ [
2788
+ "96ad615138d1254e"
2789
+ ]
2790
+ ]
2791
+ },
2792
+ {
2793
+ "id": "247bb4b9017d5ed3",
2794
+ "type": "catch",
2795
+ "z": "4138921fd7b9a926",
2796
+ "name": "",
2797
+ "scope": null,
2798
+ "uncaught": false,
2799
+ "x": 280,
2800
+ "y": 520,
2745
2801
  "wires": [
2746
2802
  [
2747
- "6f6d507ccce7460f",
2748
- "45cb1d621afc9b52"
2803
+ "ecfe37f30b4b452f"
2749
2804
  ]
2750
2805
  ]
2751
2806
  },
2752
2807
  {
2753
- "id": "d7a34617ef5e9f31",
2808
+ "id": "ecfe37f30b4b452f",
2754
2809
  "type": "debug",
2755
2810
  "z": "4138921fd7b9a926",
2756
2811
  "name": "debug 19",
2757
- "active": false,
2812
+ "active": true,
2758
2813
  "tosidebar": true,
2759
2814
  "console": false,
2760
2815
  "tostatus": true,
2761
2816
  "complete": "payload",
2762
2817
  "targetType": "msg",
2763
- "statusVal": "shortTopic",
2764
- "statusType": "msg",
2765
- "x": 720,
2766
- "y": 260,
2818
+ "statusVal": "payload",
2819
+ "statusType": "auto",
2820
+ "x": 540,
2821
+ "y": 520,
2767
2822
  "wires": []
2768
2823
  },
2769
2824
  {
2770
- "id": "1649c3dc535b26f2",
2825
+ "id": "f775ab948cea1532",
2826
+ "type": "status",
2827
+ "z": "4138921fd7b9a926",
2828
+ "name": "",
2829
+ "scope": null,
2830
+ "x": 280,
2831
+ "y": 580,
2832
+ "wires": [
2833
+ []
2834
+ ]
2835
+ },
2836
+ {
2837
+ "id": "dd3e9950ef4f1482",
2771
2838
  "type": "debug",
2772
2839
  "z": "4138921fd7b9a926",
2773
2840
  "name": "debug 20",
2774
- "active": false,
2841
+ "active": true,
2775
2842
  "tosidebar": true,
2776
2843
  "console": false,
2777
2844
  "tostatus": true,
2778
- "complete": "payload",
2779
- "targetType": "msg",
2780
- "statusVal": "device",
2781
- "statusType": "msg",
2782
- "x": 720,
2783
- "y": 200,
2845
+ "complete": "true",
2846
+ "targetType": "full",
2847
+ "statusVal": "payload",
2848
+ "statusType": "auto",
2849
+ "x": 540,
2850
+ "y": 580,
2784
2851
  "wires": []
2785
2852
  },
2853
+ {
2854
+ "id": "64d1e3d573689b65",
2855
+ "type": "inject",
2856
+ "z": "4138921fd7b9a926",
2857
+ "name": "",
2858
+ "props": [
2859
+ {
2860
+ "p": "payload"
2861
+ },
2862
+ {
2863
+ "p": "topic",
2864
+ "vt": "str"
2865
+ }
2866
+ ],
2867
+ "repeat": "",
2868
+ "crontab": "",
2869
+ "once": false,
2870
+ "onceDelay": 0.1,
2871
+ "topic": "",
2872
+ "payload": "{\"ColorTemperature\": false}",
2873
+ "payloadType": "json",
2874
+ "x": 150,
2875
+ "y": 200,
2876
+ "wires": [
2877
+ [
2878
+ "8ba7a5a4aa28dc2f"
2879
+ ]
2880
+ ]
2881
+ },
2786
2882
  {
2787
2883
  "id": "6df154716efd4949",
2788
2884
  "type": "hb-event",
2789
2885
  "z": "92f59d974b9c8a86",
2790
- "name": "Side door",
2791
- "Homebridge": "homebridge",
2792
- "Manufacturer": "Eufy",
2886
+ "name": "North Sidewalk 6EED",
2887
+ "Homebridge": "ECI-T24F2",
2888
+ "Manufacturer": "HikVision",
2793
2889
  "Service": "MotionSensor",
2794
- "device": "homebridge0E:89:A7:DA:D3:21EufySide door00000085",
2890
+ "device": "ECI-T24F28E:88:AB:7A:D0:54HikVisionNorth Sidewalk 6EED00000085",
2795
2891
  "conf": "7e647d67.f33acc",
2796
2892
  "sendInitialState": true,
2797
- "x": 100,
2893
+ "x": 140,
2798
2894
  "y": 220,
2799
2895
  "wires": [
2800
2896
  [
@@ -2820,7 +2916,7 @@
2820
2916
  "checkall": "true",
2821
2917
  "repair": false,
2822
2918
  "outputs": 1,
2823
- "x": 270,
2919
+ "x": 370,
2824
2920
  "y": 220,
2825
2921
  "wires": [
2826
2922
  [
@@ -2847,7 +2943,7 @@
2847
2943
  "from": "",
2848
2944
  "to": "",
2849
2945
  "reg": false,
2850
- "x": 460,
2946
+ "x": 540,
2851
2947
  "y": 220,
2852
2948
  "wires": [
2853
2949
  [
@@ -2859,14 +2955,14 @@
2859
2955
  "id": "769d2de2c6bd3544",
2860
2956
  "type": "hb-control",
2861
2957
  "z": "92f59d974b9c8a86",
2862
- "name": "Side door",
2863
- "Homebridge": "homebridge",
2864
- "Manufacturer": "Eufy",
2958
+ "name": "North Sidewalk 6EED",
2959
+ "Homebridge": "ECI-T24F2",
2960
+ "Manufacturer": "HikVision",
2865
2961
  "Service": "CameraRTPStreamManagement",
2866
- "device": "homebridge0E:89:A7:DA:D3:21EufySide door00000110",
2962
+ "device": "ECI-T24F28E:88:AB:7A:D0:54HikVisionNorth Sidewalk 6EED00000110",
2867
2963
  "conf": "7e647d67.f33acc",
2868
2964
  "outputs": 1,
2869
- "x": 660,
2965
+ "x": 760,
2870
2966
  "y": 220,
2871
2967
  "wires": [
2872
2968
  [
@@ -2881,13 +2977,13 @@
2881
2977
  "name": "debug 21",
2882
2978
  "active": true,
2883
2979
  "tosidebar": true,
2884
- "console": false,
2980
+ "console": true,
2885
2981
  "tostatus": true,
2886
2982
  "complete": "payload",
2887
2983
  "targetType": "msg",
2888
2984
  "statusVal": "payload",
2889
2985
  "statusType": "auto",
2890
- "x": 840,
2986
+ "x": 850,
2891
2987
  "y": 280,
2892
2988
  "wires": []
2893
2989
  },
@@ -2928,7 +3024,7 @@
2928
3024
  "checkall": "true",
2929
3025
  "repair": false,
2930
3026
  "outputs": 1,
2931
- "x": 270,
3027
+ "x": 330,
2932
3028
  "y": 340,
2933
3029
  "wires": [
2934
3030
  [
@@ -2955,7 +3051,7 @@
2955
3051
  "from": "",
2956
3052
  "to": "",
2957
3053
  "reg": false,
2958
- "x": 460,
3054
+ "x": 540,
2959
3055
  "y": 340,
2960
3056
  "wires": [
2961
3057
  [
@@ -2974,7 +3070,7 @@
2974
3070
  "device": "ECI-T24F2CB:6F:94:DD:43:77HikVisionDriveway 8E5200000110",
2975
3071
  "conf": "7e647d67.f33acc",
2976
3072
  "outputs": 1,
2977
- "x": 680,
3073
+ "x": 740,
2978
3074
  "y": 340,
2979
3075
  "wires": [
2980
3076
  [
@@ -3018,13 +3114,13 @@
3018
3114
  "name": "debug 22",
3019
3115
  "active": true,
3020
3116
  "tosidebar": true,
3021
- "console": false,
3117
+ "console": true,
3022
3118
  "tostatus": true,
3023
3119
  "complete": "payload",
3024
3120
  "targetType": "msg",
3025
3121
  "statusVal": "payload",
3026
3122
  "statusType": "auto",
3027
- "x": 700,
3123
+ "x": 710,
3028
3124
  "y": 500,
3029
3125
  "wires": []
3030
3126
  },
@@ -3056,5 +3152,115 @@
3056
3152
  "d376945f7d6314f9"
3057
3153
  ]
3058
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
+ ]
3059
3265
  }
3060
3266
  ]