@homebridge-plugins/homebridge-sharkiq 1.4.1-beta.9 → 1.5.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.
- package/CHANGELOG.md +173 -4
- package/README.md +51 -14
- package/config.schema.json +39 -22
- package/dist/SharkIQMatterPlatform.d.ts +80 -0
- package/dist/SharkIQMatterPlatform.d.ts.map +1 -0
- package/dist/SharkIQMatterPlatform.js +266 -0
- package/dist/SharkIQMatterPlatform.js.map +1 -0
- package/dist/config.d.ts +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +5 -4
- package/dist/config.js.map +1 -1
- package/dist/homebridge-ui/public/index.html +123 -2
- package/dist/homebridge-ui/server.js +59 -0
- package/dist/homebridge-ui/server.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/login.d.ts +7 -2
- package/dist/login.d.ts.map +1 -1
- package/dist/login.js +64 -199
- package/dist/login.js.map +1 -1
- package/dist/platform.d.ts.map +1 -1
- package/dist/platform.js +27 -4
- package/dist/platform.js.map +1 -1
- package/dist/settings.d.ts +15 -0
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js +5 -0
- package/dist/settings.js.map +1 -1
- package/dist/sharkiq-js/ayla_api.d.ts.map +1 -1
- package/dist/sharkiq-js/ayla_api.js +11 -2
- package/dist/sharkiq-js/ayla_api.js.map +1 -1
- package/dist/sharkiq-js/const.d.ts +9 -0
- package/dist/sharkiq-js/const.d.ts.map +1 -1
- package/dist/sharkiq-js/const.js +11 -2
- package/dist/sharkiq-js/const.js.map +1 -1
- package/dist/utils.d.ts +19 -1
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +33 -1
- package/dist/utils.js.map +1 -1
- package/docs/assets/icons.js +1 -1
- package/docs/assets/icons.svg +1 -1
- package/docs/assets/main.js +5 -5
- package/docs/assets/navigation.js +1 -0
- package/docs/assets/search.js +1 -0
- package/docs/assets/style.css +248 -226
- package/docs/hierarchy.html +1 -0
- package/docs/index.html +87 -19
- package/docs/modules.html +1 -2
- package/docs/variables/default.html +1 -0
- package/eslint.config.js +6 -8
- package/package.json +16 -31
- package/typedoc.json +0 -4
- package/docs/assets/dmt/dmt-component-data.js +0 -1
- package/docs/assets/dmt/dmt-components.css +0 -20
- package/docs/assets/dmt/dmt-components.js +0 -67
- package/docs/assets/dmt/dmt-search.cmp +0 -0
- package/docs/assets/dmt/dmt-theme.css +0 -1
- package/docs/functions/default.html +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,10 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. This project uses [Semantic Versioning](https://semver.org/)
|
|
4
4
|
|
|
5
|
-
## [1.
|
|
5
|
+
## [1.5.0](https://github.com/homebridge-plugins/homebridge-sharkiq/compare/tag/v1.5.0) (2026-05-04)
|
|
6
6
|
|
|
7
|
-
###
|
|
8
|
-
-
|
|
7
|
+
### Enhancements
|
|
8
|
+
- Add and document Matter and HomeKit integration guidance.
|
|
9
|
+
- Add implementation reference for Home Assistant SharkIQ integration.
|
|
10
|
+
- Add Homebridge UI OAuth Assistant to generate login URL and exchange callback code.
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
- Replace `undici` usage with native Node.js fetch APIs.
|
|
14
|
+
|
|
15
|
+
### Maintenance
|
|
16
|
+
- Remove unused dependencies and type packages.
|
|
17
|
+
- Refresh dependency versions and lockfile metadata.
|
|
18
|
+
- Remove Puppeteer-based login automation dependencies.
|
|
19
|
+
|
|
20
|
+
**Full Changelog**: https://github.com/homebridge-plugins/homebridge-sharkiq/compare/v1.4.1...v1.5.0
|
|
21
|
+
|
|
22
|
+
## [1.4.1](https://github.com/homebridge-plugins/homebridge-sharkiq/compare/tag/v1.4.1) (2025-07-24)
|
|
23
|
+
|
|
24
|
+
### Bug Fixes
|
|
25
|
+
- Improve login and API request stability.
|
|
26
|
+
|
|
27
|
+
### Documentation
|
|
28
|
+
- Clarify OAuth manual login instructions and update setup references.
|
|
29
|
+
|
|
30
|
+
**Full Changelog**: https://github.com/homebridge-plugins/homebridge-sharkiq/compare/v1.4.0...v1.4.1
|
|
9
31
|
|
|
10
32
|
## [1.4.0](https://github.com/homebridge-plugins/homebridge-sharkiq/releases/tag/v1.4.0) (2025-07-17)
|
|
11
33
|
|
|
@@ -14,4 +36,151 @@ All notable changes to this project will be documented in this file. This projec
|
|
|
14
36
|
- Fix JSON parsing errors in SharkIQ API responses [#44](https://github.com/homebridge-plugins/homebridge-sharkiq/pull/44) [@mmenanno](https://github.com/mmenanno)
|
|
15
37
|
- Housekeeping and updated dependencies.
|
|
16
38
|
|
|
17
|
-
**Full Changelog**: https://github.com/homebridge-plugins/homebridge-sharkiq/compare/v1.3.2...v1.4.0
|
|
39
|
+
**Full Changelog**: https://github.com/homebridge-plugins/homebridge-sharkiq/compare/v1.3.2...v1.4.0
|
|
40
|
+
|
|
41
|
+
# ## [1.3.2](https://github.com/homebridge-plugins/homebridge-sharkiq/releases/tag/v1.3.2) (2024-10-29)
|
|
42
|
+
|
|
43
|
+
### What's Changed
|
|
44
|
+
- Show warning messages if manual login is required
|
|
45
|
+
|
|
46
|
+
**Full Changelog**: https://github.com/homebridge-plugins/homebridge-sharkiq/compare/v1.3.1...v1.3.2
|
|
47
|
+
|
|
48
|
+
# ## [1.3.1](https://github.com/homebridge-plugins/homebridge-sharkiq/releases/tag/v1.3.1) (2024-09-29)
|
|
49
|
+
|
|
50
|
+
### What's Changed
|
|
51
|
+
- Development by [@Bubba8291](https://github.com/Bubba8291) in [#21](https://github.com/homebridge-plugins/homebridge-sharkiq/pull/21)
|
|
52
|
+
- Email and password login working again [#18](https://github.com/homebridge-plugins/homebridge-sharkiq/issues/18)
|
|
53
|
+
- Manual login still works as well
|
|
54
|
+
- Homebridge 2.0 support [#22](https://github.com/homebridge-plugins/homebridge-sharkiq/issues/22)
|
|
55
|
+
|
|
56
|
+
**Full Changelog**: https://github.com/homebridge-plugins/homebridge-sharkiq/compare/v1.2.3...v1.3.1
|
|
57
|
+
|
|
58
|
+
# ## [1.2.3](https://github.com/homebridge-plugins/homebridge-sharkiq/releases/tag/v1.2.3) (2024-08-28)
|
|
59
|
+
|
|
60
|
+
### What's Changed
|
|
61
|
+
- Fixed the small chance of get fan speed generating errors
|
|
62
|
+
- Stores the date of the expiration rather than the amount of seconds until the auth token expiration ([#18](https://github.com/homebridge-plugins/homebridge-sharkiq/issues/18))
|
|
63
|
+
|
|
64
|
+
**Full Changelog**: https://github.com/homebridge-plugins/homebridge-sharkiq/compare/v1.2.2...v1.2.3
|
|
65
|
+
|
|
66
|
+
# ## [1.2.2](https://github.com/homebridge-plugins/homebridge-sharkiq/releases/tag/v1.2.2) (2024-08-24)
|
|
67
|
+
|
|
68
|
+
### What's Changed
|
|
69
|
+
- Log location of auth file to user if errors relating to refresh continue
|
|
70
|
+
|
|
71
|
+
**Full Changelog**: https://github.com/homebridge-plugins/homebridge-sharkiq/compare/v1.2.1...v1.2.2
|
|
72
|
+
|
|
73
|
+
# ## [1.2.1](https://github.com/homebridge-plugins/homebridge-sharkiq/releases/tag/v1.2.1) (2024-08-24)
|
|
74
|
+
|
|
75
|
+
### What's Changed
|
|
76
|
+
- Added specific debug error messages from API
|
|
77
|
+
|
|
78
|
+
**Full Changelog**: https://github.com/homebridge-plugins/homebridge-sharkiq/compare/v1.2.0...v1.2.1
|
|
79
|
+
|
|
80
|
+
# ## [1.2.0](https://github.com/homebridge-plugins/homebridge-sharkiq/releases/tag/v1.2.0) (2024-08-19)
|
|
81
|
+
|
|
82
|
+
### What's Changed
|
|
83
|
+
- Switched to new Shark login method [#17](https://github.com/homebridge-plugins/homebridge-sharkiq/issues/17)
|
|
84
|
+
|
|
85
|
+
**Full Changelog**: https://github.com/homebridge-plugins/homebridge-sharkiq/compare/v1.1.3...v1.2.0
|
|
86
|
+
|
|
87
|
+
# ## [1.1.3](https://github.com/homebridge-plugins/homebridge-sharkiq/releases/tag/v1.1.3) (2024-08-10)
|
|
88
|
+
|
|
89
|
+
### What's Changed
|
|
90
|
+
- Make API errors more descriptive
|
|
91
|
+
|
|
92
|
+
**Full Changelog**: https://github.com/homebridge-plugins/homebridge-sharkiq/compare/v1.1.2...v1.1.3
|
|
93
|
+
|
|
94
|
+
# ## [1.1.2](https://github.com/homebridge-plugins/homebridge-sharkiq/releases/tag/v1.1.2) (2023-10-27)
|
|
95
|
+
|
|
96
|
+
### What's Changed
|
|
97
|
+
- Vacuums are now obtained from their device serial numbers (DSN)
|
|
98
|
+
|
|
99
|
+
**Full Changelog**: https://github.com/homebridge-plugins/homebridge-sharkiq/compare/v1.1.1...v1.1.2
|
|
100
|
+
|
|
101
|
+
# ## [1.1.1](https://github.com/homebridge-plugins/homebridge-sharkiq/releases/tag/v1.1.1) (2023-10-25)
|
|
102
|
+
|
|
103
|
+
### What's Changed
|
|
104
|
+
- Added support for the SharkClean European server
|
|
105
|
+
|
|
106
|
+
**Full Changelog**: https://github.com/homebridge-plugins/homebridge-sharkiq/compare/v1.1.0...v1.1.1
|
|
107
|
+
|
|
108
|
+
# ## [1.1.0](https://github.com/homebridge-plugins/homebridge-sharkiq/releases/tag/v1.1.0) (2023-10-09)
|
|
109
|
+
|
|
110
|
+
### What's Changed
|
|
111
|
+
- Fixed an issue where the plugin would slow down Homebridge [#8](https://github.com/homebridge-plugins/homebridge-sharkiq/issues/8)
|
|
112
|
+
- Changed the http client to `node-fetch`
|
|
113
|
+
- Fixed an issue where the vacuum states would not consistently update in Homebridge if controlled from the SharkClean mobile app
|
|
114
|
+
- Heavily optimized the plugin code
|
|
115
|
+
- Added a config option to change the interval on how often the docked status updates
|
|
116
|
+
- Changed the minimum Homebridge version to `1.6.1` [#9](https://github.com/homebridge-plugins/homebridge-sharkiq/pull/9)
|
|
117
|
+
- Updated the plugin to work on both Node versions 18 and 20 [#9](https://github.com/homebridge-plugins/homebridge-sharkiq/pull/9)
|
|
118
|
+
|
|
119
|
+
**Full Changelog**: https://github.com/homebridge-plugins/homebridge-sharkiq/compare/v1.0.9...v1.1.0
|
|
120
|
+
|
|
121
|
+
# ## [1.0.9](https://github.com/homebridge-plugins/homebridge-sharkiq/releases/tag/v1.0.9) (2023-09-01)
|
|
122
|
+
|
|
123
|
+
### What's Changed
|
|
124
|
+
- Optimized code for parsing config
|
|
125
|
+
|
|
126
|
+
**Full Changelog**: https://github.com/homebridge-plugins/homebridge-sharkiq/compare/v1.0.8...v1.0.9
|
|
127
|
+
|
|
128
|
+
# ## [1.0.8](https://github.com/homebridge-plugins/homebridge-sharkiq/releases/tag/v1.0.8) (2023-09-01)
|
|
129
|
+
|
|
130
|
+
### What's Changed
|
|
131
|
+
- Updated README to include badge
|
|
132
|
+
- Added donation link
|
|
133
|
+
|
|
134
|
+
**Full Changelog**: https://github.com/homebridge-plugins/homebridge-sharkiq/compare/v1.0.7...v1.0.8
|
|
135
|
+
|
|
136
|
+
# ## [1.0.7](https://github.com/homebridge-plugins/homebridge-sharkiq/releases/tag/v1.0.7) (2023-09-01)
|
|
137
|
+
|
|
138
|
+
### What's Changed
|
|
139
|
+
- Updated `README`
|
|
140
|
+
|
|
141
|
+
**Full Changelog**: https://github.com/homebridge-plugins/homebridge-sharkiq/compare/v1.0.6...v1.0.7
|
|
142
|
+
|
|
143
|
+
# ## [1.0.6](https://github.com/homebridge-plugins/homebridge-sharkiq/releases/tag/v1.0.6) (2023-09-01)
|
|
144
|
+
|
|
145
|
+
### What's Changed
|
|
146
|
+
- Updated the README to make the json config easier to understand
|
|
147
|
+
- Updated the `config.schema.json` to fix a bug in the Homebridge config UI
|
|
148
|
+
- Updated `package.json` and removed a dev dependency that is no longer needed
|
|
149
|
+
|
|
150
|
+
**Full Changelog**: https://github.com/homebridge-plugins/homebridge-sharkiq/compare/v1.0.5...v1.0.6
|
|
151
|
+
|
|
152
|
+
# ## [1.0.5](https://github.com/homebridge-plugins/homebridge-sharkiq/releases/tag/v1.0.5) (2023-08-31)
|
|
153
|
+
|
|
154
|
+
### What's Changed
|
|
155
|
+
- Minor fixes and improvements to config and documentation
|
|
156
|
+
|
|
157
|
+
**Full Changelog**: https://github.com/homebridge-plugins/homebridge-sharkiq/compare/v1.0.4...v1.0.5
|
|
158
|
+
|
|
159
|
+
# ## [1.0.4](https://github.com/homebridge-plugins/homebridge-sharkiq/releases/tag/v1.0.4) (2023-08-30)
|
|
160
|
+
|
|
161
|
+
### What's Changed
|
|
162
|
+
- Added invert docked status option
|
|
163
|
+
- Bug fixes for auth token
|
|
164
|
+
|
|
165
|
+
**Full Changelog**: https://github.com/homebridge-plugins/homebridge-sharkiq/compare/v1.0.3...v1.0.4
|
|
166
|
+
|
|
167
|
+
# ## [1.0.3](https://github.com/homebridge-plugins/homebridge-sharkiq/releases/tag/v1.0.3) (2023-08-29)
|
|
168
|
+
|
|
169
|
+
### What's Changed
|
|
170
|
+
- Various bug fixes and documentation updates
|
|
171
|
+
|
|
172
|
+
**Full Changelog**: https://github.com/homebridge-plugins/homebridge-sharkiq/compare/v1.0.2...v1.0.3
|
|
173
|
+
|
|
174
|
+
# ## [1.0.2](https://github.com/homebridge-plugins/homebridge-sharkiq/releases/tag/v1.0.2) (2023-08-28)
|
|
175
|
+
|
|
176
|
+
### What's Changed
|
|
177
|
+
- Minor updates to config and formatting
|
|
178
|
+
|
|
179
|
+
**Full Changelog**: https://github.com/homebridge-plugins/homebridge-sharkiq/compare/v1.0.1...v1.0.2
|
|
180
|
+
|
|
181
|
+
# ## [1.0.1](https://github.com/homebridge-plugins/homebridge-sharkiq/releases/tag/v1.0.1) (2023-08-27)
|
|
182
|
+
|
|
183
|
+
### What's Changed
|
|
184
|
+
- Initial public release
|
|
185
|
+
|
|
186
|
+
**Full Changelog**: https://github.com/homebridge-plugins/homebridge-sharkiq/compare/df61287...v1.0.1
|
package/README.md
CHANGED
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
|
|
9
9
|
</span>
|
|
10
10
|
|
|
11
|
-
A
|
|
11
|
+
A Homebridge plugin for SharkIQ vacuums.
|
|
12
12
|
|
|
13
13
|
Contributions are always welcome. I used the [sharkiq](https://github.com/JeffResc/sharkiq/) python module as a reference for creating the javascript wrapper to control SharkIQ Vacuums.
|
|
14
14
|
|
|
15
|
-
This
|
|
15
|
+
This plugin has only been tested on the `UR250BEXUS` model.
|
|
16
16
|
|
|
17
17
|
The fastest way to get community support (not for bugs) is to join the [Homebridge Discord server](https://discord.gg/kqNCe2D) and chat in the #sharkiq channel.
|
|
18
18
|
|
|
@@ -20,7 +20,7 @@ The fastest way to get community support (not for bugs) is to join the [Homebrid
|
|
|
20
20
|
|
|
21
21
|
### Step 1.
|
|
22
22
|
|
|
23
|
-
Run `npm install -g homebridge-sharkiq`
|
|
23
|
+
Run `npm install -g @homebridge-plugins/homebridge-sharkiq`
|
|
24
24
|
|
|
25
25
|
### Step 2.
|
|
26
26
|
|
|
@@ -32,8 +32,6 @@ Configure Homebridge. The config file for SharkIQ should include:
|
|
|
32
32
|
{
|
|
33
33
|
"name": "SharkIQ",
|
|
34
34
|
"platform": "SharkIQ",
|
|
35
|
-
"email": "[Shark Clean Account Email]",
|
|
36
|
-
"password": "[Shark Clean Account Password]",
|
|
37
35
|
"oAuthCode": "[Optional. Use for manually obtaining credentials]",
|
|
38
36
|
"vacuums": [
|
|
39
37
|
"[Shark Vacuum DSN]",
|
|
@@ -47,19 +45,13 @@ Configure Homebridge. The config file for SharkIQ should include:
|
|
|
47
45
|
}
|
|
48
46
|
```
|
|
49
47
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
You may be prompted to use the manual OAuth login method. In order to use the manual OAuth login method, you must remove the email and password values in your configuration first.
|
|
53
|
-
|
|
54
|
-
#
|
|
55
|
-
|
|
56
|
-
The email and password is your Shark Clean account you used to setup the vacuum. The Vacuums array is a list of your vacuum's device serial numbers (DSN). If you only have one vacuum, just include the one's DSN. The DSN(s) can be found in the SharkClean mobile app.
|
|
48
|
+
The Vacuums array is a list of your vacuum's device serial numbers (DSN). If you only have one vacuum, just include the one's DSN. The DSN(s) can be found in the SharkClean mobile app.
|
|
57
49
|
|
|
58
|
-
If you would like to manually obtain your Shark Clean credentials
|
|
50
|
+
If you would like to manually obtain your Shark Clean credentials, you can use an OAuth code. Refer to the `OAuth Code Login Method` section.
|
|
59
51
|
|
|
60
52
|
The Vacuums array is a list of your vacuum's device serial numbers (DSN). If you only have one vacuum, just include the one's DSN. The DSN(s) can be found in the SharkClean mobile app.
|
|
61
53
|
|
|
62
|
-
If you are in Europe, set the `europe` config value to `true`. SharkClean has separate servers for the U.S. and Europe. The default value is `false`, which connects to the U.S. server.
|
|
54
|
+
If you are in Europe or the UK, set the `europe` config value to `true`. SharkClean has separate servers for the U.S. and Europe. The default value is `false`, which connects to the U.S. server.
|
|
63
55
|
|
|
64
56
|
The default interval between updating the docked status is 30 seconds (30000 ms). To change the docked status interval, add `dockedUpdateInterval` to your config. Value is in milliseconds. If the interval is too low, you have the risk of your account being rate limited.
|
|
65
57
|
|
|
@@ -72,10 +64,54 @@ The default interval between updating the docked status is 30 seconds (30000 ms)
|
|
|
72
64
|
- Set `invertDockedStatus` to `true` to display as "closed" when the vacuum is docked and "opened" when the vacuum is not docked
|
|
73
65
|
- Pause switch for pausing the vacuum while it's running
|
|
74
66
|
|
|
67
|
+
## Matter and HomeKit Integration
|
|
68
|
+
|
|
69
|
+
This plugin supports both classic HomeKit Accessory Protocol (HAP) and Homebridge Matter.
|
|
70
|
+
|
|
71
|
+
### Matter Implementation
|
|
72
|
+
|
|
73
|
+
- **HAP mode**: Uses `SharkIQPlatform` and `SharkIQAccessory`.
|
|
74
|
+
- **Matter mode**: Uses `SharkIQMatterPlatform` when Homebridge Matter is available and enabled.
|
|
75
|
+
|
|
76
|
+
If Matter is unavailable or disabled, the plugin automatically falls back to HAP mode.
|
|
77
|
+
|
|
78
|
+
### Device Mapping
|
|
79
|
+
|
|
80
|
+
| Mode | Homebridge Class | HAP Service(s) | Matter DeviceType | Matter Clusters |
|
|
81
|
+
|---|---|---|---|---|
|
|
82
|
+
| HAP | `SharkIQPlatform` / `SharkIQAccessory` | `Fanv2`, `ContactSensor`, `Switch` | N/A | N/A |
|
|
83
|
+
| Matter | `SharkIQMatterPlatform` | (HAP not registered in Matter path) | `RoboticVacuumCleaner` | `rvcRunMode`, `rvcOperationalState` |
|
|
84
|
+
|
|
85
|
+
### Matter References
|
|
86
|
+
|
|
87
|
+
- https://matter-js.github.io/docs/index.html
|
|
88
|
+
- https://github.com/homebridge-plugins/homebridge-matter
|
|
89
|
+
- https://github.com/homebridge-plugins/homebridge-matter/wiki/Introduction
|
|
90
|
+
- https://github.com/homebridge-plugins/homebridge-matter/wiki/Core-Concepts
|
|
91
|
+
- https://github.com/homebridge-plugins/homebridge-matter/wiki/Getting-Started
|
|
92
|
+
- https://github.com/homebridge-plugins/homebridge-matter/wiki/State-Management
|
|
93
|
+
- https://github.com/homebridge-plugins/homebridge-matter/wiki/Monitoring-External-Changes
|
|
94
|
+
- https://github.com/homebridge-plugins/homebridge-matter/wiki/Best-Practices
|
|
95
|
+
- https://github.com/homebridge-plugins/homebridge-matter/wiki/Advanced-Patterns
|
|
96
|
+
- https://github.com/homebridge-plugins/homebridge-matter/wiki/API-Reference
|
|
97
|
+
- https://github.com/homebridge-plugins/homebridge-matter/wiki/Matter-Types
|
|
98
|
+
- https://github.com/homebridge-plugins/homebridge-matter/wiki/Value-Conversions
|
|
99
|
+
- https://github.com/homebridge-plugins/homebridge-matter/wiki/Section-9-Appliances
|
|
100
|
+
|
|
75
101
|
### OAuth Code Login Method
|
|
76
102
|
|
|
77
103
|
The OAuth Code value is for creating and storing the login for the plugin. Here is how to sign in with this method.
|
|
78
104
|
|
|
105
|
+
The easiest method is to use the Homebridge UI OAuth Assistant in this plugin's Settings tab:
|
|
106
|
+
|
|
107
|
+
1. Open the plugin UI in Homebridge.
|
|
108
|
+
2. Go to `Settings` -> `OAuth Assistant`.
|
|
109
|
+
3. Click `Generate Login URL`.
|
|
110
|
+
4. Open the URL, sign in, then paste the callback URL (or code) back into the assistant.
|
|
111
|
+
5. Click `Exchange Code` and restart Homebridge.
|
|
112
|
+
|
|
113
|
+
Manual method (if needed):
|
|
114
|
+
|
|
79
115
|
1. Run Homebridge with the latest plugin version.
|
|
80
116
|
2. Open the Homebridge logs
|
|
81
117
|
3. Open the URL in the console printed by homebridge-sharkiq. Safari will not work due to the way Safari handles the results of the login
|
|
@@ -94,3 +130,4 @@ Contributions would be very helpful to help this Homebridge plugin stay maintain
|
|
|
94
130
|
## Useful Links
|
|
95
131
|
|
|
96
132
|
- [SharkIQ Python](https://github.com/JeffResc/sharkiq/)
|
|
133
|
+
- [Home Assistant SharkIQ Integration](https://github.com/home-assistant/core/tree/dev/homeassistant/components/sharkiq)
|
package/config.schema.json
CHANGED
|
@@ -12,16 +12,6 @@
|
|
|
12
12
|
"type": "string",
|
|
13
13
|
"default": "SharkIQ"
|
|
14
14
|
},
|
|
15
|
-
"email": {
|
|
16
|
-
"title": "SharkClean Account Email",
|
|
17
|
-
"type": "string",
|
|
18
|
-
"required": false
|
|
19
|
-
},
|
|
20
|
-
"password": {
|
|
21
|
-
"title": "SharkClean Account Password",
|
|
22
|
-
"type": "string",
|
|
23
|
-
"required": false
|
|
24
|
-
},
|
|
25
15
|
"oAuthCode": {
|
|
26
16
|
"title": "SharkClean OAuth Code",
|
|
27
17
|
"type": "string",
|
|
@@ -38,6 +28,7 @@
|
|
|
38
28
|
},
|
|
39
29
|
"europe": {
|
|
40
30
|
"title": "SharkClean European Server",
|
|
31
|
+
"description": "Set to true if you are located in Europe or the UK. SharkClean uses different servers for US and European regions.",
|
|
41
32
|
"type": "boolean",
|
|
42
33
|
"required": false,
|
|
43
34
|
"default": false
|
|
@@ -53,20 +44,31 @@
|
|
|
53
44
|
"type": "integer",
|
|
54
45
|
"required": false,
|
|
55
46
|
"default": 30000
|
|
47
|
+
},
|
|
48
|
+
"externalAccessory": {
|
|
49
|
+
"title": "Publish as External Accessory",
|
|
50
|
+
"description": "When enabled, each vacuum is published as a standalone external accessory with its own HomeKit pairing code, instead of being bridged through Homebridge. Applies to both HAP and Matter registration modes.",
|
|
51
|
+
"type": "boolean",
|
|
52
|
+
"required": false,
|
|
53
|
+
"default": false
|
|
54
|
+
},
|
|
55
|
+
"preferMatter": {
|
|
56
|
+
"title": "Prefer Matter",
|
|
57
|
+
"description": "When enabled, the plugin will use the Homebridge Matter API (requires Homebridge v2.0+ with Matter enabled). Falls back to HAP if Matter is unavailable.",
|
|
58
|
+
"type": "boolean",
|
|
59
|
+
"required": false,
|
|
60
|
+
"default": true
|
|
61
|
+
},
|
|
62
|
+
"enableMatter": {
|
|
63
|
+
"title": "Enable Matter",
|
|
64
|
+
"description": "Allow the plugin to use Homebridge Matter support when available. Set to false to always use HAP accessories.",
|
|
65
|
+
"type": "boolean",
|
|
66
|
+
"required": false,
|
|
67
|
+
"default": true
|
|
56
68
|
}
|
|
57
69
|
}
|
|
58
70
|
},
|
|
59
71
|
"layout": [
|
|
60
|
-
{
|
|
61
|
-
"type": "fieldset",
|
|
62
|
-
"title": "SharkIQ Account Info",
|
|
63
|
-
"expandable": true,
|
|
64
|
-
"expanded": true,
|
|
65
|
-
"items": [
|
|
66
|
-
"email",
|
|
67
|
-
"password"
|
|
68
|
-
]
|
|
69
|
-
},
|
|
70
72
|
{
|
|
71
73
|
"type": "fieldset",
|
|
72
74
|
"title": "SharkIQ OAuth Info",
|
|
@@ -75,7 +77,7 @@
|
|
|
75
77
|
"items": [
|
|
76
78
|
{
|
|
77
79
|
"type": "help",
|
|
78
|
-
"helpvalue": "<h5>OAuth Code</h5><em class='primary-text'>
|
|
80
|
+
"helpvalue": "<h5>OAuth Code</h5><em class='primary-text'>Recommended: use the Homebridge UI OAuth Assistant in the plugin Settings tab to generate the login URL and exchange callback code automatically. You can still paste the OAuth code here manually if needed.</em>"
|
|
79
81
|
},
|
|
80
82
|
"oAuthCode"
|
|
81
83
|
]
|
|
@@ -107,7 +109,22 @@
|
|
|
107
109
|
},
|
|
108
110
|
"europe",
|
|
109
111
|
"invertDockedStatus",
|
|
110
|
-
"dockedUpdateInterval"
|
|
112
|
+
"dockedUpdateInterval",
|
|
113
|
+
"externalAccessory"
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"type": "fieldset",
|
|
118
|
+
"title": "Matter Settings",
|
|
119
|
+
"expandable": true,
|
|
120
|
+
"expanded": false,
|
|
121
|
+
"items": [
|
|
122
|
+
{
|
|
123
|
+
"type": "help",
|
|
124
|
+
"helpvalue": "<h5>Homebridge Matter Support</h5><em class='primary-text'>These options require Homebridge v2.0 or later with Matter enabled. If Matter is unavailable the plugin will automatically fall back to standard HomeKit (HAP) accessories.</em>"
|
|
125
|
+
},
|
|
126
|
+
"preferMatter",
|
|
127
|
+
"enableMatter"
|
|
111
128
|
]
|
|
112
129
|
}
|
|
113
130
|
]
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { API, Logger, PlatformAccessory, PlatformConfig } from 'homebridge';
|
|
2
|
+
import { SharkIQPlatform } from './platform.js';
|
|
3
|
+
/**
|
|
4
|
+
* SharkIQMatterPlatform
|
|
5
|
+
*
|
|
6
|
+
* Extends the base HAP platform to add Homebridge v2.0 Matter support.
|
|
7
|
+
* When the Homebridge Matter API is available and enabled, robot vacuums are
|
|
8
|
+
* registered as native Matter `RoboticVacuumCleaner` endpoints via
|
|
9
|
+
* `api.matter.registerPlatformAccessories()`. State is kept up-to-date by
|
|
10
|
+
* periodic polling that calls `api.matter.updateAccessoryState()` directly —
|
|
11
|
+
* no HAP platform accessories are created in the Matter code path, avoiding
|
|
12
|
+
* duplicate accessories.
|
|
13
|
+
*
|
|
14
|
+
* If the Matter API is unavailable (e.g. running on Homebridge v1.x or Matter
|
|
15
|
+
* is disabled by the user) the platform falls back transparently to the
|
|
16
|
+
* standard HAP registration path inherited from {@link SharkIQPlatform}.
|
|
17
|
+
*/
|
|
18
|
+
export declare class SharkIQMatterPlatform extends SharkIQPlatform {
|
|
19
|
+
readonly matterAccessories: Map<string, any>;
|
|
20
|
+
constructor(log: Logger, config: PlatformConfig, api: API);
|
|
21
|
+
/**
|
|
22
|
+
* Called by Homebridge when a cached HAP accessory is restored from disk.
|
|
23
|
+
*
|
|
24
|
+
* Delegates to the parent so that `this.accessories` is populated for the
|
|
25
|
+
* HAP fallback path. When Matter mode is active, these cached HAP accessories
|
|
26
|
+
* are unregistered in `_cleanupCachedHapAccessories()` before Matter
|
|
27
|
+
* accessories are registered, preventing duplicates.
|
|
28
|
+
*/
|
|
29
|
+
configureAccessory(accessory: PlatformAccessory): void;
|
|
30
|
+
/**
|
|
31
|
+
* Called by Homebridge when a cached Matter accessory is restored from disk.
|
|
32
|
+
* Required for Matter-enabled platforms (mirrors `configureAccessory` for HAP).
|
|
33
|
+
*/
|
|
34
|
+
configureMatterAccessory(accessory: any): void;
|
|
35
|
+
/**
|
|
36
|
+
* Override the HAP `discoverDevices` method.
|
|
37
|
+
*
|
|
38
|
+
* When the Matter API is fully initialised, cached HAP accessories are
|
|
39
|
+
* cleaned up and vacuums are registered as Matter `RoboticVacuumCleaner`
|
|
40
|
+
* accessories. Falls back to the standard HAP path when Matter is not available.
|
|
41
|
+
*/
|
|
42
|
+
discoverDevices(): void;
|
|
43
|
+
/**
|
|
44
|
+
* Unregister all cached HAP accessories before registering Matter accessories.
|
|
45
|
+
*
|
|
46
|
+
* Prevents duplicate accessories when a user upgrades to Homebridge v2 or
|
|
47
|
+
* switches from the HAP registration path to the Matter registration path.
|
|
48
|
+
*/
|
|
49
|
+
private _cleanupCachedHapAccessories;
|
|
50
|
+
/**
|
|
51
|
+
* Register all discovered vacuum devices using the Homebridge Matter API.
|
|
52
|
+
*
|
|
53
|
+
* For each vacuum:
|
|
54
|
+
* - Reuses a previously cached `MatterAccessory` when the UUID matches, or
|
|
55
|
+
* creates a new plain-object descriptor satisfying the `MatterAccessory`
|
|
56
|
+
* interface.
|
|
57
|
+
* - Starts a periodic polling loop that fetches live state from the Shark
|
|
58
|
+
* cloud and pushes updates directly via `api.matter.updateAccessoryState`.
|
|
59
|
+
* - Removes any cached Matter accessories whose vacuums are no longer present.
|
|
60
|
+
*
|
|
61
|
+
* No HAP platform accessories are created in this path to avoid duplicate
|
|
62
|
+
* device entries.
|
|
63
|
+
*/
|
|
64
|
+
private _registerMatterDevices;
|
|
65
|
+
/**
|
|
66
|
+
* Build Matter command handlers for an RVC accessory.
|
|
67
|
+
*
|
|
68
|
+
* Handlers respond to Matter `changeToMode` commands (user starting or
|
|
69
|
+
* stopping the vacuum from a Matter controller or Apple Home) by calling
|
|
70
|
+
* the appropriate SharkIQ API methods.
|
|
71
|
+
*/
|
|
72
|
+
private _buildMatterHandlers;
|
|
73
|
+
/**
|
|
74
|
+
* Start a periodic polling loop that fetches live vacuum state from the Shark
|
|
75
|
+
* cloud and pushes updates into Matter cluster attributes via
|
|
76
|
+
* `api.matter.updateAccessoryState`.
|
|
77
|
+
*/
|
|
78
|
+
private _startVacuumPolling;
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=SharkIQMatterPlatform.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SharkIQMatterPlatform.d.ts","sourceRoot":"","sources":["../src/SharkIQMatterPlatform.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAMhF,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAI/C;;;;;;;;;;;;;;GAcG;AACH,qBAAa,qBAAsB,SAAQ,eAAe;IAExD,SAAgB,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAY;gBAG7D,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,cAAc,EACtB,GAAG,EAAE,GAAG;IAaV;;;;;;;OAOG;IACH,kBAAkB,CAAC,SAAS,EAAE,iBAAiB,GAAG,IAAI;IAItD;;;OAGG;IACH,wBAAwB,CAAC,SAAS,EAAE,GAAG,GAAG,IAAI;IAK9C;;;;;;OAMG;IACH,eAAe,IAAI,IAAI;IAiBvB;;;;;OAKG;IACH,OAAO,CAAC,4BAA4B;IAUpC;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,sBAAsB;IAoG9B;;;;;;OAMG;IACH,OAAO,CAAC,oBAAoB;IAkB5B;;;;OAIG;IACH,OAAO,CAAC,mBAAmB;CA0C5B"}
|