@homebridge-plugins/homebridge-august 3.3.0-beta.0 → 3.3.0-beta.2

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.
Files changed (74) hide show
  1. package/CHANGELOG.md +19 -14
  2. package/CLAUDE.md +48 -0
  3. package/README.md +39 -27
  4. package/config.schema.json +48 -3
  5. package/dist/Platform.HAP.d.ts +139 -20
  6. package/dist/Platform.HAP.d.ts.map +1 -1
  7. package/dist/Platform.HAP.js +732 -46
  8. package/dist/Platform.HAP.js.map +1 -1
  9. package/dist/connectivity-manager.d.ts +3 -3
  10. package/dist/connectivity-manager.d.ts.map +1 -1
  11. package/dist/connectivity-manager.js +14 -57
  12. package/dist/connectivity-manager.js.map +1 -1
  13. package/dist/devices/device.d.ts +16 -5
  14. package/dist/devices/device.d.ts.map +1 -1
  15. package/dist/devices/device.js +75 -18
  16. package/dist/devices/device.js.map +1 -1
  17. package/dist/devices/device.test.d.ts +2 -0
  18. package/dist/devices/device.test.d.ts.map +1 -0
  19. package/dist/devices/device.test.js +294 -0
  20. package/dist/devices/device.test.js.map +1 -0
  21. package/dist/devices/lock.d.ts +3 -3
  22. package/dist/devices/lock.d.ts.map +1 -1
  23. package/dist/devices/lock.js +41 -41
  24. package/dist/devices/lock.js.map +1 -1
  25. package/dist/index.js +4 -4
  26. package/dist/index.js.map +1 -1
  27. package/dist/platform.matter.d.ts +26 -18
  28. package/dist/platform.matter.d.ts.map +1 -1
  29. package/dist/platform.matter.js +95 -76
  30. package/dist/platform.matter.js.map +1 -1
  31. package/dist/settings.d.ts +1 -0
  32. package/dist/settings.d.ts.map +1 -1
  33. package/package.json +37 -32
  34. package/test/connectivity-manager.test.ts +592 -0
  35. package/test/platform.matter.test.ts +660 -0
  36. package/test/platform.polling.test.ts +5 -5
  37. package/test/{platform.hap.test.ts → platform.test.ts} +23 -23
  38. package/.github/FUNDING.yml +0 -4
  39. package/.github/ISSUE_TEMPLATE/bug-report.yml +0 -97
  40. package/.github/ISSUE_TEMPLATE/config.yml +0 -8
  41. package/.github/ISSUE_TEMPLATE/feature-request.yml +0 -38
  42. package/.github/ISSUE_TEMPLATE/support-request.yml +0 -85
  43. package/.github/ISSUE_TEMPLATE.md +0 -48
  44. package/.github/PULL_REQUEST_TEMPLATE/pull_request.md +0 -27
  45. package/.github/copilot-instructions.md +0 -200
  46. package/.github/dependabot.yml +0 -17
  47. package/.github/labeler.yml +0 -38
  48. package/.github/npm-version-script-esm.js +0 -97
  49. package/.github/workflows/release.yml +0 -169
  50. package/.github/workflows/stale.yml +0 -12
  51. package/SECURITY.md +0 -19
  52. package/branding/Homebridge_x_August.svg +0 -32
  53. package/branding/icon.png +0 -0
  54. package/dist/Platform.Base.d.ts +0 -288
  55. package/dist/Platform.Base.d.ts.map +0 -1
  56. package/dist/Platform.Base.js +0 -797
  57. package/dist/Platform.Base.js.map +0 -1
  58. package/dist/package.json +0 -85
  59. package/docs/.nojekyll +0 -1
  60. package/docs/assets/hierarchy.js +0 -1
  61. package/docs/assets/highlight.css +0 -22
  62. package/docs/assets/icons.js +0 -18
  63. package/docs/assets/icons.svg +0 -1
  64. package/docs/assets/main.js +0 -60
  65. package/docs/assets/navigation.js +0 -1
  66. package/docs/assets/search.js +0 -1
  67. package/docs/assets/style.css +0 -1633
  68. package/docs/hierarchy.html +0 -1
  69. package/docs/index.html +0 -44
  70. package/docs/modules.html +0 -1
  71. package/docs/variables/default.html +0 -1
  72. package/eslint.config.js +0 -47
  73. package/test/device.test.ts +0 -384
  74. package/vitest.config.ts +0 -8
