homebridge-sony-audio-extended 0.0.3 → 0.0.5-test
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 +27 -36
- package/dist/api.d.ts +60 -25
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +24 -3
- package/dist/api.js.map +1 -1
- package/dist/discoverer.d.ts +4 -3
- package/dist/discoverer.d.ts.map +1 -1
- package/dist/discoverer.js +14 -36
- package/dist/discoverer.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/platform.js +2 -2
- package/dist/platform.js.map +1 -1
- package/dist/sonyAudioAccessory.d.ts +1 -0
- package/dist/sonyAudioAccessory.d.ts.map +1 -1
- package/dist/sonyAudioAccessory.js +57 -47
- package/dist/sonyAudioAccessory.js.map +1 -1
- package/dist/sonyAudioAccessorySettings.d.ts +1 -1
- package/dist/sonyAudioAccessorySettings.d.ts.map +1 -1
- package/dist/sonyAudioAccessorySettings.js +5 -1
- package/dist/sonyAudioAccessorySettings.js.map +1 -1
- package/dist/sonyDevice.d.ts +6 -4
- package/dist/sonyDevice.d.ts.map +1 -1
- package/dist/sonyDevice.js +105 -93
- package/dist/sonyDevice.js.map +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
+
|
|
1
2
|
<p align="center">
|
|
2
3
|
|
|
3
4
|
<img src="https://github.com/homebridge/branding/raw/master/logos/homebridge-wordmark-logo-vertical.png" width="150">
|
|
4
5
|
|
|
5
6
|
</p>
|
|
6
7
|
|
|
7
|
-
# Homebridge Sony Audio Plugin
|
|
8
8
|
|
|
9
|
+
# Homebridge Sony Audio Plugin
|
|
9
10
|
[](https://github.com/homebridge/homebridge/wiki/Verified-Plugins)
|
|
10
11
|
|
|
11
12
|
This is a Homebridge platform plugin allow control the power, volume and input source on a supported Sony audio products.
|
|
12
13
|
|
|
13
14
|
## Features you can control with Sony Audio Plugin
|
|
15
|
+
* power – turn on and off
|
|
16
|
+
* volume – control sound levels including mute via iOS Remote
|
|
17
|
+
* input source – identify sound inputs
|
|
18
|
+
* control arrows, select, back and information buttons via iOS Remote
|
|
19
|
+
* control of input names and their visibility
|
|
14
20
|
|
|
15
|
-
- power – turn on and off
|
|
16
|
-
- volume – control sound levels including mute via iOS Remote
|
|
17
|
-
- input source – identify sound inputs
|
|
18
|
-
- control arrows, select, back and information buttons via iOS Remote
|
|
19
|
-
- control of input names and their visibility
|
|
20
21
|
|
|
21
22
|
For multi-zone environments plugin control current active output zone.
|
|
22
23
|
|
|
23
24
|
## Which Sony devices support the Audio Control API?
|
|
24
|
-
|
|
25
25
|
The following Sony audio products are accessible via the Homebridge Sony Audio Plugin.
|
|
26
26
|
|
|
27
27
|
[**Soundbars**](#soundbars)
|
|
@@ -40,44 +40,38 @@ The following Sony audio products are accessible via the Homebridge Sony Audio P
|
|
|
40
40
|
|
|
41
41
|
### **Soundbars**
|
|
42
42
|
|
|
43
|
-
|
|
|
44
|
-
|
|
45
|
-
|
|
|
46
|
-
|
|
|
47
|
-
|
|
|
48
|
-
|
|
|
49
|
-
|
|
|
50
|
-
|
|
|
51
|
-
|
|
|
52
|
-
|
|
|
43
|
+
|Device|Description|More information|
|
|
44
|
+
|---|---|---|
|
|
45
|
+
|HT-A9|High Performance Home Theater System|<a href="https://electronics.sony.com/tv-video/tv-video-home-theater-sound-bars/soundbars/p/hta9">Product information|
|
|
46
|
+
|HT-A7000|7.1.2ch Dolby Atmos® Soundbar|<a href="https://electronics.sony.com/tv-video/tv-video-home-theater-sound-bars/soundbars/p/HT-A7000">Product information</a>|
|
|
47
|
+
|HT-A5000|5.1.2ch Dolby Atmos®/ DTS:X® Soundbar|<a href="https://www.sony.co.uk/electronics/sound-bars/ht-a5000">Product information</a>|
|
|
48
|
+
|HT-ST5000|7.1.2 channel Dolby Atmos/DTS:X soundbar with Wi-Fi/Bluetooth technology|<a href="https://www.sony.com/electronics/sound-bars/ht-st5000">Product information</a>|
|
|
49
|
+
|HT-MT500|2.1 channel compact soundbar with Wi-Fi/Bluetooth technology||
|
|
50
|
+
|HT-ZF9|3.1 channel Dolby Atmos/DTS:X soundbar with Wi-Fi/Bluetooth technology|<a href="https://www.sony.co.uk/electronics/sound-bars/ht-zf9">Product overview</a>|
|
|
51
|
+
|HT-Z9F|3.1 channel Dolby Atmos/DTS:X soundbar with Wi-Fi/Bluetooth technology|<a href="https://www.sony.com/electronics/sound-bars/ht-z9f">Product overview</a>|
|
|
52
|
+
|HT-CT800|2.1 channel soundbar with Wi-Fi/Bluetooth technology||
|
|
53
|
+
|
|
53
54
|
|
|
54
55
|
### **Receivers**
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
|
58
|
-
| STR-DN1080 | 7.2 channel home theater AV receiver | <a href="https://www.sony.co.uk/electronics/av-receivers/str-dn1080">Product information</a> |
|
|
59
|
-
| STR-AN1000 | 8K compatible 7.2 channel home theater AV receiver | <a href="https://www.sony.com/electronics/av-receivers/str-an1000">Product information</a> |
|
|
56
|
+
|Device|Description|More information|
|
|
57
|
+
|---|---|---|
|
|
58
|
+
|STR-DN1080|7.2 channel home theater AV receiver|<a href="https://www.sony.co.uk/electronics/av-receivers/str-dn1080">Product information</a>|
|
|
60
59
|
|
|
61
60
|
### **Speakers**
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
|
65
|
-
|
|
|
66
|
-
|
|
|
67
|
-
| SRS-ZR5 | Portable Wireless Bluetooth/Wi-Fi speaker" |
|
|
61
|
+
|Device|Description|More information|
|
|
62
|
+
|---|---|---|
|
|
63
|
+
|DeviceSRS-RA5000|Premium Wireless Speaker with Ambient Room-filling Sound|<a href="https://www.sony.co.uk/electronics/wireless-speakers/srs-ra5000" target="_blank">Product information</a>|
|
|
64
|
+
|SRS-RA3000|Premium Wireless Speaker with Ambient Room-filling Sound|<a href="https://www.sony.co.uk/electronics/wireless-speakers/srs-ra3000" target="_blank">Product information</a>|
|
|
65
|
+
|SRS-ZR5|Portable Wireless Bluetooth/Wi-Fi speaker"|
|
|
68
66
|
|
|
69
67
|
## Installation
|
|
70
|
-
|
|
71
68
|
If you are new to homebridge, please first read the homebridge [documentation](https://www.npmjs.com/package/homebridge).
|
|
72
69
|
|
|
73
70
|
### Install homebridge
|
|
74
|
-
|
|
75
71
|
```sh
|
|
76
72
|
npm install -g homebridge
|
|
77
73
|
```
|
|
78
|
-
|
|
79
74
|
### Install homebridge-sony-audio
|
|
80
|
-
|
|
81
75
|
```sh
|
|
82
76
|
npm install -g homebridge-sony-audio
|
|
83
77
|
```
|
|
@@ -86,7 +80,6 @@ npm install -g homebridge-sony-audio
|
|
|
86
80
|
|
|
87
81
|
No special configuration is required.\
|
|
88
82
|
Just add the `SonyAudio` platform to the platforms section:
|
|
89
|
-
|
|
90
83
|
```json
|
|
91
84
|
"platforms": [
|
|
92
85
|
{
|
|
@@ -94,7 +87,6 @@ Just add the `SonyAudio` platform to the platforms section:
|
|
|
94
87
|
}
|
|
95
88
|
]
|
|
96
89
|
```
|
|
97
|
-
|
|
98
90
|
## Adding devices
|
|
99
91
|
|
|
100
92
|
Devices are added automatically through the discovery process.
|
|
@@ -104,10 +96,9 @@ The discovery process to find products connected to your network, uses the Unive
|
|
|
104
96
|
For instructions, see the user manual for your product.
|
|
105
97
|
|
|
106
98
|
## Setting up
|
|
107
|
-
|
|
108
99
|
Finded devices will be publishing externally, so you need paired it seperately:
|
|
109
|
-
|
|
110
100
|
1. In Home.app select "Add Accessory"
|
|
111
101
|
2. Click "I Don't Have a code or Cannot Scan"
|
|
112
102
|
3. On the next screen you find the discovered devices
|
|
113
103
|
4. Tap one and enter the pin code from your homebridge instance.
|
|
104
|
+
|
package/dist/api.d.ts
CHANGED
|
@@ -14,7 +14,17 @@ export declare const ApiRequestSupportedApiInfo: {
|
|
|
14
14
|
* Request to get a general system information for the device.
|
|
15
15
|
* Docs [here](https://developer.sony.com/develop/audio-control-api/api-references/api-overview-2#_getsysteminformation_v1_4).
|
|
16
16
|
*/
|
|
17
|
-
export declare const
|
|
17
|
+
export declare const ApiRequestSystemInformationv1_4: {
|
|
18
|
+
method: string;
|
|
19
|
+
id: number;
|
|
20
|
+
params: never[];
|
|
21
|
+
version: string;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Request to get a general system information for the device.
|
|
25
|
+
* Docs [here](https://developer.sony.com/develop/audio-control-api/api-references/api-overview-2#_getsysteminformation_v1_6).
|
|
26
|
+
*/
|
|
27
|
+
export declare const ApiRequestSystemInformationv1_6: {
|
|
18
28
|
method: string;
|
|
19
29
|
id: number;
|
|
20
30
|
params: never[];
|
|
@@ -25,12 +35,23 @@ export declare const ApiRequestSystemInformation: {
|
|
|
25
35
|
* For a device that has no external input or output connectors, this APi should return an empty result with no error codes.
|
|
26
36
|
* Docs [here](https://developer.sony.com/develop/audio-control-api/api-references/api-overview-2#_getcurrentexternalterminalsstatus_v1_0).
|
|
27
37
|
*/
|
|
28
|
-
export declare const
|
|
38
|
+
export declare const ApiRequestCurrentExternalTerminalsStatusv1_0: {
|
|
29
39
|
method: string;
|
|
30
40
|
id: number;
|
|
31
41
|
params: never[];
|
|
32
42
|
version: string;
|
|
33
43
|
};
|
|
44
|
+
/**
|
|
45
|
+
* Request to get an information about the current status of all external input and output terminal sources of the device.
|
|
46
|
+
* For a device that has no external input or output connectors, this APi should return an empty result with no error codes.
|
|
47
|
+
* Docs [here](https://developer.sony.com/develop/audio-control-api/api-references/api-overview-2#_getcurrentexternalterminalsstatus_v1_2).
|
|
48
|
+
*/
|
|
49
|
+
export declare const ApiRequestCurrentExternalTerminalsStatusv1_2: {
|
|
50
|
+
method: string;
|
|
51
|
+
id: number;
|
|
52
|
+
params: {}[];
|
|
53
|
+
version: string;
|
|
54
|
+
};
|
|
34
55
|
/**
|
|
35
56
|
* Gets the current volume level and mute status.
|
|
36
57
|
* Uses for init info about volume settings.
|
|
@@ -75,7 +96,7 @@ export declare const ApiRequestGetInterfaceInformation: {
|
|
|
75
96
|
params: never[];
|
|
76
97
|
version: string;
|
|
77
98
|
};
|
|
78
|
-
export
|
|
99
|
+
export type ApiNotification = {
|
|
79
100
|
name: string;
|
|
80
101
|
version: string;
|
|
81
102
|
};
|
|
@@ -109,7 +130,9 @@ export interface ApiResponceNotifyVolumeInformation {
|
|
|
109
130
|
*/
|
|
110
131
|
export interface ApiResponceNotifyPowerStatus {
|
|
111
132
|
method: NotificationMethods.POWER;
|
|
112
|
-
params: [
|
|
133
|
+
params: [
|
|
134
|
+
PowerStatus
|
|
135
|
+
];
|
|
113
136
|
version?: string;
|
|
114
137
|
}
|
|
115
138
|
/**
|
|
@@ -118,7 +141,9 @@ export interface ApiResponceNotifyPowerStatus {
|
|
|
118
141
|
*/
|
|
119
142
|
export interface ApiResponceNotifyExternalTerminalStatus {
|
|
120
143
|
method: NotificationMethods.TERMINAL;
|
|
121
|
-
params: [
|
|
144
|
+
params: [
|
|
145
|
+
ExternalTerminal
|
|
146
|
+
];
|
|
122
147
|
version?: string;
|
|
123
148
|
}
|
|
124
149
|
/**
|
|
@@ -133,13 +158,13 @@ export interface PowerStatus {
|
|
|
133
158
|
*/
|
|
134
159
|
standbyDetail?: 'normalStandby' | 'quickStartStandby' | '';
|
|
135
160
|
/**
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
161
|
+
* The current power status of the device.
|
|
162
|
+
* * `active` - The device is in the power-on state.
|
|
163
|
+
* * `standby` - The device is in the standby state.
|
|
164
|
+
* Network functions are active, and the device can switch to the power-on state via a network command.
|
|
165
|
+
* * `shuttingDown` - The device is switching to the power-off state.
|
|
166
|
+
|
|
167
|
+
*/
|
|
143
168
|
status: 'activating' | 'active' | 'standby' | 'shuttingDown';
|
|
144
169
|
}
|
|
145
170
|
/**
|
|
@@ -149,13 +174,13 @@ export interface PowerStatus {
|
|
|
149
174
|
*/
|
|
150
175
|
export interface ExternalTerminal {
|
|
151
176
|
/**
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
177
|
+
* The active status of the terminal.
|
|
178
|
+
* For a terminal type of "meta:zone:output", the active status indicates whether the zone is enabled.
|
|
179
|
+
* For all other terminal types, the active status indicates whether the source is selected as an input source for any output zone.
|
|
180
|
+
* * `` - The active status could not be determined.
|
|
181
|
+
* * `active` - The terminal is enabled or a selected input source.
|
|
182
|
+
* * `inactive` - The terminal is disabled or not a selected input source.
|
|
183
|
+
*/
|
|
159
184
|
active?: '' | 'active' | 'inactive';
|
|
160
185
|
/**
|
|
161
186
|
* The connection status of the terminal.
|
|
@@ -205,7 +230,9 @@ export interface ExternalTerminal {
|
|
|
205
230
|
*/
|
|
206
231
|
export interface ApiResponcePowerStatus {
|
|
207
232
|
id: number;
|
|
208
|
-
result: [
|
|
233
|
+
result: [
|
|
234
|
+
PowerStatus
|
|
235
|
+
];
|
|
209
236
|
}
|
|
210
237
|
/**
|
|
211
238
|
* Describes the device volume settings.
|
|
@@ -247,7 +274,9 @@ export interface VolumeInformation {
|
|
|
247
274
|
*/
|
|
248
275
|
export interface ApiResponceVolumeInformation {
|
|
249
276
|
id: number;
|
|
250
|
-
result: [
|
|
277
|
+
result: [
|
|
278
|
+
VolumeInformation[]
|
|
279
|
+
];
|
|
251
280
|
}
|
|
252
281
|
/**
|
|
253
282
|
* Provides the list of schemes that device can handle.
|
|
@@ -271,7 +300,9 @@ export interface ApiResponceSchemeList {
|
|
|
271
300
|
*/
|
|
272
301
|
export interface ApiResponceExternalTerminalStatus {
|
|
273
302
|
id: number;
|
|
274
|
-
result: [
|
|
303
|
+
result: [
|
|
304
|
+
ExternalTerminal[]
|
|
305
|
+
];
|
|
275
306
|
}
|
|
276
307
|
/**
|
|
277
308
|
* Describes the device playing content.
|
|
@@ -294,14 +325,16 @@ export interface PlayingContentInfo {
|
|
|
294
325
|
*/
|
|
295
326
|
export interface ApiResponceNotifyPlayingContentInfo {
|
|
296
327
|
method: NotificationMethods.CONTENT;
|
|
297
|
-
params: [
|
|
328
|
+
params: [
|
|
329
|
+
PlayingContentInfo
|
|
330
|
+
];
|
|
298
331
|
version: string;
|
|
299
332
|
}
|
|
300
333
|
/**
|
|
301
334
|
* Responce type for Subscribes and unsubscribes to multiple notifications at a time.
|
|
302
335
|
* Docs [here](https://developer.sony.com/develop/audio-control-api/api-references/api-overview-2#_switchnotifications_v1_0)
|
|
303
336
|
*/
|
|
304
|
-
export
|
|
337
|
+
export type ApiResponceSwitchNotifications = {
|
|
305
338
|
id: number;
|
|
306
339
|
result: {
|
|
307
340
|
disabled: ApiNotification[];
|
|
@@ -522,7 +555,9 @@ export interface ApiRequestPlayingContentInfo {
|
|
|
522
555
|
*/
|
|
523
556
|
export interface ApiResponcePlayingContentInfo {
|
|
524
557
|
id: number;
|
|
525
|
-
result: [
|
|
558
|
+
result: [
|
|
559
|
+
PlayingContentInfo[]
|
|
560
|
+
];
|
|
526
561
|
}
|
|
527
562
|
/**
|
|
528
563
|
* Provides information of WebAPI interface provided by the server.
|
package/dist/api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,0BAA0B;;;;;;;CAStC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,0BAA0B;;;;;;;CAStC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,+BAA+B;;;;;CAK3C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,+BAA+B;;;;;CAK3C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,4CAA4C;;;;;CAKxD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,4CAA4C;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,4BAA4B;IAClC,QAAQ,iCAAiC;IACzC,OAAO,6BAA6B;CACrC"}
|
package/dist/api.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IncompatibleDeviceCategoryError = exports.UnsupportedVersionApiError = exports.GenericApiError = exports.ApiRequestGetInterfaceInformation = exports.ApiRequestGetSchemeList = exports.ApiRequestGetPowerStatus = exports.ApiRequestVolumeInformation = exports.
|
|
3
|
+
exports.IncompatibleDeviceCategoryError = exports.UnsupportedVersionApiError = exports.GenericApiError = exports.ApiRequestGetInterfaceInformation = exports.ApiRequestGetSchemeList = exports.ApiRequestGetPowerStatus = exports.ApiRequestVolumeInformation = exports.ApiRequestCurrentExternalTerminalsStatusv1_2 = exports.ApiRequestCurrentExternalTerminalsStatusv1_0 = exports.ApiRequestSystemInformationv1_6 = exports.ApiRequestSystemInformationv1_4 = exports.ApiRequestSupportedApiInfo = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Request to get a supported services and its information
|
|
6
6
|
* Docs [here](https://developer.sony.com/develop/audio-control-api/api-references/api-overview-2#_getsupportedapiinfo_v1_0).
|
|
@@ -19,7 +19,17 @@ exports.ApiRequestSupportedApiInfo = {
|
|
|
19
19
|
* Request to get a general system information for the device.
|
|
20
20
|
* Docs [here](https://developer.sony.com/develop/audio-control-api/api-references/api-overview-2#_getsysteminformation_v1_4).
|
|
21
21
|
*/
|
|
22
|
-
exports.
|
|
22
|
+
exports.ApiRequestSystemInformationv1_4 = {
|
|
23
|
+
method: 'getSystemInformation',
|
|
24
|
+
id: 64,
|
|
25
|
+
params: [],
|
|
26
|
+
version: '1.4',
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Request to get a general system information for the device.
|
|
30
|
+
* Docs [here](https://developer.sony.com/develop/audio-control-api/api-references/api-overview-2#_getsysteminformation_v1_6).
|
|
31
|
+
*/
|
|
32
|
+
exports.ApiRequestSystemInformationv1_6 = {
|
|
23
33
|
method: 'getSystemInformation',
|
|
24
34
|
id: 65,
|
|
25
35
|
params: [],
|
|
@@ -30,12 +40,23 @@ exports.ApiRequestSystemInformation = {
|
|
|
30
40
|
* For a device that has no external input or output connectors, this APi should return an empty result with no error codes.
|
|
31
41
|
* Docs [here](https://developer.sony.com/develop/audio-control-api/api-references/api-overview-2#_getcurrentexternalterminalsstatus_v1_0).
|
|
32
42
|
*/
|
|
33
|
-
exports.
|
|
43
|
+
exports.ApiRequestCurrentExternalTerminalsStatusv1_0 = {
|
|
34
44
|
method: 'getCurrentExternalTerminalsStatus',
|
|
35
45
|
id: 66,
|
|
36
46
|
params: [],
|
|
37
47
|
version: '1.0',
|
|
38
48
|
};
|
|
49
|
+
/**
|
|
50
|
+
* Request to get an information about the current status of all external input and output terminal sources of the device.
|
|
51
|
+
* For a device that has no external input or output connectors, this APi should return an empty result with no error codes.
|
|
52
|
+
* Docs [here](https://developer.sony.com/develop/audio-control-api/api-references/api-overview-2#_getcurrentexternalterminalsstatus_v1_2).
|
|
53
|
+
*/
|
|
54
|
+
exports.ApiRequestCurrentExternalTerminalsStatusv1_2 = {
|
|
55
|
+
method: 'getCurrentExternalTerminalsStatus',
|
|
56
|
+
id: 67,
|
|
57
|
+
params: [{}],
|
|
58
|
+
version: '1.2',
|
|
59
|
+
};
|
|
39
60
|
/**
|
|
40
61
|
* Gets the current volume level and mute status.
|
|
41
62
|
* Uses for init info about volume settings.
|
package/dist/api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACU,QAAA,0BAA0B,GAAG;IACxC,EAAE,EAAE,CAAC;IACL,MAAM,EAAE,qBAAqB;IAC7B,MAAM,
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACU,QAAA,0BA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G;AACU,QAAA,iCAAiC,GAAG;IAC/C,MAAM,EAAE,yBAAyB;IACjC,EAAE,EAAE,EAAE;IACN,MAAM,EAAE,EAAE;IACV,OAAO,EAAE,KAAK;CACf,CAAC;AA6gBF,MAAa,eAAgB,SAAQ,KAAK;IAGxC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,0BAA0B,CAAC,SAAS,CAAC,CAAC;QAClE,IAAI,KAAK,CAAC,iBAAiB,EAAE;YAC3B,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;SAChD;QACD,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;QAChC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC;IAChB,CAAC;CACF;AAZD,0CAYC;AAED,MAAa,0BAA2B,SAAQ,eAAe;IAG7D,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,yBAAyB,CAAC;QACtC,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC;IACjB,CAAC;CACF;AARD,gEAQC;AAED,MAAa,+BAAgC,SAAQ,KAAK;IACxD,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,+BAA+B,CAAC,SAAS,CAAC,CAAC;QACvE,IAAI,KAAK,CAAC,iBAAiB,EAAE;YAC3B,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,+BAA+B,CAAC,CAAC;SAChE;QACD,IAAI,CAAC,IAAI,GAAG,8BAA8B,CAAC;IAC7C,CAAC;CACF;AATD,0EASC"}
|
package/dist/discoverer.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
|
|
3
|
-
import EventEmitter from 'events';
|
|
4
|
-
import { Logger } from 'homebridge';
|
|
2
|
+
/// <reference types="node" />
|
|
5
3
|
import { SonyDevice } from './sonyDevice';
|
|
4
|
+
import { Logger } from 'homebridge';
|
|
5
|
+
import { AxiosResponse } from 'axios';
|
|
6
6
|
import { URL } from 'url';
|
|
7
|
+
import EventEmitter from 'events';
|
|
7
8
|
export declare const enum DiscoveryEvents {
|
|
8
9
|
NewDeviceFound = "new-device-found"
|
|
9
10
|
}
|
package/dist/discoverer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discoverer.d.ts","sourceRoot":"","sources":["../src/discoverer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"discoverer.d.ts","sourceRoot":"","sources":["../src/discoverer.ts"],"names":[],"mappings":";;AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAc,EAAiB,aAAa,EAAc,MAAM,OAAO,CAAC;AAGxE,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,YAAY,MAAM,QAAQ,CAAC;AAOlC,0BAAkB,eAAe;IAC/B,cAAc,qBAAqB;CACpC;AAID;;;GAGG;AACH,qBAAa,UAAW,SAAQ,YAAY;IAWxC,OAAO,CAAC,QAAQ,CAAC,GAAG;IAVtB,OAAO,CAAC,OAAO,CAA0C;IACzD,OAAO,CAAC,UAAU,CAAC;IACnB,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,MAAM,CAAC,CAAiB;IAChC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAsB;gBAGjB,GAAG,EAAE,MAAM;IAiB9B;;;OAGG;IACI,cAAc;IAOrB;;OAEG;IACI,aAAa;IAMpB,kBAAkB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM;IA8BhE,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG;IAmFzC,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IA0B3F;;;;OAIG;IACH,mBAAmB,CAAC,QAAQ,EAAE,aAAa;CAS5C"}
|
package/dist/discoverer.js
CHANGED
|
@@ -4,14 +4,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.Discoverer = void 0;
|
|
7
|
-
const api_1 = require("./api");
|
|
8
|
-
const axios_1 = __importDefault(require("axios"));
|
|
9
|
-
const events_1 = __importDefault(require("events"));
|
|
10
7
|
/* eslint-disable max-len */
|
|
11
8
|
const sonyDevice_1 = require("./sonyDevice");
|
|
12
|
-
const
|
|
9
|
+
const api_1 = require("./api");
|
|
13
10
|
const node_ssdp_1 = require("node-ssdp");
|
|
11
|
+
const axios_1 = __importDefault(require("axios"));
|
|
14
12
|
const fast_xml_parser_1 = __importDefault(require("fast-xml-parser"));
|
|
13
|
+
const url_1 = require("url");
|
|
14
|
+
const events_1 = __importDefault(require("events"));
|
|
15
15
|
/**
|
|
16
16
|
* The search target for devices supporting Audio Control API
|
|
17
17
|
*/
|
|
@@ -86,8 +86,7 @@ class Discoverer extends events_1.default {
|
|
|
86
86
|
return;
|
|
87
87
|
}
|
|
88
88
|
// retrieve the device description
|
|
89
|
-
axios_1.default
|
|
90
|
-
.get(location.href)
|
|
89
|
+
axios_1.default.get(location.href)
|
|
91
90
|
.then((response) => {
|
|
92
91
|
var _a, _b, _c;
|
|
93
92
|
this.errors.delete(location.href); // clear error if device responded
|
|
@@ -112,8 +111,7 @@ class Discoverer extends events_1.default {
|
|
|
112
111
|
}
|
|
113
112
|
this.devices.set(usn, 'REGISTERING');
|
|
114
113
|
// Retrive IRCC service url
|
|
115
|
-
const serviceList = deviceDescription.root.device.serviceList
|
|
116
|
-
.service;
|
|
114
|
+
const serviceList = deviceDescription.root.device.serviceList.service;
|
|
117
115
|
let irccServiceUrl = '';
|
|
118
116
|
let irccServiceExist = false;
|
|
119
117
|
for (let i = 0; i < serviceList.length; i++) {
|
|
@@ -125,16 +123,7 @@ class Discoverer extends events_1.default {
|
|
|
125
123
|
}
|
|
126
124
|
}
|
|
127
125
|
const reAbsoluteUrl = new RegExp('^(?:[a-z]+:)?//', 'i');
|
|
128
|
-
const upnpBaseUrl = irccServiceExist
|
|
129
|
-
? reAbsoluteUrl.test(irccServiceUrl)
|
|
130
|
-
? irccServiceUrl
|
|
131
|
-
: location.protocol +
|
|
132
|
-
'//' +
|
|
133
|
-
location.hostname +
|
|
134
|
-
':' +
|
|
135
|
-
location.port +
|
|
136
|
-
irccServiceUrl
|
|
137
|
-
: '';
|
|
126
|
+
const upnpBaseUrl = irccServiceExist ? reAbsoluteUrl.test(irccServiceUrl) ? irccServiceUrl : location.protocol + '//' + location.hostname + ':' + location.port + irccServiceUrl : '';
|
|
138
127
|
const deviceBaseUrl = (_c = deviceDescription.root.device['av:X_ScalarWebAPI_DeviceInfo']) === null || _c === void 0 ? void 0 : _c['av:X_ScalarWebAPI_BaseURL'];
|
|
139
128
|
// const deviceServices = deviceDescription.root.device['av:X_ScalarWebAPI_DeviceInfo']?.['av:X_ScalarWebAPI_ServiceList']?.['av:X_ScalarWebAPI_ServiceType'];
|
|
140
129
|
const deviceFriendlyName = deviceDescription.root.device.friendlyName;
|
|
@@ -148,25 +137,16 @@ class Discoverer extends events_1.default {
|
|
|
148
137
|
this.devices.set(usn, null);
|
|
149
138
|
return;
|
|
150
139
|
}
|
|
151
|
-
this.createDevice(deviceBaseUrl, upnpBaseUrl, deviceUDN, {
|
|
152
|
-
|
|
153
|
-
manufacturer: deviceManufacturer,
|
|
154
|
-
modelName: deviceModelName,
|
|
155
|
-
})
|
|
156
|
-
.then((device) => {
|
|
140
|
+
this.createDevice(deviceBaseUrl, upnpBaseUrl, deviceUDN, { friendlyName: deviceFriendlyName, manufacturer: deviceManufacturer, modelName: deviceModelName })
|
|
141
|
+
.then(device => {
|
|
157
142
|
this.devices.set(usn, device);
|
|
158
143
|
// emit an event about new found device
|
|
159
|
-
this.emit("new-device-found" /* NewDeviceFound */, device);
|
|
144
|
+
this.emit("new-device-found" /* DiscoveryEvents.NewDeviceFound */, device);
|
|
160
145
|
this.log.info('Compatible device found, added:', device.systemInfo.name);
|
|
161
146
|
})
|
|
162
|
-
.catch((
|
|
147
|
+
.catch(() => {
|
|
163
148
|
this.devices.set(usn, null);
|
|
164
|
-
|
|
165
|
-
this.log.info('Incompatible device found, skipped:', deviceFriendlyName, '-', err.message);
|
|
166
|
-
}
|
|
167
|
-
else {
|
|
168
|
-
this.log.info('Incompatible device found, skipped:', deviceFriendlyName);
|
|
169
|
-
}
|
|
149
|
+
this.log.info('Incompatible device found, skipped:', deviceFriendlyName);
|
|
170
150
|
});
|
|
171
151
|
})
|
|
172
152
|
.catch((err) => {
|
|
@@ -185,13 +165,11 @@ class Discoverer extends events_1.default {
|
|
|
185
165
|
sonyDevice_1.SonyDevice.createDevice(deviceUrl, upnpUrl, udn, this.log)
|
|
186
166
|
.then((device) => {
|
|
187
167
|
device.systemInfo.name = opt.friendlyName ? opt.friendlyName : '';
|
|
188
|
-
device.manufacturer = opt.manufacturer
|
|
189
|
-
? opt.manufacturer
|
|
190
|
-
: device.manufacturer;
|
|
168
|
+
device.manufacturer = opt.manufacturer ? opt.manufacturer : device.manufacturer;
|
|
191
169
|
device.systemInfo.model = opt.modelName ? opt.modelName : '';
|
|
192
170
|
resolve(device);
|
|
193
171
|
})
|
|
194
|
-
.catch(
|
|
172
|
+
.catch(err => {
|
|
195
173
|
if (err instanceof api_1.UnsupportedVersionApiError) {
|
|
196
174
|
this.log.debug(err.message);
|
|
197
175
|
}
|
package/dist/discoverer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discoverer.js","sourceRoot":"","sources":["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CAAC,QAAuB;QACzC,IAAI,OAAO,IAAI,QAAQ,CAAC,IAAI,EAAE;YAC5B,iEAAiE;YACjE,MAAM,MAAM,GAAG,4BAA4B,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;YAC3E,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,qBAAe,CAAC,MAAM,CAAC,CAAC,CAAC;SACpD;aAAM;YACL,OAAO,QAAQ,CAAC;SACjB;IACH,CAAC;CACF;AAzMD,gCAyMC"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAKjC;;GAEG;8BACY,GAAG;AAAlB,kBAEE"}
|
package/dist/platform.js
CHANGED
|
@@ -54,7 +54,7 @@ class SonyAudioHomebridgePlatform {
|
|
|
54
54
|
discoverDevices() {
|
|
55
55
|
// Start discovering Sony devices on the network
|
|
56
56
|
this.discoverer.startDiscovery();
|
|
57
|
-
this.discoverer.on("new-device-found" /* NewDeviceFound */, device => this.publishDevice(device));
|
|
57
|
+
this.discoverer.on("new-device-found" /* DiscoveryEvents.NewDeviceFound */, device => this.publishDevice(device));
|
|
58
58
|
}
|
|
59
59
|
publishDevice(device) {
|
|
60
60
|
// generate a unique id for the accessory this should be generated from
|
|
@@ -83,7 +83,7 @@ class SonyAudioHomebridgePlatform {
|
|
|
83
83
|
// the accessory does not yet exist, so we need to create it
|
|
84
84
|
this.log.info('Adding new accessory:', device.systemInfo.name);
|
|
85
85
|
// create a new Sony Audio accessory
|
|
86
|
-
const accessory = new this.api.platformAccessory(device.systemInfo.name, uuid, 34 /* AUDIO_RECEIVER */);
|
|
86
|
+
const accessory = new this.api.platformAccessory(device.systemInfo.name, uuid, 34 /* Categories.AUDIO_RECEIVER */);
|
|
87
87
|
// store a copy of the device object in the `accessory.context`
|
|
88
88
|
accessory.context = device;
|
|
89
89
|
// create the accessory handler for the newly create accessory
|
package/dist/platform.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform.js","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":";;;AAEA,yCAAwD;AACxD,6DAA0D;AAC1D,6CAA2D;AAG3D;;;;GAIG;AACH,MAAa,2BAA2B;IAUtC,YACkB,GAAW,EACX,MAAsB,EACtB,GAAQ;QAFR,QAAG,GAAH,GAAG,CAAQ;QACX,WAAM,GAAN,MAAM,CAAgB;QACtB,QAAG,GAAH,GAAG,CAAK;QAZV,YAAO,GAAmB,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC;QAC/C,mBAAc,GAA0B,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,cAAc,CAAC;QAEpF,oDAAoD;QACpC,gBAAW,GAAoC,EAAE,CAAC;QAElD,YAAO,GAAiB,EAAE,CAAC;QAQzC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,iCAAiC,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QACxE,IAAI,CAAC,UAAU,GAAG,IAAI,uBAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAE3C,8FAA8F;QAC9F,4FAA4F;QAC5F,2FAA2F;QAC3F,yCAAyC;QACzC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,oBAAoB,EAAE,GAAG,EAAE;YACrC,GAAG,CAAC,KAAK,CAAC,yEAAyE,CAAC,CAAC;YACrF,IAAI,CAAC,eAAe,EAAE,CAAC;QACzB,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,UAAU,EAAE,GAA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D;YAC9D,IAAI,uCAAkB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;YAExC,wEAAwE;YACxE,IAAI,CAAC,GAAG,CAAC,0BAA0B,CAAC,sBAAW,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;SAC/D;QAED,iDAAiD;QACjD,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC5B,CAAC;CACF;AAvGD,kEAuGC"}
|
|
@@ -49,6 +49,7 @@ export declare class SonyAudioAccessory {
|
|
|
49
49
|
onChangePower(power: boolean): void;
|
|
50
50
|
onChangeSource(source: string): void;
|
|
51
51
|
setVolume(value: CharacteristicValue, callback: CharacteristicSetCallback): void;
|
|
52
|
+
setVolumeAbsolute(value: CharacteristicValue, callback: CharacteristicSetCallback): void;
|
|
52
53
|
setMute(value: CharacteristicValue, callback: CharacteristicSetCallback): void;
|
|
53
54
|
setPower(value: CharacteristicValue, callback: CharacteristicSetCallback): void;
|
|
54
55
|
setSource(value: CharacteristicValue, callback: CharacteristicSetCallback): void;
|