@mdjhnson/homebridge-yoto 0.1.2 → 0.1.3
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/README.md +9 -9
- package/config.schema.json +11 -7
- package/lib/platform.js +3 -0
- package/lib/speaker-accessory.js +3 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -39,10 +39,10 @@ Requires Node.js 22+ and Homebridge 1.8+ or 2.x.
|
|
|
39
39
|
|
|
40
40
|
1. Open the plugin's **Settings** in the Homebridge UI and click **Sign in with Yoto**. Yoto's sign-in page opens in a new tab.
|
|
41
41
|
2. Sign in and approve access.
|
|
42
|
-
3. Your browser then shows *"This site can't be reached"* at `127.0.0.1`. That's expected. Copy the full address from the address bar, paste it into the
|
|
42
|
+
3. Your browser then shows *"This site can't be reached"* at `127.0.0.1`. That's expected. Copy the full address from the address bar, paste it into the **Address from your browser** box on the sign-in screen, and click **Finish Sign-in**.
|
|
43
43
|
4. Restart Homebridge.
|
|
44
44
|
|
|
45
|
-
Using your own Yoto developer app? Make it a **Public Client**, add `http://127.0.0.1:8787/callback` as an allowed callback URL, enable the `family:devices:*`, `family:library:view`, `user:content:view` and `offline_access` scopes, and enter its client ID
|
|
45
|
+
Using your own Yoto developer app? Make it a **Public Client**, add `http://127.0.0.1:8787/callback` as an allowed callback URL, enable the `family:devices:*`, `family:library:view`, `user:content:view` and `offline_access` scopes, and enter its client ID in the **Advanced Settings** panel on the sign-in screen before signing in. (That panel is only shown while you're signed out, and is separate from the **Advanced** section of the plugin settings.)
|
|
46
46
|
|
|
47
47
|
The plugin asks for access to view, configure and control your players, plus read-only access to your card library (used to name shortcut switches). If you signed in with an older version, sign in again so the new permissions apply.
|
|
48
48
|
|
|
@@ -50,14 +50,13 @@ The plugin refreshes its tokens on its own. If the login ever expires or is revo
|
|
|
50
50
|
|
|
51
51
|
## Settings
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
Most options live under **Accessory Services** in the plugin settings. The settings form, including **Advanced**, appears once you've signed in.
|
|
54
54
|
|
|
55
55
|
**Playback**
|
|
56
|
-
- **Playback Controls**: Adds a play/pause switch and a volume dimmer to each player's bridged accessory.
|
|
57
|
-
- **
|
|
58
|
-
- **TV Playback Accessory**: Publishes a separate TV-style accessory. Its inputs play your card controls and shortcuts, and you control it with the iOS remote.
|
|
56
|
+
- **Playback Controls**: Adds a play/pause switch and a volume dimmer to each player's bridged accessory. This is the simplest option and needs no extra pairing.
|
|
57
|
+
- **TV Playback Accessory**: Publishes a separate TV-style accessory. You control it with the iOS remote (play/pause, volume buttons), and its inputs play your card controls and shortcuts.
|
|
59
58
|
|
|
60
|
-
External accessories must be added by hand in the Home app (**Add Accessory → More options**) using the setup code in the Homebridge log. Each one listens on its own port (logged as `... is running on port N`), so open those ports if Homebridge runs behind a firewall, or set a fixed port range under Homebridge **Settings → Network**.
|
|
59
|
+
The TV accessory, and the legacy Smart Speaker below, are external accessories. External accessories must be added by hand in the Home app (**Add Accessory → More options**) using the setup code in the Homebridge log. Each one listens on its own port (logged as `... is running on port N`), so open those ports if Homebridge runs behind a firewall, or set a fixed port range under Homebridge **Settings → Network**.
|
|
61
60
|
|
|
62
61
|
**Card Controls** (`services.cardControls`)
|
|
63
62
|
- A switch on each player that plays the card ID you configure.
|
|
@@ -70,8 +69,9 @@ External accessories must be added by hand in the Home app (**Add Accessory →
|
|
|
70
69
|
**Service toggles**
|
|
71
70
|
- **Battery**, **Temperature Sensor** (v3), **Nightlight** (v3), **Card Slot**, **Day Mode**, **Sleep Timer**, **Bluetooth**, **Volume Limits**.
|
|
72
71
|
|
|
73
|
-
**Advanced**
|
|
72
|
+
**Advanced** (collapsed section at the bottom of the plugin settings)
|
|
74
73
|
- **HTTP Poll Interval**: How often to poll the Yoto API as a fallback to MQTT. Defaults to 60 seconds; the minimum is 10 seconds.
|
|
74
|
+
- **External Smart Speaker (Legacy)**: Kept for existing setups. It publishes a separate Smart Speaker accessory that only works in Home app scenes and automations. When you open it, the Home app shows *"Controls not available"* and can't show what's playing, because iOS only offers live controls for AirPlay speakers. It does not make the Yoto an AirPlay target. For more features, use the **TV Playback Accessory** instead. If you switch, remove the old Smart Speaker from the Home app by hand (Homebridge can't unpublish external accessories).
|
|
75
75
|
|
|
76
76
|
## HomeKit services
|
|
77
77
|
|
|
@@ -79,7 +79,7 @@ External accessories must be added by hand in the Home app (**Add Accessory →
|
|
|
79
79
|
- **Playback**: Switch. On resumes, Off pauses.
|
|
80
80
|
- **Volume**: Lightbulb. On unmutes, Off mutes, and Brightness maps 0–100% to the player's volume steps.
|
|
81
81
|
|
|
82
|
-
**Smart Speaker (external)**
|
|
82
|
+
**Smart Speaker (external, legacy)**
|
|
83
83
|
- Current/Target Media State, Volume, Mute, and online status. Stop pauses, so playback can be resumed.
|
|
84
84
|
|
|
85
85
|
**TV Playback (external)**
|
package/config.schema.json
CHANGED
|
@@ -61,13 +61,13 @@
|
|
|
61
61
|
"title": "Playback Controls",
|
|
62
62
|
"type": "boolean",
|
|
63
63
|
"default": false,
|
|
64
|
-
"description": "
|
|
64
|
+
"description": "Add a play/pause switch and a volume dimmer to each player. Simplest option, with no extra pairing."
|
|
65
65
|
},
|
|
66
66
|
"smartSpeaker": {
|
|
67
|
-
"title": "External Smart Speaker",
|
|
67
|
+
"title": "External Smart Speaker (Legacy)",
|
|
68
68
|
"type": "boolean",
|
|
69
69
|
"default": false,
|
|
70
|
-
"description": "
|
|
70
|
+
"description": "Legacy option kept for existing setups. Publishes a separate Smart Speaker accessory that only works in Home app scenes and automations. Requires pairing and its own network port."
|
|
71
71
|
},
|
|
72
72
|
"television": {
|
|
73
73
|
"title": "TV Playback Accessory",
|
|
@@ -171,7 +171,7 @@
|
|
|
171
171
|
"items": [
|
|
172
172
|
{
|
|
173
173
|
"type": "help",
|
|
174
|
-
"helpvalue": "
|
|
174
|
+
"helpvalue": "Sign in and out from the Yoto panel above. The default OAuth Client ID works for all users. The token fields below are managed by the plugin and should not be edited by hand."
|
|
175
175
|
},
|
|
176
176
|
"clientId",
|
|
177
177
|
"accessToken",
|
|
@@ -188,10 +188,9 @@
|
|
|
188
188
|
},
|
|
189
189
|
{
|
|
190
190
|
"type": "help",
|
|
191
|
-
"helpvalue": "<p
|
|
191
|
+
"helpvalue": "<p>The older <strong>External Smart Speaker</strong> option has moved to the <em>Advanced</em> section below.</p>"
|
|
192
192
|
},
|
|
193
193
|
"services.playbackControls",
|
|
194
|
-
"services.smartSpeaker",
|
|
195
194
|
"services.television",
|
|
196
195
|
"services.volumeLimits",
|
|
197
196
|
"services.battery",
|
|
@@ -225,7 +224,12 @@
|
|
|
225
224
|
"expandable": true,
|
|
226
225
|
"expanded": false,
|
|
227
226
|
"items": [
|
|
228
|
-
"httpPollIntervalMs"
|
|
227
|
+
"httpPollIntervalMs",
|
|
228
|
+
{
|
|
229
|
+
"type": "help",
|
|
230
|
+
"helpvalue": "<p><strong>Legacy: External Smart Speaker.</strong> Older playback option kept for existing setups. It only works in scenes and automations. The Home app shows \"Controls not available\" for it and can't show what's playing, because iOS only offers those for AirPlay speakers. For more features, turn on the <strong>TV Playback Accessory</strong> under <em>Accessory Services</em> instead. It supports the iPhone remote, volume buttons, and inputs for card controls and shortcuts. If you switch, remove the old Smart Speaker from the Home app by hand.</p>"
|
|
231
|
+
},
|
|
232
|
+
"services.smartSpeaker"
|
|
229
233
|
]
|
|
230
234
|
}
|
|
231
235
|
]
|
package/lib/platform.js
CHANGED
|
@@ -229,6 +229,9 @@ export class YotoPlatform {
|
|
|
229
229
|
`smartSpeaker=${this.playbackAccessoryConfig.smartSpeakerEnabled}`,
|
|
230
230
|
`tvPlayback=${this.playbackAccessoryConfig.televisionEnabled}`
|
|
231
231
|
)
|
|
232
|
+
if (this.playbackAccessoryConfig.smartSpeakerEnabled && !this.playbackAccessoryConfig.televisionEnabled) {
|
|
233
|
+
this.log.info('The External Smart Speaker is a legacy option: the Home app shows "Controls not available" for it. For the iPhone remote, volume buttons, and inputs for card controls and shortcuts, turn on the TV Playback Accessory instead.')
|
|
234
|
+
}
|
|
232
235
|
|
|
233
236
|
// Listen for devices being added
|
|
234
237
|
this.yotoAccount.on('deviceAdded', async ({ deviceId }) => {
|
package/lib/speaker-accessory.js
CHANGED
|
@@ -148,7 +148,9 @@ export class YotoSpeakerAccessory {
|
|
|
148
148
|
.onGet(this.getTargetMediaState.bind(this))
|
|
149
149
|
.onSet(this.setTargetMediaState.bind(this))
|
|
150
150
|
|
|
151
|
-
//
|
|
151
|
+
// Report AirPlay as enabled. Kept from earlier versions so already-paired speakers keep
|
|
152
|
+
// the same characteristics; removing it hasn't been tested on real players. It does not
|
|
153
|
+
// make the Yoto an AirPlay target, and the Home app still shows "Controls not available".
|
|
152
154
|
// AirPlayEnable is a writable uint8 (0/1); ignore writes and always report enabled.
|
|
153
155
|
service
|
|
154
156
|
.getCharacteristic(Characteristic.AirPlayEnable)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mdjhnson/homebridge-yoto",
|
|
3
3
|
"description": "Control your Yoto players through Apple HomeKit with real-time MQTT updates",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.3",
|
|
5
5
|
"author": "mdjhnson (https://github.com/mdjhnson)",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Bret Comnes <bcomnes@gmail.com> (https://bret.io)"
|