@@ -10,7 +10,7 @@ import { readFileSync, writeFileSync } from 'node:fs'
10
10
 
11
11
  import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
12
12
 
13
- import { AugustPlatformHAP } from '../src/Platform.HAP.js'
13
+ import { AugustPlatform } from '../src/Platform.HAP.js'
14
14
 
15
15
  // Mock the august-yale module
16
16
  vi.mock('august-yale', () => {
@@ -37,7 +37,7 @@ vi.mock('node:fs', () => ({
37
37
  }))
38
38
 
39
39
  describe('augustPlatform', () => {
40
- let platform: AugustPlatformHAP
40
+ let platform: AugustPlatform
41
41
  let mockApi: API
42
42
  let mockLog: Logging
43
43
  let mockConfig: AugustPlatformConfig
@@ -110,7 +110,7 @@ describe('augustPlatform', () => {
110
110
  },
111
111
  }
112
112
 
113
- platform = new AugustPlatformHAP(mockLog, config, mockApi)
113
+ platform = new AugustPlatform(mockLog, config, mockApi)
114
114
 
115
115
  // Access the private method for testing
116
116
  const normalizeMethod = (platform as any).normalizeCredentialsForApi.bind(platform)
@@ -137,7 +137,7 @@ describe('augustPlatform', () => {
137
137
  },
138
138
  }
139
139
 
140
- platform = new AugustPlatformHAP(mockLog, config, mockApi)
140
+ platform = new AugustPlatform(mockLog, config, mockApi)
141
141
 
142
142
  // Access the private method for testing
143
143
  const normalizeMethod = (platform as any).normalizeCredentialsForApi.bind(platform)
@@ -165,7 +165,7 @@ describe('augustPlatform', () => {
165
165
  },
166
166
  }
167
167
 
168
- platform = new AugustPlatformHAP(mockLog, config, mockApi)
168
+ platform = new AugustPlatform(mockLog, config, mockApi)
169
169
 
170
170
  // Access the private method for testing
171
171
  const normalizeMethod = (platform as any).normalizeCredentialsForApi.bind(platform)
@@ -192,7 +192,7 @@ describe('augustPlatform', () => {
192
192
  },
193
193
  }
194
194
 
195
- platform = new AugustPlatformHAP(mockLog, config, mockApi)
195
+ platform = new AugustPlatform(mockLog, config, mockApi)
196
196
 
197
197
  // Access the private method for testing
198
198
  const normalizeMethod = (platform as any).normalizeCredentialsForApi.bind(platform)
@@ -217,7 +217,7 @@ describe('augustPlatform', () => {
217
217
  },
218
218
  }
219
219
 
220
- platform = new AugustPlatformHAP(mockLog, config, mockApi)
220
+ platform = new AugustPlatform(mockLog, config, mockApi)
221
221
 
222
222
  // Access the private method for testing
223
223
  const normalizeMethod = (platform as any).normalizeCredentialsForApi.bind(platform)
@@ -245,7 +245,7 @@ describe('augustPlatform', () => {
245
245
  },
246
246
  }
247
247
 
248
- platform = new AugustPlatformHAP(mockLog, config, mockApi)
248
+ platform = new AugustPlatform(mockLog, config, mockApi)
249
249
 
250
250
  // Access the private method for testing
251
251
  const normalizeMethod = (platform as any).normalizeCredentialsForApi.bind(platform)
@@ -277,7 +277,7 @@ describe('augustPlatform', () => {
277
277
  },
278
278
  }
279
279
 
280
- platform = new AugustPlatformHAP(mockLog, config, mockApi)
280
+ platform = new AugustPlatform(mockLog, config, mockApi)
281
281
 
282
282
  // Test the public method
283
283
  const normalizedCredentials = await platform.getNormalizedCredentials()
@@ -302,7 +302,7 @@ describe('augustPlatform', () => {
302
302
  },
303
303
  }
304
304
 
305
- platform = new AugustPlatformHAP(mockLog, config, mockApi)
305
+ platform = new AugustPlatform(mockLog, config, mockApi)
306
306
 
307
307
  // Access the private method for testing
308
308
  const normalizeMethod = (platform as any).normalizeCredentialsForApi.bind(platform)
@@ -327,7 +327,7 @@ describe('augustPlatform', () => {
327
327
  },
328
328
  }
329
329
 
330
- platform = new AugustPlatformHAP(mockLog, config, mockApi)
330
+ platform = new AugustPlatform(mockLog, config, mockApi)
331
331
 
332
332
  // First call should normalize and cache
333
333
  const firstCall = await platform.getNormalizedCredentials()
@@ -346,7 +346,7 @@ describe('augustPlatform', () => {
346
346
  describe('discoverDevices', () => {
347
347
  it('should handle 401 authentication errors and trigger re-authentication', async () => {
348
348
  // Create platform instance
349
- platform = new AugustPlatformHAP(mockLog, mockConfig, mockApi)
349
+ platform = new AugustPlatform(mockLog, mockConfig, mockApi)
350
350
 
351
351
  // Mock August.details to throw 401 error
352
352
  const August = await import('august-yale')
@@ -370,7 +370,7 @@ describe('augustPlatform', () => {
370
370
 
371
371
  it('should handle "unauthorized" errors and trigger re-authentication', async () => {
372
372
  // Create platform instance
373
- platform = new AugustPlatformHAP(mockLog, mockConfig, mockApi)
373
+ platform = new AugustPlatform(mockLog, mockConfig, mockApi)
374
374
 
375
375
  // Mock August.details to throw unauthorized error
376
376
  const August = await import('august-yale')
@@ -391,7 +391,7 @@ describe('augustPlatform', () => {
391
391
 
392
392
  it('should re-throw non-authentication errors', async () => {
393
393
  // Create platform instance
394
- platform = new AugustPlatformHAP(mockLog, mockConfig, mockApi)
394
+ platform = new AugustPlatform(mockLog, mockConfig, mockApi)
395
395
 
396
396
  // Mock August.details to throw non-401 error
397
397
  const August = await import('august-yale')
@@ -405,7 +405,7 @@ describe('augustPlatform', () => {
405
405
 
406
406
  it('should process devices successfully when no errors occur', async () => {
407
407
  // Create platform instance
408
- platform = new AugustPlatformHAP(mockLog, mockConfig, mockApi)
408
+ platform = new AugustPlatform(mockLog, mockConfig, mockApi)
409
409
 
410
410
  // Mock successful August.details response
411
411
  const August = await import('august-yale')
@@ -440,7 +440,7 @@ describe('augustPlatform', () => {
440
440
  },
441
441
  }
442
442
 
443
- platform = new AugustPlatformHAP(mockLog, configWithExcludes, mockApi)
443
+ platform = new AugustPlatform(mockLog, configWithExcludes, mockApi)
444
444
 
445
445
  const August = await import('august-yale')
446
446
  const mockDeviceIncluded = { lockId: 'included-lock-id', LockName: 'Included Lock' } as any
@@ -465,7 +465,7 @@ describe('augustPlatform', () => {
465
465
  },
466
466
  }
467
467
 
468
- platform = new AugustPlatformHAP(mockLog, configWithExcludes, mockApi)
468
+ platform = new AugustPlatform(mockLog, configWithExcludes, mockApi)
469
469
 
470
470
  const August = await import('august-yale')
471
471
  const mockDeviceIncluded = { lockId: 'included-lock-id', LockName: 'Included Lock' } as any
@@ -492,7 +492,7 @@ describe('augustPlatform', () => {
492
492
  // Make uuid.generate return predictable UUIDs based on input
493
493
  vi.mocked(mockApi.hap.uuid.generate).mockImplementation((input: any) => `uuid-${input}`)
494
494
 
495
- platform = new AugustPlatformHAP(mockLog, configWithExcludes, mockApi)
495
+ platform = new AugustPlatform(mockLog, configWithExcludes, mockApi)
496
496
 
497
497
  // Simulate a cached accessory for the excluded lock
498
498
  const mockAccessory = {
@@ -528,7 +528,7 @@ describe('augustPlatform', () => {
528
528
  },
529
529
  }
530
530
 
531
- platform = new AugustPlatformHAP(mockLog, configWithEmptyExcludes, mockApi)
531
+ platform = new AugustPlatform(mockLog, configWithEmptyExcludes, mockApi)
532
532
 
533
533
  const August = await import('august-yale')
534
534
  const mockDeviceA = { lockId: 'lock-a', LockName: 'Lock A' } as any
@@ -554,7 +554,7 @@ describe('augustPlatform', () => {
554
554
  },
555
555
  }
556
556
 
557
- platform = new AugustPlatformHAP(mockLog, configWithBoth, mockApi)
557
+ platform = new AugustPlatform(mockLog, configWithBoth, mockApi)
558
558
 
559
559
  const August = await import('august-yale')
560
560
  const mockDeviceIncluded = { lockId: 'included-lock-id', LockName: 'Included Lock' } as any
@@ -585,7 +585,7 @@ describe('augustPlatform', () => {
585
585
 
586
586
  vi.mocked(readFileSync).mockReturnValue(JSON.stringify(mockConfigFile))
587
587
 
588
- platform = new AugustPlatformHAP(mockLog, mockConfig, mockApi)
588
+ platform = new AugustPlatform(mockLog, mockConfig, mockApi)
589
589
 
590
590
  // This should not throw an error when trying to set installId
591
591
  await expect(platform.validated()).resolves.toBeUndefined()
@@ -605,7 +605,7 @@ describe('augustPlatform', () => {
605
605
 
606
606
  vi.mocked(readFileSync).mockReturnValue(JSON.stringify(mockConfigFile))
607
607
 
608
- platform = new AugustPlatformHAP(mockLog, mockConfig, mockApi)
608
+ platform = new AugustPlatform(mockLog, mockConfig, mockApi)
609
609
 
610
610
  // This should not throw an error when trying to set installId
611
611
  await expect(platform.validated()).resolves.toBeUndefined()
@@ -625,7 +625,7 @@ describe('augustPlatform', () => {
625
625
 
626
626
  vi.mocked(readFileSync).mockReturnValue(JSON.stringify(mockConfigFile))
627
627
 
628
- platform = new AugustPlatformHAP(mockLog, mockConfig, mockApi)
628
+ platform = new AugustPlatform(mockLog, mockConfig, mockApi)
629
629
 
630
630
  await platform.validated()
631
631
 
@@ -1,4 +0,0 @@
1
- # These are supported funding model platforms
2
-
3
- github: donavanbecker
4
- custom: paypal.me/DonavanBecker
@@ -1,97 +0,0 @@
1
- name: Bug-Report
2
- description: Report a Bug to help us improve
3
- title: "Bug:"
4
- labels: [bug]
5
- assignees: 'donavanbecker'
6
- body:
7
- - type: markdown
8
- attributes:
9
- value: |
10
- You must use the issue template below when submitting a bug.
11
- - type: input
12
- attributes:
13
- label: Describe The Bug
14
- placeholder: A clear and concise description of what the bug is.
15
- validations:
16
- required: true
17
- - type: input
18
- attributes:
19
- label: To Reproduce
20
- placeholder: Steps to reproduce the behavior.
21
- validations:
22
- required: true
23
- - type: input
24
- attributes:
25
- label: Expected behavior
26
- placeholder: A clear and concise description of what you expected to happen.
27
- validations:
28
- required: true
29
- - type: textarea
30
- id: Logs
31
- attributes:
32
- label: Relevant log output
33
- placeholder: Bug reports that do not contain logs may be closed without warning. Show the Homebridge logs here. If using Homebridge Config-UI-X, you can easly download your log by visiting the log page on the UI and Clicking the Download Icon in the top right. Remove any sensitive information, such as your homebridge-august refreshToken. Please Turn on Debug Mode before submitting your Issue so more logs can be shared to fix the issue being submitted.
34
- render: shell
35
- validations:
36
- required: true
37
- - type: textarea
38
- id: Config
39
- attributes:
40
- label: Config for homebridge-august
41
- placeholder: Paste your homebridge config.json here. Remove any sensitive information, such as your homebridge-august consumerKey/ consumerSecret / refreshToken.
42
- render: shell
43
- validations:
44
- required: true
45
- - type: textarea
46
- attributes:
47
- label: Screenshots
48
- description: If applicable add screenshots to help explain your problem.
49
- placeholder: You can attach images or log files by clicking this area to highlight it and then dragging files in.
50
- validations:
51
- required: false
52
- - type: input
53
- attributes:
54
- label: Device & Model
55
- placeholder: If applicable, add screenshots to help explain your problem.
56
- validations:
57
- required: true
58
- - type: markdown
59
- attributes:
60
- value: |
61
- Environment
62
- - type: input
63
- attributes:
64
- label: Node.js Version
65
- placeholder: v14.17.6
66
- validations:
67
- required: true
68
- - type: input
69
- attributes:
70
- label: NPM Version
71
- placeholder: v7.22.0
72
- validations:
73
- required: true
74
- - type: input
75
- attributes:
76
- label: Homebridge Version
77
- placeholder: If applicable, add screenshots to help explain your problem.
78
- validations:
79
- required: true
80
- - type: input
81
- attributes:
82
- label: Homebridge August Plugin Version
83
- placeholder: v10.0.1
84
- validations:
85
- required: true
86
- - type: input
87
- attributes:
88
- label: Homebridge Config UI X Plugin Version
89
- placeholder: v4.41.2
90
- validations:
91
- required: false
92
- - type: input
93
- attributes:
94
- label: Operating System
95
- placeholder: Raspbian / Ubuntu / Debian / Windows / macOS / Docker
96
- validations:
97
- required: true
@@ -1,8 +0,0 @@
1
- blank_issues_enabled: false
2
- contact_links:
3
- - name: Homebridge Discord Channel for August
4
- url: https://discord.gg/8fpZA4S
5
- about: Please ask and answer questions here.
6
- - name: Homebridge-August - Pull Requests
7
- url: https://github.com/homebridge-plugins/homebridge-august/pulls
8
- about: Please report security vulnerabilities here.
@@ -1,38 +0,0 @@
1
- name: Feature Request
2
- description: Suggest an idea for this project
3
- title: "Feature Request: "
4
- labels: [enhancement]
5
- assignees: 'donavanbecker'
6
- body:
7
- - type: markdown
8
- attributes:
9
- value: |
10
- You must use the issue template below when submitting a feature request.
11
- - type: markdown
12
- attributes:
13
- value: |
14
- Is your feature request related to a problem? Please describe.
15
- - type: input
16
- attributes:
17
- label: Problem
18
- placeholder: A clear and concise description of what the problem is. Ex. I am always frustrated when [...]
19
- validations:
20
- required: false
21
- - type: input
22
- attributes:
23
- label: Solution
24
- placeholder: A clear and concise description of what you want to happen.
25
- validations:
26
- required: true
27
- - type: input
28
- attributes:
29
- label: Alternatives
30
- placeholder: A clear and concise description of any alternative solutions or features you have considered.
31
- validations:
32
- required: false
33
- - type: input
34
- attributes:
35
- label: Additional context
36
- placeholder: Add any other context or screenshots about the feature request here. Post device logs here.
37
- validations:
38
- required: false
@@ -1,85 +0,0 @@
1
- name: Support Request
2
- description: Need help?
3
- title: "Support Request:"
4
- labels: [question]
5
- assignees: 'donavanbecker'
6
- body:
7
- - type: markdown
8
- attributes:
9
- value: |
10
- You must use the issue template below when submitting a support request.
11
- - type: input
12
- attributes:
13
- label: Describe Your Problem
14
- placeholder: A clear and concise description of what problem you are trying to solve.
15
- validations:
16
- required: true
17
- - type: textarea
18
- id: Logs
19
- attributes:
20
- label: Relevant log output
21
- placeholder: Bug reports that do not contain logs may be closed without warning. Show the Homebridge logs here. If using Homebridge Config-UI-X, you can easly download your log by visiting the log page on the UI and Clicking the Download Icon in the top right. Remove any sensitive information, such as your homebridge-august refreshToken. Please Turn on Debug Mode before submitting your Issue so more logs can be shared to fix the issue being submitted.
22
- render: shell
23
- validations:
24
- required: false
25
- - type: textarea
26
- id: Config
27
- attributes:
28
- label: Config for homebridge-august
29
- placeholder: Paste your homebridge config.json here. Remove any sensitive information, such as your homebridge-august consumerKey/ consumerSecret refreshToken.
30
- render: shell
31
- validations:
32
- required: false
33
- - type: textarea
34
- attributes:
35
- label: Screenshots
36
- description: If applicable add screenshots to help explain your problem.
37
- placeholder: You can attach images or log files by clicking this area to highlight it and then dragging files in.
38
- validations:
39
- required: false
40
- - type: input
41
- attributes:
42
- label: Device & Model
43
- placeholder: If applicable, add screenshots to help explain your problem.
44
- validations:
45
- required: true
46
- - type: markdown
47
- attributes:
48
- value: |
49
- Environment
50
- - type: input
51
- attributes:
52
- label: Node.js Version
53
- placeholder: v14.17.5
54
- validations:
55
- required: true
56
- - type: input
57
- attributes:
58
- label: NPM Version
59
- placeholder: v7.20.5
60
- validations:
61
- required: true
62
- - type: input
63
- attributes:
64
- label: Homebridge Version
65
- placeholder: If applicable, add screenshots to help explain your problem.
66
- validations:
67
- required: true
68
- - type: input
69
- attributes:
70
- label: Homebridge August Plugin Version
71
- placeholder: v10.0.1
72
- validations:
73
- required: true
74
- - type: input
75
- attributes:
76
- label: Homebridge Config UI X Plugin Version
77
- placeholder: v4.41.2
78
- validations:
79
- required: false
80
- - type: input
81
- attributes:
82
- label: Operating System
83
- placeholder: Raspbian / Ubuntu / Debian / Windows / macOS / Docker
84
- validations:
85
- required: true
@@ -1,48 +0,0 @@
1
- ---
2
- name: Bug Report
3
- about: Create a report to help us improve
4
- title: ''
5
- labels: bug
6
- assignees: ''
7
-
8
- ---
9
-
10
- <!-- You must use the issue template below when submitting a bug -->
11
-
12
- **Describe The Bug:**
13
- <!-- A clear and concise description of what the bug is. -->
14
-
15
- **To Reproduce:**
16
- <!-- Steps to reproduce the behavior. -->
17
-
18
- **Expected behavior:**
19
- <!-- A clear and concise description of what you expected to happen. -->
20
-
21
- **Logs:**
22
- <!-- Bug reports that do not contain logs may be closed without warning. -->
23
-
24
- ```
25
- Show the Homebridge / Homebridge Config UI X logs here.
26
- ```
27
-
28
- **Homebridge Config:**
29
-
30
- ```json
31
- Show your homebridge config.json here
32
- ```
33
-
34
- **Screenshots:**
35
- <!-- If applicable, add screenshots to help explain your problem. -->
36
-
37
- **Environment:**
38
-
39
- * **Node.js Version**: <!-- node -v -->
40
- * **NPM Version**: <!-- npm -v -->
41
- * **Homebridge Version**: <!-- homebridge -V -->
42
- * **Homebridge August Plugin Version**:
43
- * **Homebridge Config UI X Version**:
44
- * **Operating System**: Raspbian / Ubuntu / Debian / Windows / macOS / Docker
45
- * **Process Supervisor**: Docker / Systemd / init.d / pm2 / launchctl / hb-service / other / none
46
-
47
-
48
- <!-- Click the "Preview" tab before you submit to ensure the formatting is correct. -->
@@ -1,27 +0,0 @@
1
- ---
2
- name: Enhancement
3
- about: Contribute to Plugin through Pull Request
4
- title: ''
5
- labels: 'enhancement'
6
- assignees: 'donavanbecker'
7
- ---
8
-
9
- **Is your enhancement related to a problem? Please describe.**
10
-
11
- <!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
12
-
13
- **Describe the solution you are addding**
14
-
15
- <!-- A clear and concise description of what you want to happen. -->
16
-
17
- **Changes Proposed in this Pull Request**
18
-
19
- <!-- A clear and concise description of what is being changed. -->
20
-
21
- **Describe alternatives you've considered**
22
-
23
- <!-- A clear and concise description of any alternative solutions or features you've considered. -->
24
-
25
- **Additional context**
26
-
27
- <!-- Add any other context or screenshots about the feature request here. -->