homebridge-yoto 0.0.3 → 0.0.5
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/config.schema.json +2 -21
- package/lib/constants.js +1 -2
- package/lib/platform.js +1 -3
- package/package.json +4 -3
package/config.schema.json
CHANGED
|
@@ -7,13 +7,6 @@
|
|
|
7
7
|
"schema": {
|
|
8
8
|
"type": "object",
|
|
9
9
|
"properties": {
|
|
10
|
-
"name": {
|
|
11
|
-
"title": "Platform Name",
|
|
12
|
-
"type": "string",
|
|
13
|
-
"default": "Yoto",
|
|
14
|
-
"required": true,
|
|
15
|
-
"description": "The name of the platform as it appears in Homebridge logs"
|
|
16
|
-
},
|
|
17
10
|
"clientId": {
|
|
18
11
|
"title": "OAuth Client ID",
|
|
19
12
|
"type": "string",
|
|
@@ -39,13 +32,7 @@
|
|
|
39
32
|
"required": false,
|
|
40
33
|
"description": "Token expiration timestamp (managed automatically)"
|
|
41
34
|
},
|
|
42
|
-
|
|
43
|
-
"title": "MQTT Broker URL",
|
|
44
|
-
"type": "string",
|
|
45
|
-
"default": "mqtt://mqtt.yotoplay.com:1883",
|
|
46
|
-
"required": false,
|
|
47
|
-
"description": "MQTT broker URL for real-time device communication"
|
|
48
|
-
},
|
|
35
|
+
|
|
49
36
|
"statusTimeoutSeconds": {
|
|
50
37
|
"title": "Status Timeout (seconds)",
|
|
51
38
|
"type": "number",
|
|
@@ -163,12 +150,6 @@
|
|
|
163
150
|
}
|
|
164
151
|
},
|
|
165
152
|
"layout": [
|
|
166
|
-
{
|
|
167
|
-
"type": "section",
|
|
168
|
-
"title": "Platform Configuration",
|
|
169
|
-
"expandable": false,
|
|
170
|
-
"items": ["name"]
|
|
171
|
-
},
|
|
172
153
|
{
|
|
173
154
|
"type": "section",
|
|
174
155
|
"title": "Authentication",
|
|
@@ -190,7 +171,7 @@
|
|
|
190
171
|
"title": "MQTT Configuration",
|
|
191
172
|
"expandable": true,
|
|
192
173
|
"expanded": false,
|
|
193
|
-
"items": ["
|
|
174
|
+
"items": ["statusTimeoutSeconds"]
|
|
194
175
|
},
|
|
195
176
|
{
|
|
196
177
|
"type": "section",
|
package/lib/constants.js
CHANGED
|
@@ -19,7 +19,7 @@ export const YOTO_OAUTH_DEVICE_CODE_URL = `${YOTO_API_BASE_URL}/oauth/device/cod
|
|
|
19
19
|
/**
|
|
20
20
|
* MQTT configuration
|
|
21
21
|
*/
|
|
22
|
-
export const YOTO_MQTT_BROKER_URL = '
|
|
22
|
+
export const YOTO_MQTT_BROKER_URL = 'wss://aqrphjqbp3u2z-ats.iot.eu-west-2.amazonaws.com'
|
|
23
23
|
export const MQTT_RECONNECT_PERIOD = 5000 // milliseconds
|
|
24
24
|
export const MQTT_CONNECT_TIMEOUT = 30000 // milliseconds
|
|
25
25
|
|
|
@@ -114,7 +114,6 @@ export const DEFAULT_CONFIG = {
|
|
|
114
114
|
platform: PLATFORM_NAME,
|
|
115
115
|
name: PLATFORM_NAME,
|
|
116
116
|
clientId: OAUTH_CLIENT_ID,
|
|
117
|
-
mqttBroker: YOTO_MQTT_BROKER_URL,
|
|
118
117
|
statusTimeoutSeconds: DEFAULT_STATUS_TIMEOUT_SECONDS,
|
|
119
118
|
exposeTemperature: true,
|
|
120
119
|
exposeBattery: true,
|
package/lib/platform.js
CHANGED
|
@@ -47,9 +47,7 @@ export class YotoPlatform {
|
|
|
47
47
|
// Initialize API clients
|
|
48
48
|
this.auth = new YotoAuth(log, this.config.clientId)
|
|
49
49
|
this.yotoApi = new YotoApi(log, this.auth)
|
|
50
|
-
this.yotoMqtt = new YotoMqtt(log
|
|
51
|
-
brokerUrl: this.config.mqttBroker
|
|
52
|
-
})
|
|
50
|
+
this.yotoMqtt = new YotoMqtt(log)
|
|
53
51
|
|
|
54
52
|
// Set up token refresh callback
|
|
55
53
|
this.yotoApi.setTokenRefreshCallback(this.handleTokenRefresh.bind(this))
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "homebridge-yoto",
|
|
3
|
-
"description": "
|
|
4
|
-
"version": "0.0.
|
|
3
|
+
"description": "Control your Yoto players through Apple HomeKit with real-time MQTT updates",
|
|
4
|
+
"version": "0.0.5",
|
|
5
5
|
"author": "Bret Comnes <bcomnes@gmail.com> (https://bret.io)",
|
|
6
6
|
"bugs": {
|
|
7
7
|
"url": "https://github.com/bcomnes/homebridge-yoto/issues"
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
},
|
|
24
24
|
"engines": {
|
|
25
25
|
"node": ">=20",
|
|
26
|
-
"npm": ">=10"
|
|
26
|
+
"npm": ">=10",
|
|
27
|
+
"homebridge": "^1.8.0 || ^2.0.0-beta.0"
|
|
27
28
|
},
|
|
28
29
|
"homepage": "https://github.com/bcomnes/homebridge-yoto",
|
|
29
30
|
"keywords": [
|