homebridge-yoto 0.0.39 → 0.0.41
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 +50 -0
- package/config.schema.json +67 -14
- package/lib/accessory.js +250 -82
- package/lib/card-control-accessory.js +200 -0
- package/lib/card-controls.js +80 -0
- package/lib/platform.js +330 -32
- package/lib/service-config.js +63 -0
- package/lib/speaker-accessory.js +491 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -25,6 +25,56 @@
|
|
|
25
25
|
|
|
26
26
|
THIS PLUGIN IS A WIP. DO NOT USE YET.
|
|
27
27
|
|
|
28
|
+
Homebridge plugin that exposes Yoto players to HomeKit with optional playback controls, device status, and nightlight settings.
|
|
29
|
+
|
|
30
|
+
## Settings
|
|
31
|
+
|
|
32
|
+
**Playback Controls** (`services.playbackAccessory`)
|
|
33
|
+
- **Bridged (Switch + Dimmer)**: Adds Playback and Volume services on the main accessory.
|
|
34
|
+
- **External Smart Speaker**: Publishes a separate Smart Speaker accessory for playback and volume. Requires pairing the extra accessory in the Home app.
|
|
35
|
+
- **None**: Disables playback and volume services entirely.
|
|
36
|
+
|
|
37
|
+
**Card Controls** (`services.cardControls`)
|
|
38
|
+
- Adds a per-device switch that plays the configured card ID.
|
|
39
|
+
- Optional "Play on All Yotos" accessory per card control.
|
|
40
|
+
|
|
41
|
+
**Service toggles**
|
|
42
|
+
- **Temperature Sensor**: Adds a temperature sensor when supported by the device.
|
|
43
|
+
- **Nightlight**: Adds day/night nightlight controls and status sensors.
|
|
44
|
+
- **Card Slot**: Adds a card insertion sensor.
|
|
45
|
+
- **Day Mode**: Adds a day/night mode sensor.
|
|
46
|
+
- **Sleep Timer**: Adds a sleep timer switch.
|
|
47
|
+
- **Bluetooth**: Adds a Bluetooth toggle switch.
|
|
48
|
+
- **Volume Limits**: Adds day/night max volume controls.
|
|
49
|
+
|
|
50
|
+
## HomeKit Services
|
|
51
|
+
|
|
52
|
+
**Playback (bridged)**
|
|
53
|
+
- **Playback**: Switch; On resumes, Off pauses.
|
|
54
|
+
- **Volume**: Lightbulb; On unmutes, Off mutes, Brightness maps 0-100% to device volume steps.
|
|
55
|
+
|
|
56
|
+
**Smart Speaker (external)**
|
|
57
|
+
- **Smart Speaker**: Current/Target Media State, Volume, Mute, and StatusActive (online state).
|
|
58
|
+
|
|
59
|
+
**Card Controls**
|
|
60
|
+
- **Card Control**: Switch on each device that plays the configured card ID.
|
|
61
|
+
- **Card Control (All Yotos)**: Optional switch accessory that plays the card on every Yoto.
|
|
62
|
+
|
|
63
|
+
**Device status**
|
|
64
|
+
- **Online Status**: Contact sensor; Contact Not Detected = online.
|
|
65
|
+
- **Battery**: Battery level, charging state, and low battery.
|
|
66
|
+
- **Temperature**: Temperature sensor with fault status when offline/unavailable.
|
|
67
|
+
|
|
68
|
+
**Nightlight**
|
|
69
|
+
- **Day Nightlight / Night Nightlight**: Lightbulbs with On/Off, Brightness, Hue, and Saturation.
|
|
70
|
+
- **Nightlight Active / Day Nightlight Active / Night Nightlight Active**: Contact sensors for live nightlight state.
|
|
71
|
+
|
|
72
|
+
**Other controls**
|
|
73
|
+
- **Card Slot**: Contact sensor for card insertion.
|
|
74
|
+
- **Day Mode**: Contact sensor; Contact Not Detected = day mode.
|
|
75
|
+
- **Sleep Timer**: Switch to enable/disable sleep timer.
|
|
76
|
+
- **Bluetooth**: Switch to toggle Bluetooth.
|
|
77
|
+
- **Day/Night Max Volume**: Lightbulb brightness sets max volume limits.
|
|
28
78
|
|
|
29
79
|
## License
|
|
30
80
|
|
package/config.schema.json
CHANGED
|
@@ -49,17 +49,23 @@
|
|
|
49
49
|
"title": "Accessory Services",
|
|
50
50
|
"type": "object",
|
|
51
51
|
"properties": {
|
|
52
|
-
"
|
|
53
|
-
"title": "Playback",
|
|
54
|
-
"type": "
|
|
55
|
-
"default":
|
|
56
|
-
"
|
|
52
|
+
"playbackAccessory": {
|
|
53
|
+
"title": "Playback Controls",
|
|
54
|
+
"type": "string",
|
|
55
|
+
"default": "none",
|
|
56
|
+
"enum": ["bridged", "external", "none"],
|
|
57
|
+
"enumNames": [
|
|
58
|
+
"Bridged (Switch + Dimmer)",
|
|
59
|
+
"External Smart Speaker",
|
|
60
|
+
"None"
|
|
61
|
+
],
|
|
62
|
+
"description": "Choose how playback and volume controls are exposed. External Smart Speaker requires additional pairing steps and appears as a separate accessory."
|
|
57
63
|
},
|
|
58
|
-
"
|
|
59
|
-
"title": "
|
|
64
|
+
"battery": {
|
|
65
|
+
"title": "Battery",
|
|
60
66
|
"type": "boolean",
|
|
61
67
|
"default": true,
|
|
62
|
-
"description": "Expose
|
|
68
|
+
"description": "Expose battery status service."
|
|
63
69
|
},
|
|
64
70
|
"temperature": {
|
|
65
71
|
"title": "Temperature Sensor",
|
|
@@ -79,11 +85,40 @@
|
|
|
79
85
|
"default": true,
|
|
80
86
|
"description": "Expose card insertion status."
|
|
81
87
|
},
|
|
82
|
-
"
|
|
83
|
-
"title": "
|
|
88
|
+
"cardControls": {
|
|
89
|
+
"title": "Card Controls",
|
|
90
|
+
"type": "array",
|
|
91
|
+
"description": "Add switches that play a specific card ID on each Yoto device. Optionally add an accessory that plays the card on all Yotos.",
|
|
92
|
+
"items": {
|
|
93
|
+
"title": "Card Control",
|
|
94
|
+
"type": "object",
|
|
95
|
+
"properties": {
|
|
96
|
+
"label": {
|
|
97
|
+
"title": "Label",
|
|
98
|
+
"type": "string",
|
|
99
|
+
"required": true,
|
|
100
|
+
"description": "Name shown in HomeKit for this card control."
|
|
101
|
+
},
|
|
102
|
+
"cardId": {
|
|
103
|
+
"title": "Card ID",
|
|
104
|
+
"type": "string",
|
|
105
|
+
"required": true,
|
|
106
|
+
"description": "The Yoto card ID to play."
|
|
107
|
+
},
|
|
108
|
+
"playOnAll": {
|
|
109
|
+
"title": "Play on All Yotos",
|
|
110
|
+
"type": "boolean",
|
|
111
|
+
"default": false,
|
|
112
|
+
"description": "Create a separate accessory that plays this card on every Yoto."
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"dayMode": {
|
|
118
|
+
"title": "Day Mode",
|
|
84
119
|
"type": "boolean",
|
|
85
120
|
"default": true,
|
|
86
|
-
"description": "Expose
|
|
121
|
+
"description": "Expose day mode status."
|
|
87
122
|
},
|
|
88
123
|
"sleepTimer": {
|
|
89
124
|
"title": "Sleep Timer",
|
|
@@ -133,12 +168,30 @@
|
|
|
133
168
|
"type": "help",
|
|
134
169
|
"helpvalue": "<p>Select which HomeKit services to expose for each Yoto device.</p>"
|
|
135
170
|
},
|
|
136
|
-
|
|
137
|
-
|
|
171
|
+
{
|
|
172
|
+
"type": "help",
|
|
173
|
+
"helpvalue": "<p><strong>Playback Controls:</strong> External Smart Speaker requires additional pairing steps in the Home app and will appear as a separate accessory.</p>"
|
|
174
|
+
},
|
|
175
|
+
"services.playbackAccessory",
|
|
176
|
+
"services.battery",
|
|
138
177
|
"services.temperature",
|
|
139
178
|
"services.nightlight",
|
|
140
179
|
"services.cardSlot",
|
|
141
|
-
|
|
180
|
+
{
|
|
181
|
+
"type": "help",
|
|
182
|
+
"helpvalue": "<p><strong>Card Controls:</strong> Add switches that play a specific card ID on each Yoto. Enable \"Play on All Yotos\" to create a separate accessory.</p>"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"key": "services.cardControls",
|
|
186
|
+
"type": "array",
|
|
187
|
+
"buttonText": "Add Card Control",
|
|
188
|
+
"items": [
|
|
189
|
+
"services.cardControls[].label",
|
|
190
|
+
"services.cardControls[].cardId",
|
|
191
|
+
"services.cardControls[].playOnAll"
|
|
192
|
+
]
|
|
193
|
+
},
|
|
194
|
+
"services.dayMode",
|
|
142
195
|
"services.sleepTimer",
|
|
143
196
|
"services.bluetooth",
|
|
144
197
|
"services.volumeLimits"
|