samsung_wam_api 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +7 -1
- data/fixtures/vcr_cassettes/cloud_disconnected.yml +175 -0
- data/fixtures/vcr_cassettes/cloud_playing.yml +199 -0
- data/fixtures/vcr_cassettes/inputs.yml +269 -0
- data/fixtures/vcr_cassettes/unmuted.yml +40 -40
- data/lib/samsung_wam_api/device.rb +45 -4
- data/lib/samsung_wam_api/version.rb +1 -1
- data/samsung_wam_api.gemspec +2 -1
- metadata +22 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 307544974137a94b2ed8954f085853a8d0a722e373718bd7895a6fde38fde48b
|
4
|
+
data.tar.gz: e2c3b96a6e5746afb0d9be7c203f323ae0cc86a33c3d04d30667b9737d4dc005
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c8e1ed87bc53a3b9a16b33ee2572053db8de3e32ba84e2be1d9588b403b484f0471a24bffab35f01977772aa976f38678440a87d8456141d7f074c320dd7fd5
|
7
|
+
data.tar.gz: e070d44e95fd5752498f2830bef66145d27fe5aa2986d3dbcaf9e0aae834900f7be094cb5be85f9b82850d7c5970c4f639bd223f7f1b7c69122008258accfb77
|
data/README.md
CHANGED
@@ -22,7 +22,7 @@ Or install it yourself as:
|
|
22
22
|
|
23
23
|
```ruby
|
24
24
|
require 'samsung_wam_api'
|
25
|
-
living_room_soundbar = SamsungWamApi::Device.new(ip: 192.168.0.1)
|
25
|
+
living_room_soundbar = SamsungWamApi::Device.new(ip: '192.168.0.1')
|
26
26
|
living_room_soundbar.off? # => true
|
27
27
|
living_room_soundbar.on!
|
28
28
|
living_room_soundbar.volume # => 15
|
@@ -33,6 +33,12 @@ living_room_soundbar.muted? # => false
|
|
33
33
|
living_room_soundbar.mute!
|
34
34
|
living_room_soundbar.unmute!
|
35
35
|
living_room_soundbar.toggle_mute!
|
36
|
+
living_room_soundbar.input
|
37
|
+
living_room_soundbar.set_input!('aux')
|
38
|
+
living_room_soundbar.cloud_provider_info
|
39
|
+
living_room_soundbar.play_info
|
40
|
+
living_room_soundbar.audio_info
|
41
|
+
living_room_soundbar.cloud_username
|
36
42
|
|
37
43
|
```
|
38
44
|
|
@@ -0,0 +1,175 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://192.168.22.144:55001/CPM?cmd=%3Cname%3EGetCpInfo%3C/name%3E
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- "*/*"
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
Host:
|
17
|
+
- 192.168.22.144:55001
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Date:
|
24
|
+
- Mon, 06 Apr 2020 19:20:21 GMT
|
25
|
+
Server:
|
26
|
+
- Samsung/1.0
|
27
|
+
Content-Type:
|
28
|
+
- text/html
|
29
|
+
Content-Length:
|
30
|
+
- '319'
|
31
|
+
Connection:
|
32
|
+
- close
|
33
|
+
Last-Modified:
|
34
|
+
- Mon, 06 Apr 2020 19:20:21 GMT
|
35
|
+
body:
|
36
|
+
encoding: UTF-8
|
37
|
+
string: |-
|
38
|
+
<?xml version="1.0" encoding="UTF-8"?><CPM><method>CpInfo</method><version>0.1</version><speakerip>192.168.22.144</speakerip><user_identifier>public</user_identifier><response result="ok">
|
39
|
+
<cpname>Spotify</cpname>
|
40
|
+
<timestamp>2020-04-06T18:52:22Z</timestamp>
|
41
|
+
<signinstatus>0</signinstatus>
|
42
|
+
</response>
|
43
|
+
</CPM>
|
44
|
+
http_version:
|
45
|
+
recorded_at: Mon, 06 Apr 2020 19:20:22 GMT
|
46
|
+
- request:
|
47
|
+
method: get
|
48
|
+
uri: http://192.168.22.144:55001/CPM?cmd=%3Cname%3EGetCpInfo%3C/name%3E
|
49
|
+
body:
|
50
|
+
encoding: US-ASCII
|
51
|
+
string: ''
|
52
|
+
headers:
|
53
|
+
Accept-Encoding:
|
54
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
55
|
+
Accept:
|
56
|
+
- "*/*"
|
57
|
+
User-Agent:
|
58
|
+
- Ruby
|
59
|
+
Host:
|
60
|
+
- 192.168.22.144:55001
|
61
|
+
response:
|
62
|
+
status:
|
63
|
+
code: 200
|
64
|
+
message: OK
|
65
|
+
headers:
|
66
|
+
Date:
|
67
|
+
- Mon, 06 Apr 2020 19:20:21 GMT
|
68
|
+
Server:
|
69
|
+
- Samsung/1.0
|
70
|
+
Content-Type:
|
71
|
+
- text/html
|
72
|
+
Content-Length:
|
73
|
+
- '319'
|
74
|
+
Connection:
|
75
|
+
- close
|
76
|
+
Last-Modified:
|
77
|
+
- Mon, 06 Apr 2020 19:20:21 GMT
|
78
|
+
body:
|
79
|
+
encoding: UTF-8
|
80
|
+
string: |-
|
81
|
+
<?xml version="1.0" encoding="UTF-8"?><CPM><method>CpInfo</method><version>0.1</version><speakerip>192.168.22.144</speakerip><user_identifier>public</user_identifier><response result="ok">
|
82
|
+
<cpname>Spotify</cpname>
|
83
|
+
<timestamp>2020-04-06T18:52:22Z</timestamp>
|
84
|
+
<signinstatus>0</signinstatus>
|
85
|
+
</response>
|
86
|
+
</CPM>
|
87
|
+
http_version:
|
88
|
+
recorded_at: Mon, 06 Apr 2020 19:20:22 GMT
|
89
|
+
- request:
|
90
|
+
method: get
|
91
|
+
uri: http://192.168.22.144:55001/CPM?cmd=%3Cname%3EGetCpInfo%3C/name%3E
|
92
|
+
body:
|
93
|
+
encoding: US-ASCII
|
94
|
+
string: ''
|
95
|
+
headers:
|
96
|
+
Accept-Encoding:
|
97
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
98
|
+
Accept:
|
99
|
+
- "*/*"
|
100
|
+
User-Agent:
|
101
|
+
- Ruby
|
102
|
+
Host:
|
103
|
+
- 192.168.22.144:55001
|
104
|
+
response:
|
105
|
+
status:
|
106
|
+
code: 200
|
107
|
+
message: OK
|
108
|
+
headers:
|
109
|
+
Date:
|
110
|
+
- Mon, 06 Apr 2020 19:20:21 GMT
|
111
|
+
Server:
|
112
|
+
- Samsung/1.0
|
113
|
+
Content-Type:
|
114
|
+
- text/html
|
115
|
+
Content-Length:
|
116
|
+
- '319'
|
117
|
+
Connection:
|
118
|
+
- close
|
119
|
+
Last-Modified:
|
120
|
+
- Mon, 06 Apr 2020 19:20:21 GMT
|
121
|
+
body:
|
122
|
+
encoding: UTF-8
|
123
|
+
string: |-
|
124
|
+
<?xml version="1.0" encoding="UTF-8"?><CPM><method>CpInfo</method><version>0.1</version><speakerip>192.168.22.144</speakerip><user_identifier>public</user_identifier><response result="ok">
|
125
|
+
<cpname>Spotify</cpname>
|
126
|
+
<timestamp>2020-04-06T18:52:22Z</timestamp>
|
127
|
+
<signinstatus>0</signinstatus>
|
128
|
+
</response>
|
129
|
+
</CPM>
|
130
|
+
http_version:
|
131
|
+
recorded_at: Mon, 06 Apr 2020 19:20:22 GMT
|
132
|
+
- request:
|
133
|
+
method: get
|
134
|
+
uri: http://192.168.22.144:55001/CPM?cmd=%3Cname%3EGetCpInfo%3C/name%3E
|
135
|
+
body:
|
136
|
+
encoding: US-ASCII
|
137
|
+
string: ''
|
138
|
+
headers:
|
139
|
+
Accept-Encoding:
|
140
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
141
|
+
Accept:
|
142
|
+
- "*/*"
|
143
|
+
User-Agent:
|
144
|
+
- Ruby
|
145
|
+
Host:
|
146
|
+
- 192.168.22.144:55001
|
147
|
+
response:
|
148
|
+
status:
|
149
|
+
code: 200
|
150
|
+
message: OK
|
151
|
+
headers:
|
152
|
+
Date:
|
153
|
+
- Mon, 06 Apr 2020 19:20:21 GMT
|
154
|
+
Server:
|
155
|
+
- Samsung/1.0
|
156
|
+
Content-Type:
|
157
|
+
- text/html
|
158
|
+
Content-Length:
|
159
|
+
- '319'
|
160
|
+
Connection:
|
161
|
+
- close
|
162
|
+
Last-Modified:
|
163
|
+
- Mon, 06 Apr 2020 19:20:21 GMT
|
164
|
+
body:
|
165
|
+
encoding: UTF-8
|
166
|
+
string: |-
|
167
|
+
<?xml version="1.0" encoding="UTF-8"?><CPM><method>CpInfo</method><version>0.1</version><speakerip>192.168.22.144</speakerip><user_identifier>public</user_identifier><response result="ok">
|
168
|
+
<cpname>Spotify</cpname>
|
169
|
+
<timestamp>2020-04-06T18:52:22Z</timestamp>
|
170
|
+
<signinstatus>0</signinstatus>
|
171
|
+
</response>
|
172
|
+
</CPM>
|
173
|
+
http_version:
|
174
|
+
recorded_at: Mon, 06 Apr 2020 19:20:23 GMT
|
175
|
+
recorded_with: VCR 4.0.0
|
@@ -0,0 +1,199 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://192.168.22.144:55001/CPM?cmd=%3Cname%3EGetCpInfo%3C/name%3E
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- "*/*"
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
Host:
|
17
|
+
- 192.168.22.144:55001
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Date:
|
24
|
+
- Mon, 06 Apr 2020 19:14:56 GMT
|
25
|
+
Server:
|
26
|
+
- Samsung/1.0
|
27
|
+
Content-Type:
|
28
|
+
- text/html
|
29
|
+
Content-Length:
|
30
|
+
- '555'
|
31
|
+
Connection:
|
32
|
+
- close
|
33
|
+
Last-Modified:
|
34
|
+
- Mon, 06 Apr 2020 19:14:56 GMT
|
35
|
+
body:
|
36
|
+
encoding: UTF-8
|
37
|
+
string: |-
|
38
|
+
<?xml version="1.0" encoding="UTF-8"?><CPM><method>CpInfo</method><version>0.1</version><speakerip>192.168.22.144</speakerip><user_identifier>public</user_identifier><response result="ok">
|
39
|
+
<cpname>Spotify</cpname>
|
40
|
+
<timestamp>2020-04-06T18:52:22Z</timestamp>
|
41
|
+
<signinstatus>1</signinstatus>
|
42
|
+
<username>tester</username>
|
43
|
+
<playstatus>play</playstatus>
|
44
|
+
<audioinfo>
|
45
|
+
<title>For What It's Worth</title>
|
46
|
+
<thumbnail>http://o.scdn.co/640/ab67616d00001e02c875f772b3e01748ffd5c0d2</thumbnail>
|
47
|
+
</audioinfo>
|
48
|
+
</response>
|
49
|
+
</CPM>
|
50
|
+
http_version:
|
51
|
+
recorded_at: Mon, 06 Apr 2020 19:14:57 GMT
|
52
|
+
- request:
|
53
|
+
method: get
|
54
|
+
uri: http://192.168.22.144:55001/CPM?cmd=%3Cname%3EGetCpInfo%3C/name%3E
|
55
|
+
body:
|
56
|
+
encoding: US-ASCII
|
57
|
+
string: ''
|
58
|
+
headers:
|
59
|
+
Accept-Encoding:
|
60
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
61
|
+
Accept:
|
62
|
+
- "*/*"
|
63
|
+
User-Agent:
|
64
|
+
- Ruby
|
65
|
+
Host:
|
66
|
+
- 192.168.22.144:55001
|
67
|
+
response:
|
68
|
+
status:
|
69
|
+
code: 200
|
70
|
+
message: OK
|
71
|
+
headers:
|
72
|
+
Date:
|
73
|
+
- Mon, 06 Apr 2020 19:14:56 GMT
|
74
|
+
Server:
|
75
|
+
- Samsung/1.0
|
76
|
+
Content-Type:
|
77
|
+
- text/html
|
78
|
+
Content-Length:
|
79
|
+
- '555'
|
80
|
+
Connection:
|
81
|
+
- close
|
82
|
+
Last-Modified:
|
83
|
+
- Mon, 06 Apr 2020 19:14:56 GMT
|
84
|
+
body:
|
85
|
+
encoding: UTF-8
|
86
|
+
string: |-
|
87
|
+
<?xml version="1.0" encoding="UTF-8"?><CPM><method>CpInfo</method><version>0.1</version><speakerip>192.168.22.144</speakerip><user_identifier>public</user_identifier><response result="ok">
|
88
|
+
<cpname>Spotify</cpname>
|
89
|
+
<timestamp>2020-04-06T18:52:22Z</timestamp>
|
90
|
+
<signinstatus>1</signinstatus>
|
91
|
+
<username>tester</username>
|
92
|
+
<playstatus>play</playstatus>
|
93
|
+
<audioinfo>
|
94
|
+
<title>For What It's Worth</title>
|
95
|
+
<thumbnail>http://o.scdn.co/640/ab67616d00001e02c875f772b3e01748ffd5c0d2</thumbnail>
|
96
|
+
</audioinfo>
|
97
|
+
</response>
|
98
|
+
</CPM>
|
99
|
+
http_version:
|
100
|
+
recorded_at: Mon, 06 Apr 2020 19:14:57 GMT
|
101
|
+
- request:
|
102
|
+
method: get
|
103
|
+
uri: http://192.168.22.144:55001/CPM?cmd=%3Cname%3EGetCpInfo%3C/name%3E
|
104
|
+
body:
|
105
|
+
encoding: US-ASCII
|
106
|
+
string: ''
|
107
|
+
headers:
|
108
|
+
Accept-Encoding:
|
109
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
110
|
+
Accept:
|
111
|
+
- "*/*"
|
112
|
+
User-Agent:
|
113
|
+
- Ruby
|
114
|
+
Host:
|
115
|
+
- 192.168.22.144:55001
|
116
|
+
response:
|
117
|
+
status:
|
118
|
+
code: 200
|
119
|
+
message: OK
|
120
|
+
headers:
|
121
|
+
Date:
|
122
|
+
- Mon, 06 Apr 2020 19:14:56 GMT
|
123
|
+
Server:
|
124
|
+
- Samsung/1.0
|
125
|
+
Content-Type:
|
126
|
+
- text/html
|
127
|
+
Content-Length:
|
128
|
+
- '555'
|
129
|
+
Connection:
|
130
|
+
- close
|
131
|
+
Last-Modified:
|
132
|
+
- Mon, 06 Apr 2020 19:14:56 GMT
|
133
|
+
body:
|
134
|
+
encoding: UTF-8
|
135
|
+
string: |-
|
136
|
+
<?xml version="1.0" encoding="UTF-8"?><CPM><method>CpInfo</method><version>0.1</version><speakerip>192.168.22.144</speakerip><user_identifier>public</user_identifier><response result="ok">
|
137
|
+
<cpname>Spotify</cpname>
|
138
|
+
<timestamp>2020-04-06T18:52:22Z</timestamp>
|
139
|
+
<signinstatus>1</signinstatus>
|
140
|
+
<username>tester</username>
|
141
|
+
<playstatus>play</playstatus>
|
142
|
+
<audioinfo>
|
143
|
+
<title>For What It's Worth</title>
|
144
|
+
<thumbnail>http://o.scdn.co/640/ab67616d00001e02c875f772b3e01748ffd5c0d2</thumbnail>
|
145
|
+
</audioinfo>
|
146
|
+
</response>
|
147
|
+
</CPM>
|
148
|
+
http_version:
|
149
|
+
recorded_at: Mon, 06 Apr 2020 19:14:57 GMT
|
150
|
+
- request:
|
151
|
+
method: get
|
152
|
+
uri: http://192.168.22.144:55001/CPM?cmd=%3Cname%3EGetCpInfo%3C/name%3E
|
153
|
+
body:
|
154
|
+
encoding: US-ASCII
|
155
|
+
string: ''
|
156
|
+
headers:
|
157
|
+
Accept-Encoding:
|
158
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
159
|
+
Accept:
|
160
|
+
- "*/*"
|
161
|
+
User-Agent:
|
162
|
+
- Ruby
|
163
|
+
Host:
|
164
|
+
- 192.168.22.144:55001
|
165
|
+
response:
|
166
|
+
status:
|
167
|
+
code: 200
|
168
|
+
message: OK
|
169
|
+
headers:
|
170
|
+
Date:
|
171
|
+
- Mon, 06 Apr 2020 19:14:56 GMT
|
172
|
+
Server:
|
173
|
+
- Samsung/1.0
|
174
|
+
Content-Type:
|
175
|
+
- text/html
|
176
|
+
Content-Length:
|
177
|
+
- '555'
|
178
|
+
Connection:
|
179
|
+
- close
|
180
|
+
Last-Modified:
|
181
|
+
- Mon, 06 Apr 2020 19:14:56 GMT
|
182
|
+
body:
|
183
|
+
encoding: UTF-8
|
184
|
+
string: |-
|
185
|
+
<?xml version="1.0" encoding="UTF-8"?><CPM><method>CpInfo</method><version>0.1</version><speakerip>192.168.22.144</speakerip><user_identifier>public</user_identifier><response result="ok">
|
186
|
+
<cpname>Spotify</cpname>
|
187
|
+
<timestamp>2020-04-06T18:52:22Z</timestamp>
|
188
|
+
<signinstatus>1</signinstatus>
|
189
|
+
<username>tester</username>
|
190
|
+
<playstatus>play</playstatus>
|
191
|
+
<audioinfo>
|
192
|
+
<title>For What It's Worth</title>
|
193
|
+
<thumbnail>http://o.scdn.co/640/ab67616d00001e02c875f772b3e01748ffd5c0d2</thumbnail>
|
194
|
+
</audioinfo>
|
195
|
+
</response>
|
196
|
+
</CPM>
|
197
|
+
http_version:
|
198
|
+
recorded_at: Mon, 06 Apr 2020 19:14:57 GMT
|
199
|
+
recorded_with: VCR 4.0.0
|
@@ -0,0 +1,269 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://192.168.22.144:55001/UIC?cmd=%3Cname%3EGetFunc%3C/name%3E
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- "*/*"
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
Host:
|
17
|
+
- 192.168.22.144:55001
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Date:
|
24
|
+
- Mon, 06 Apr 2020 18:27:22 GMT
|
25
|
+
Server:
|
26
|
+
- Samsung/1.0
|
27
|
+
Content-Type:
|
28
|
+
- text/html
|
29
|
+
Content-Length:
|
30
|
+
- '274'
|
31
|
+
Connection:
|
32
|
+
- close
|
33
|
+
Last-Modified:
|
34
|
+
- Mon, 06 Apr 2020 18:27:22 GMT
|
35
|
+
body:
|
36
|
+
encoding: UTF-8
|
37
|
+
string: <?xml version="1.0" encoding="UTF-8"?><UIC><method>CurrentFunc</method><version>1.0</version><speakerip>192.168.22.144</speakerip><user_identifier></user_identifier><response
|
38
|
+
result="ok"><function>aux</function><submode></submode><connection>on</connection></response></UIC>
|
39
|
+
http_version:
|
40
|
+
recorded_at: Mon, 06 Apr 2020 18:27:24 GMT
|
41
|
+
- request:
|
42
|
+
method: get
|
43
|
+
uri: http://192.168.22.144:55001/UIC?cmd=%3Cname%3ESetFunc%3C/name%3E%3Cp%20type=%22str%22%20name=%22function%22%20val=%22wifi%22/%3E
|
44
|
+
body:
|
45
|
+
encoding: US-ASCII
|
46
|
+
string: ''
|
47
|
+
headers:
|
48
|
+
Accept-Encoding:
|
49
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
50
|
+
Accept:
|
51
|
+
- "*/*"
|
52
|
+
User-Agent:
|
53
|
+
- Ruby
|
54
|
+
Host:
|
55
|
+
- 192.168.22.144:55001
|
56
|
+
response:
|
57
|
+
status:
|
58
|
+
code: 200
|
59
|
+
message: OK
|
60
|
+
headers:
|
61
|
+
Date:
|
62
|
+
- Mon, 06 Apr 2020 18:27:23 GMT
|
63
|
+
Server:
|
64
|
+
- Samsung/1.0
|
65
|
+
Content-Type:
|
66
|
+
- text/html
|
67
|
+
Content-Length:
|
68
|
+
- '258'
|
69
|
+
Connection:
|
70
|
+
- close
|
71
|
+
Last-Modified:
|
72
|
+
- Mon, 06 Apr 2020 18:27:23 GMT
|
73
|
+
body:
|
74
|
+
encoding: UTF-8
|
75
|
+
string: <?xml version="1.0" encoding="UTF-8"?><UIC><method>CurrentFunc</method><version>1.0</version><speakerip>192.168.22.144</speakerip><user_identifier>public</user_identifier><response
|
76
|
+
result="ok"><function>wifi</function><submode>dlna</submode></response></UIC>
|
77
|
+
http_version:
|
78
|
+
recorded_at: Mon, 06 Apr 2020 18:27:24 GMT
|
79
|
+
- request:
|
80
|
+
method: get
|
81
|
+
uri: http://192.168.22.144:55001/UIC?cmd=%3Cname%3EGetFunc%3C/name%3E
|
82
|
+
body:
|
83
|
+
encoding: US-ASCII
|
84
|
+
string: ''
|
85
|
+
headers:
|
86
|
+
Accept-Encoding:
|
87
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
88
|
+
Accept:
|
89
|
+
- "*/*"
|
90
|
+
User-Agent:
|
91
|
+
- Ruby
|
92
|
+
Host:
|
93
|
+
- 192.168.22.144:55001
|
94
|
+
response:
|
95
|
+
status:
|
96
|
+
code: 200
|
97
|
+
message: OK
|
98
|
+
headers:
|
99
|
+
Date:
|
100
|
+
- Mon, 06 Apr 2020 18:27:23 GMT
|
101
|
+
Server:
|
102
|
+
- Samsung/1.0
|
103
|
+
Content-Type:
|
104
|
+
- text/html
|
105
|
+
Content-Length:
|
106
|
+
- '252'
|
107
|
+
Connection:
|
108
|
+
- close
|
109
|
+
Last-Modified:
|
110
|
+
- Mon, 06 Apr 2020 18:27:23 GMT
|
111
|
+
body:
|
112
|
+
encoding: UTF-8
|
113
|
+
string: <?xml version="1.0" encoding="UTF-8"?><UIC><method>CurrentFunc</method><version>1.0</version><speakerip>192.168.22.144</speakerip><user_identifier></user_identifier><response
|
114
|
+
result="ok"><function>wifi</function><submode>dlna</submode></response></UIC>
|
115
|
+
http_version:
|
116
|
+
recorded_at: Mon, 06 Apr 2020 18:27:24 GMT
|
117
|
+
- request:
|
118
|
+
method: get
|
119
|
+
uri: http://192.168.22.144:55001/UIC?cmd=%3Cname%3ESetFunc%3C/name%3E%3Cp%20type=%22str%22%20name=%22function%22%20val=%22bt%22/%3E
|
120
|
+
body:
|
121
|
+
encoding: US-ASCII
|
122
|
+
string: ''
|
123
|
+
headers:
|
124
|
+
Accept-Encoding:
|
125
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
126
|
+
Accept:
|
127
|
+
- "*/*"
|
128
|
+
User-Agent:
|
129
|
+
- Ruby
|
130
|
+
Host:
|
131
|
+
- 192.168.22.144:55001
|
132
|
+
response:
|
133
|
+
status:
|
134
|
+
code: 200
|
135
|
+
message: OK
|
136
|
+
headers:
|
137
|
+
Date:
|
138
|
+
- Mon, 06 Apr 2020 18:27:23 GMT
|
139
|
+
Server:
|
140
|
+
- Samsung/1.0
|
141
|
+
Content-Type:
|
142
|
+
- text/html
|
143
|
+
Content-Length:
|
144
|
+
- '298'
|
145
|
+
Connection:
|
146
|
+
- close
|
147
|
+
Last-Modified:
|
148
|
+
- Mon, 06 Apr 2020 18:27:23 GMT
|
149
|
+
body:
|
150
|
+
encoding: UTF-8
|
151
|
+
string: <?xml version="1.0" encoding="UTF-8"?><UIC><method>CurrentFunc</method><version>1.0</version><speakerip>192.168.22.144</speakerip><user_identifier>public</user_identifier><response
|
152
|
+
result="ok"><function>bt</function><connection>off</connection><devicename><![CDATA[]]></devicename></response></UIC>
|
153
|
+
http_version:
|
154
|
+
recorded_at: Mon, 06 Apr 2020 18:27:25 GMT
|
155
|
+
- request:
|
156
|
+
method: get
|
157
|
+
uri: http://192.168.22.144:55001/UIC?cmd=%3Cname%3EGetFunc%3C/name%3E
|
158
|
+
body:
|
159
|
+
encoding: US-ASCII
|
160
|
+
string: ''
|
161
|
+
headers:
|
162
|
+
Accept-Encoding:
|
163
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
164
|
+
Accept:
|
165
|
+
- "*/*"
|
166
|
+
User-Agent:
|
167
|
+
- Ruby
|
168
|
+
Host:
|
169
|
+
- 192.168.22.144:55001
|
170
|
+
response:
|
171
|
+
status:
|
172
|
+
code: 200
|
173
|
+
message: OK
|
174
|
+
headers:
|
175
|
+
Date:
|
176
|
+
- Mon, 06 Apr 2020 18:27:24 GMT
|
177
|
+
Server:
|
178
|
+
- Samsung/1.0
|
179
|
+
Content-Type:
|
180
|
+
- text/html
|
181
|
+
Content-Length:
|
182
|
+
- '292'
|
183
|
+
Connection:
|
184
|
+
- close
|
185
|
+
Last-Modified:
|
186
|
+
- Mon, 06 Apr 2020 18:27:24 GMT
|
187
|
+
body:
|
188
|
+
encoding: UTF-8
|
189
|
+
string: <?xml version="1.0" encoding="UTF-8"?><UIC><method>CurrentFunc</method><version>1.0</version><speakerip>192.168.22.144</speakerip><user_identifier></user_identifier><response
|
190
|
+
result="ok"><function>bt</function><connection>off</connection><devicename><![CDATA[]]></devicename></response></UIC>
|
191
|
+
http_version:
|
192
|
+
recorded_at: Mon, 06 Apr 2020 18:27:25 GMT
|
193
|
+
- request:
|
194
|
+
method: get
|
195
|
+
uri: http://192.168.22.144:55001/UIC?cmd=%3Cname%3ESetFunc%3C/name%3E%3Cp%20type=%22str%22%20name=%22function%22%20val=%22aux%22/%3E
|
196
|
+
body:
|
197
|
+
encoding: US-ASCII
|
198
|
+
string: ''
|
199
|
+
headers:
|
200
|
+
Accept-Encoding:
|
201
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
202
|
+
Accept:
|
203
|
+
- "*/*"
|
204
|
+
User-Agent:
|
205
|
+
- Ruby
|
206
|
+
Host:
|
207
|
+
- 192.168.22.144:55001
|
208
|
+
response:
|
209
|
+
status:
|
210
|
+
code: 200
|
211
|
+
message: OK
|
212
|
+
headers:
|
213
|
+
Date:
|
214
|
+
- Mon, 06 Apr 2020 18:27:29 GMT
|
215
|
+
Server:
|
216
|
+
- Samsung/1.0
|
217
|
+
Content-Type:
|
218
|
+
- text/html
|
219
|
+
Content-Length:
|
220
|
+
- '280'
|
221
|
+
Connection:
|
222
|
+
- close
|
223
|
+
Last-Modified:
|
224
|
+
- Mon, 06 Apr 2020 18:27:29 GMT
|
225
|
+
body:
|
226
|
+
encoding: UTF-8
|
227
|
+
string: <?xml version="1.0" encoding="UTF-8"?><UIC><method>CurrentFunc</method><version>1.0</version><speakerip>192.168.22.144</speakerip><user_identifier>public</user_identifier><response
|
228
|
+
result="ok"><function>aux</function><submode></submode><connection>on</connection></response></UIC>
|
229
|
+
http_version:
|
230
|
+
recorded_at: Mon, 06 Apr 2020 18:27:30 GMT
|
231
|
+
- request:
|
232
|
+
method: get
|
233
|
+
uri: http://192.168.22.144:55001/UIC?cmd=%3Cname%3EGetFunc%3C/name%3E
|
234
|
+
body:
|
235
|
+
encoding: US-ASCII
|
236
|
+
string: ''
|
237
|
+
headers:
|
238
|
+
Accept-Encoding:
|
239
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
240
|
+
Accept:
|
241
|
+
- "*/*"
|
242
|
+
User-Agent:
|
243
|
+
- Ruby
|
244
|
+
Host:
|
245
|
+
- 192.168.22.144:55001
|
246
|
+
response:
|
247
|
+
status:
|
248
|
+
code: 200
|
249
|
+
message: OK
|
250
|
+
headers:
|
251
|
+
Date:
|
252
|
+
- Mon, 06 Apr 2020 18:27:34 GMT
|
253
|
+
Server:
|
254
|
+
- Samsung/1.0
|
255
|
+
Content-Type:
|
256
|
+
- text/html
|
257
|
+
Content-Length:
|
258
|
+
- '274'
|
259
|
+
Connection:
|
260
|
+
- close
|
261
|
+
Last-Modified:
|
262
|
+
- Mon, 06 Apr 2020 18:27:34 GMT
|
263
|
+
body:
|
264
|
+
encoding: UTF-8
|
265
|
+
string: <?xml version="1.0" encoding="UTF-8"?><UIC><method>CurrentFunc</method><version>1.0</version><speakerip>192.168.22.144</speakerip><user_identifier></user_identifier><response
|
266
|
+
result="ok"><function>aux</function><submode></submode><connection>on</connection></response></UIC>
|
267
|
+
http_version:
|
268
|
+
recorded_at: Mon, 06 Apr 2020 18:27:35 GMT
|
269
|
+
recorded_with: VCR 4.0.0
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: http://192.168.22.144:55001/UIC?cmd
|
5
|
+
uri: http://192.168.22.144:55001/UIC?cmd=%3Cname%3EGetMute%3C/name%3E
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -21,7 +21,7 @@ http_interactions:
|
|
21
21
|
message: OK
|
22
22
|
headers:
|
23
23
|
Date:
|
24
|
-
-
|
24
|
+
- Mon, 06 Apr 2020 19:13:21 GMT
|
25
25
|
Server:
|
26
26
|
- Samsung/1.0
|
27
27
|
Content-Type:
|
@@ -31,13 +31,13 @@ http_interactions:
|
|
31
31
|
Connection:
|
32
32
|
- close
|
33
33
|
Last-Modified:
|
34
|
-
-
|
34
|
+
- Mon, 06 Apr 2020 19:13:21 GMT
|
35
35
|
body:
|
36
36
|
encoding: UTF-8
|
37
37
|
string: <?xml version="1.0" encoding="UTF-8"?><UIC><method>MuteStatus</method><version>1.0</version><speakerip>192.168.22.144</speakerip><user_identifier></user_identifier><response
|
38
38
|
result="ok"><mute>off</mute></response></UIC>
|
39
39
|
http_version:
|
40
|
-
recorded_at:
|
40
|
+
recorded_at: Mon, 06 Apr 2020 19:13:23 GMT
|
41
41
|
- request:
|
42
42
|
method: get
|
43
43
|
uri: http://192.168.22.144:55001/UIC?cmd=%3Cname%3ESetMute%3C/name%3E%3Cp%20type=%22str%22%20name=%22mute%22%20val=%22on%22/%3E
|
@@ -59,7 +59,7 @@ http_interactions:
|
|
59
59
|
message: OK
|
60
60
|
headers:
|
61
61
|
Date:
|
62
|
-
-
|
62
|
+
- Mon, 06 Apr 2020 19:13:21 GMT
|
63
63
|
Server:
|
64
64
|
- Samsung/1.0
|
65
65
|
Content-Type:
|
@@ -69,16 +69,16 @@ http_interactions:
|
|
69
69
|
Connection:
|
70
70
|
- close
|
71
71
|
Last-Modified:
|
72
|
-
-
|
72
|
+
- Mon, 06 Apr 2020 19:13:21 GMT
|
73
73
|
body:
|
74
74
|
encoding: UTF-8
|
75
75
|
string: <?xml version="1.0" encoding="UTF-8"?><UIC><method>MuteStatus</method><version>1.0</version><speakerip>192.168.22.144</speakerip><user_identifier></user_identifier><response
|
76
76
|
result="ok"><mute>on</mute></response></UIC>
|
77
77
|
http_version:
|
78
|
-
recorded_at:
|
78
|
+
recorded_at: Mon, 06 Apr 2020 19:13:23 GMT
|
79
79
|
- request:
|
80
80
|
method: get
|
81
|
-
uri: http://192.168.22.144:55001/UIC?cmd
|
81
|
+
uri: http://192.168.22.144:55001/UIC?cmd=%3Cname%3EGetMute%3C/name%3E
|
82
82
|
body:
|
83
83
|
encoding: US-ASCII
|
84
84
|
string: ''
|
@@ -97,7 +97,7 @@ http_interactions:
|
|
97
97
|
message: OK
|
98
98
|
headers:
|
99
99
|
Date:
|
100
|
-
-
|
100
|
+
- Mon, 06 Apr 2020 19:13:22 GMT
|
101
101
|
Server:
|
102
102
|
- Samsung/1.0
|
103
103
|
Content-Type:
|
@@ -107,13 +107,13 @@ http_interactions:
|
|
107
107
|
Connection:
|
108
108
|
- close
|
109
109
|
Last-Modified:
|
110
|
-
-
|
110
|
+
- Mon, 06 Apr 2020 19:13:22 GMT
|
111
111
|
body:
|
112
112
|
encoding: UTF-8
|
113
113
|
string: <?xml version="1.0" encoding="UTF-8"?><UIC><method>MuteStatus</method><version>1.0</version><speakerip>192.168.22.144</speakerip><user_identifier></user_identifier><response
|
114
114
|
result="ok"><mute>on</mute></response></UIC>
|
115
115
|
http_version:
|
116
|
-
recorded_at:
|
116
|
+
recorded_at: Mon, 06 Apr 2020 19:13:23 GMT
|
117
117
|
- request:
|
118
118
|
method: get
|
119
119
|
uri: http://192.168.22.144:55001/UIC?cmd=%3Cname%3ESetMute%3C/name%3E%3Cp%20type=%22str%22%20name=%22mute%22%20val=%22off%22/%3E
|
@@ -135,7 +135,7 @@ http_interactions:
|
|
135
135
|
message: OK
|
136
136
|
headers:
|
137
137
|
Date:
|
138
|
-
-
|
138
|
+
- Mon, 06 Apr 2020 19:13:22 GMT
|
139
139
|
Server:
|
140
140
|
- Samsung/1.0
|
141
141
|
Content-Type:
|
@@ -145,16 +145,16 @@ http_interactions:
|
|
145
145
|
Connection:
|
146
146
|
- close
|
147
147
|
Last-Modified:
|
148
|
-
-
|
148
|
+
- Mon, 06 Apr 2020 19:13:22 GMT
|
149
149
|
body:
|
150
150
|
encoding: UTF-8
|
151
151
|
string: <?xml version="1.0" encoding="UTF-8"?><UIC><method>MuteStatus</method><version>1.0</version><speakerip>192.168.22.144</speakerip><user_identifier></user_identifier><response
|
152
152
|
result="ok"><mute>off</mute></response></UIC>
|
153
153
|
http_version:
|
154
|
-
recorded_at:
|
154
|
+
recorded_at: Mon, 06 Apr 2020 19:13:23 GMT
|
155
155
|
- request:
|
156
156
|
method: get
|
157
|
-
uri: http://192.168.22.144:55001/UIC?cmd
|
157
|
+
uri: http://192.168.22.144:55001/UIC?cmd=%3Cname%3EGetMute%3C/name%3E
|
158
158
|
body:
|
159
159
|
encoding: US-ASCII
|
160
160
|
string: ''
|
@@ -173,7 +173,7 @@ http_interactions:
|
|
173
173
|
message: OK
|
174
174
|
headers:
|
175
175
|
Date:
|
176
|
-
-
|
176
|
+
- Mon, 06 Apr 2020 19:13:22 GMT
|
177
177
|
Server:
|
178
178
|
- Samsung/1.0
|
179
179
|
Content-Type:
|
@@ -183,16 +183,16 @@ http_interactions:
|
|
183
183
|
Connection:
|
184
184
|
- close
|
185
185
|
Last-Modified:
|
186
|
-
-
|
186
|
+
- Mon, 06 Apr 2020 19:13:22 GMT
|
187
187
|
body:
|
188
188
|
encoding: UTF-8
|
189
189
|
string: <?xml version="1.0" encoding="UTF-8"?><UIC><method>MuteStatus</method><version>1.0</version><speakerip>192.168.22.144</speakerip><user_identifier></user_identifier><response
|
190
190
|
result="ok"><mute>off</mute></response></UIC>
|
191
191
|
http_version:
|
192
|
-
recorded_at:
|
192
|
+
recorded_at: Mon, 06 Apr 2020 19:13:23 GMT
|
193
193
|
- request:
|
194
194
|
method: get
|
195
|
-
uri: http://192.168.22.144:55001/UIC?cmd
|
195
|
+
uri: http://192.168.22.144:55001/UIC?cmd=%3Cname%3EGetMute%3C/name%3E
|
196
196
|
body:
|
197
197
|
encoding: US-ASCII
|
198
198
|
string: ''
|
@@ -211,7 +211,7 @@ http_interactions:
|
|
211
211
|
message: OK
|
212
212
|
headers:
|
213
213
|
Date:
|
214
|
-
-
|
214
|
+
- Mon, 06 Apr 2020 19:13:22 GMT
|
215
215
|
Server:
|
216
216
|
- Samsung/1.0
|
217
217
|
Content-Type:
|
@@ -221,13 +221,13 @@ http_interactions:
|
|
221
221
|
Connection:
|
222
222
|
- close
|
223
223
|
Last-Modified:
|
224
|
-
-
|
224
|
+
- Mon, 06 Apr 2020 19:13:22 GMT
|
225
225
|
body:
|
226
226
|
encoding: UTF-8
|
227
227
|
string: <?xml version="1.0" encoding="UTF-8"?><UIC><method>MuteStatus</method><version>1.0</version><speakerip>192.168.22.144</speakerip><user_identifier></user_identifier><response
|
228
228
|
result="ok"><mute>off</mute></response></UIC>
|
229
229
|
http_version:
|
230
|
-
recorded_at:
|
230
|
+
recorded_at: Mon, 06 Apr 2020 19:13:23 GMT
|
231
231
|
- request:
|
232
232
|
method: get
|
233
233
|
uri: http://192.168.22.144:55001/UIC?cmd=%3Cname%3ESetMute%3C/name%3E%3Cp%20type=%22str%22%20name=%22mute%22%20val=%22on%22/%3E
|
@@ -249,7 +249,7 @@ http_interactions:
|
|
249
249
|
message: OK
|
250
250
|
headers:
|
251
251
|
Date:
|
252
|
-
-
|
252
|
+
- Mon, 06 Apr 2020 19:13:22 GMT
|
253
253
|
Server:
|
254
254
|
- Samsung/1.0
|
255
255
|
Content-Type:
|
@@ -259,16 +259,16 @@ http_interactions:
|
|
259
259
|
Connection:
|
260
260
|
- close
|
261
261
|
Last-Modified:
|
262
|
-
-
|
262
|
+
- Mon, 06 Apr 2020 19:13:22 GMT
|
263
263
|
body:
|
264
264
|
encoding: UTF-8
|
265
265
|
string: <?xml version="1.0" encoding="UTF-8"?><UIC><method>MuteStatus</method><version>1.0</version><speakerip>192.168.22.144</speakerip><user_identifier></user_identifier><response
|
266
266
|
result="ok"><mute>on</mute></response></UIC>
|
267
267
|
http_version:
|
268
|
-
recorded_at:
|
268
|
+
recorded_at: Mon, 06 Apr 2020 19:13:23 GMT
|
269
269
|
- request:
|
270
270
|
method: get
|
271
|
-
uri: http://192.168.22.144:55001/UIC?cmd
|
271
|
+
uri: http://192.168.22.144:55001/UIC?cmd=%3Cname%3EGetMute%3C/name%3E
|
272
272
|
body:
|
273
273
|
encoding: US-ASCII
|
274
274
|
string: ''
|
@@ -287,7 +287,7 @@ http_interactions:
|
|
287
287
|
message: OK
|
288
288
|
headers:
|
289
289
|
Date:
|
290
|
-
-
|
290
|
+
- Mon, 06 Apr 2020 19:13:22 GMT
|
291
291
|
Server:
|
292
292
|
- Samsung/1.0
|
293
293
|
Content-Type:
|
@@ -297,16 +297,16 @@ http_interactions:
|
|
297
297
|
Connection:
|
298
298
|
- close
|
299
299
|
Last-Modified:
|
300
|
-
-
|
300
|
+
- Mon, 06 Apr 2020 19:13:22 GMT
|
301
301
|
body:
|
302
302
|
encoding: UTF-8
|
303
303
|
string: <?xml version="1.0" encoding="UTF-8"?><UIC><method>MuteStatus</method><version>1.0</version><speakerip>192.168.22.144</speakerip><user_identifier></user_identifier><response
|
304
304
|
result="ok"><mute>on</mute></response></UIC>
|
305
305
|
http_version:
|
306
|
-
recorded_at:
|
306
|
+
recorded_at: Mon, 06 Apr 2020 19:13:24 GMT
|
307
307
|
- request:
|
308
308
|
method: get
|
309
|
-
uri: http://192.168.22.144:55001/UIC?cmd
|
309
|
+
uri: http://192.168.22.144:55001/UIC?cmd=%3Cname%3EGetMute%3C/name%3E
|
310
310
|
body:
|
311
311
|
encoding: US-ASCII
|
312
312
|
string: ''
|
@@ -325,7 +325,7 @@ http_interactions:
|
|
325
325
|
message: OK
|
326
326
|
headers:
|
327
327
|
Date:
|
328
|
-
-
|
328
|
+
- Mon, 06 Apr 2020 19:13:22 GMT
|
329
329
|
Server:
|
330
330
|
- Samsung/1.0
|
331
331
|
Content-Type:
|
@@ -335,13 +335,13 @@ http_interactions:
|
|
335
335
|
Connection:
|
336
336
|
- close
|
337
337
|
Last-Modified:
|
338
|
-
-
|
338
|
+
- Mon, 06 Apr 2020 19:13:22 GMT
|
339
339
|
body:
|
340
340
|
encoding: UTF-8
|
341
341
|
string: <?xml version="1.0" encoding="UTF-8"?><UIC><method>MuteStatus</method><version>1.0</version><speakerip>192.168.22.144</speakerip><user_identifier></user_identifier><response
|
342
342
|
result="ok"><mute>on</mute></response></UIC>
|
343
343
|
http_version:
|
344
|
-
recorded_at:
|
344
|
+
recorded_at: Mon, 06 Apr 2020 19:13:24 GMT
|
345
345
|
- request:
|
346
346
|
method: get
|
347
347
|
uri: http://192.168.22.144:55001/UIC?cmd=%3Cname%3ESetMute%3C/name%3E%3Cp%20type=%22str%22%20name=%22mute%22%20val=%22off%22/%3E
|
@@ -363,7 +363,7 @@ http_interactions:
|
|
363
363
|
message: OK
|
364
364
|
headers:
|
365
365
|
Date:
|
366
|
-
-
|
366
|
+
- Mon, 06 Apr 2020 19:13:23 GMT
|
367
367
|
Server:
|
368
368
|
- Samsung/1.0
|
369
369
|
Content-Type:
|
@@ -373,16 +373,16 @@ http_interactions:
|
|
373
373
|
Connection:
|
374
374
|
- close
|
375
375
|
Last-Modified:
|
376
|
-
-
|
376
|
+
- Mon, 06 Apr 2020 19:13:23 GMT
|
377
377
|
body:
|
378
378
|
encoding: UTF-8
|
379
379
|
string: <?xml version="1.0" encoding="UTF-8"?><UIC><method>MuteStatus</method><version>1.0</version><speakerip>192.168.22.144</speakerip><user_identifier></user_identifier><response
|
380
380
|
result="ok"><mute>off</mute></response></UIC>
|
381
381
|
http_version:
|
382
|
-
recorded_at:
|
382
|
+
recorded_at: Mon, 06 Apr 2020 19:13:24 GMT
|
383
383
|
- request:
|
384
384
|
method: get
|
385
|
-
uri: http://192.168.22.144:55001/UIC?cmd
|
385
|
+
uri: http://192.168.22.144:55001/UIC?cmd=%3Cname%3EGetMute%3C/name%3E
|
386
386
|
body:
|
387
387
|
encoding: US-ASCII
|
388
388
|
string: ''
|
@@ -401,7 +401,7 @@ http_interactions:
|
|
401
401
|
message: OK
|
402
402
|
headers:
|
403
403
|
Date:
|
404
|
-
-
|
404
|
+
- Mon, 06 Apr 2020 19:13:23 GMT
|
405
405
|
Server:
|
406
406
|
- Samsung/1.0
|
407
407
|
Content-Type:
|
@@ -411,11 +411,11 @@ http_interactions:
|
|
411
411
|
Connection:
|
412
412
|
- close
|
413
413
|
Last-Modified:
|
414
|
-
-
|
414
|
+
- Mon, 06 Apr 2020 19:13:23 GMT
|
415
415
|
body:
|
416
416
|
encoding: UTF-8
|
417
417
|
string: <?xml version="1.0" encoding="UTF-8"?><UIC><method>MuteStatus</method><version>1.0</version><speakerip>192.168.22.144</speakerip><user_identifier></user_identifier><response
|
418
418
|
result="ok"><mute>off</mute></response></UIC>
|
419
419
|
http_version:
|
420
|
-
recorded_at:
|
420
|
+
recorded_at: Mon, 06 Apr 2020 19:13:24 GMT
|
421
421
|
recorded_with: VCR 4.0.0
|
@@ -5,6 +5,14 @@ require 'logger'
|
|
5
5
|
require 'timeout'
|
6
6
|
|
7
7
|
module SamsungWamApi
|
8
|
+
INPUTS = {
|
9
|
+
'bt' => 'Bluetooth',
|
10
|
+
'hdmi' => 'HDMI',
|
11
|
+
'wifi' => 'WiFi',
|
12
|
+
'optical' => 'WiFi',
|
13
|
+
'aux' => 'AUX',
|
14
|
+
}
|
15
|
+
|
8
16
|
class Device
|
9
17
|
def initialize(ip:, port: '55001', endpoint: 'UIC', logger: Logger.new(STDOUT), timeout_seconds: 3)
|
10
18
|
@ip = ip
|
@@ -52,7 +60,7 @@ module SamsungWamApi
|
|
52
60
|
end
|
53
61
|
|
54
62
|
def mute_status
|
55
|
-
command!('
|
63
|
+
command!('<name>GetMute</name>')['mute']
|
56
64
|
end
|
57
65
|
|
58
66
|
def muted?
|
@@ -71,8 +79,41 @@ module SamsungWamApi
|
|
71
79
|
muted? ? unmute! : mute!
|
72
80
|
end
|
73
81
|
|
74
|
-
def
|
75
|
-
|
82
|
+
def input
|
83
|
+
command!('<name>GetFunc</name>')['function']
|
84
|
+
end
|
85
|
+
|
86
|
+
def set_input!(input)
|
87
|
+
unless INPUTS.keys.include?(input)
|
88
|
+
@logger.error "Unsupported input #{input}, ignoring and failing"
|
89
|
+
return false
|
90
|
+
end
|
91
|
+
|
92
|
+
command!('<name>SetFunc</name><p type="str" name="function" val="' + input + '"/>')
|
93
|
+
end
|
94
|
+
|
95
|
+
def cloud_provider_info
|
96
|
+
command!('<name>GetCpInfo</name>', 'CPM')
|
97
|
+
end
|
98
|
+
|
99
|
+
def audio_info
|
100
|
+
info = cloud_provider_info
|
101
|
+
info['audioinfo']
|
102
|
+
end
|
103
|
+
|
104
|
+
def play_info
|
105
|
+
info = cloud_provider_info
|
106
|
+
info['playstatus']
|
107
|
+
end
|
108
|
+
|
109
|
+
def cloud_username
|
110
|
+
info = cloud_provider_info
|
111
|
+
info['username']
|
112
|
+
end
|
113
|
+
|
114
|
+
def command!(cmd, endpoint = nil)
|
115
|
+
endpoint ||= @endpoint
|
116
|
+
query = "http://#{@ip}:#{@port}/#{endpoint}?cmd=#{URI.encode(cmd)}"
|
76
117
|
@logger.debug { "Firing query '#{URI.decode(query)}'" }
|
77
118
|
|
78
119
|
# if we e.g. request to power on device which is already on, we never receive a response, therefore we use configurable timeout
|
@@ -82,7 +123,7 @@ module SamsungWamApi
|
|
82
123
|
}
|
83
124
|
parsed_response = Hash.from_xml(raw_response)
|
84
125
|
@logger.debug { "Got response:\n #{raw_response.inspect} \nparsed to:\n#{parsed_response}" }
|
85
|
-
parsed_response[
|
126
|
+
parsed_response[endpoint]['response']
|
86
127
|
rescue Timeout::Error
|
87
128
|
@logger.warn "Timeout and #{@timeout_seconds} seconds, you most likely did invalid operation"
|
88
129
|
end
|
data/samsung_wam_api.gemspec
CHANGED
@@ -21,11 +21,12 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
22
|
spec.require_paths = ["lib"]
|
23
23
|
|
24
|
-
spec.add_development_dependency "bundler", "
|
24
|
+
spec.add_development_dependency "bundler", ">= 1.14"
|
25
25
|
spec.add_development_dependency "rake", "~> 10.0"
|
26
26
|
spec.add_development_dependency "minitest", "~> 5.0"
|
27
27
|
spec.add_development_dependency "webmock", "~> 3.2"
|
28
28
|
spec.add_development_dependency "vcr", "~> 4.0"
|
29
|
+
spec.add_development_dependency "pry"
|
29
30
|
|
30
31
|
spec.add_dependency 'activesupport'
|
31
32
|
end
|
metadata
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: samsung_wam_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marek Hulan
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.14'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.14'
|
27
27
|
- !ruby/object:Gem::Dependency
|
@@ -80,6 +80,20 @@ dependencies:
|
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '4.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: pry
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: activesupport
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -109,9 +123,12 @@ files:
|
|
109
123
|
- Rakefile
|
110
124
|
- bin/console
|
111
125
|
- bin/setup
|
126
|
+
- fixtures/vcr_cassettes/cloud_disconnected.yml
|
127
|
+
- fixtures/vcr_cassettes/cloud_playing.yml
|
112
128
|
- fixtures/vcr_cassettes/decrease_volume.yml
|
113
129
|
- fixtures/vcr_cassettes/get_volume.yml
|
114
130
|
- fixtures/vcr_cassettes/increase_volume.yml
|
131
|
+
- fixtures/vcr_cassettes/inputs.yml
|
115
132
|
- fixtures/vcr_cassettes/off.yml
|
116
133
|
- fixtures/vcr_cassettes/on.yml
|
117
134
|
- fixtures/vcr_cassettes/set_volume.yml
|
@@ -141,8 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
141
158
|
- !ruby/object:Gem::Version
|
142
159
|
version: '0'
|
143
160
|
requirements: []
|
144
|
-
|
145
|
-
rubygems_version: 2.4.5
|
161
|
+
rubygems_version: 3.0.3
|
146
162
|
signing_key:
|
147
163
|
specification_version: 4
|
148
164
|
summary: Gem provides Ruby Samsung WAM API wrapper
|