forked from dannyvanlierop/NodeJS_API_HarmanKardon_AVR
-
Notifications
You must be signed in to change notification settings - Fork 0
/
notes.txt
/
notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
root@raspberrypi:~# cat sat.js
var net = require('net');
var HOST = '192.168.3.22';
var PORT = 10025;
function buildRequest(cmd, zone, param) {
var text = '';
var payload = '<?xml version="1.0" encoding="UTF-8"?> <harman> <avr> <common> <control> <name>source-selection</name> <zone>Main Zone</zone> <para>Cable Sat</para> </control> </common> </avr> </harman>';
zone = zone || 'Main Zone';
param = param || ''
text += 'POST HK_APP HTTP/1.1\r\n';
text += 'Host: :' + PORT + '\r\n';
text += 'User-Agent: Harman Kardon BDS Remote Controller/1.0\r\n';
text += 'Content-Length: ' + payload.length + '\r\n';
text += '\r\n';
text += payload;
return text;
}
var client = new net.Socket();
client.connect(PORT, HOST, function() {
console.log('CONNECTED TO: ' + HOST + ':' + PORT);
client.write(buildRequest('mute-on'));
client.destroy();
});
root@raspberrypi:~#
****************************************************************************************************
root@raspberrypi:~# cat sourcea.js
var net = require('net');
var HOST = '192.168.3.22';
var PORT = 10025;
// Supported commands:
// volume-down
// mute-on
// source-selection (param is used: Component, DISC)
// Play
function buildRequest(cmd, zone, param) {
var text = '';
var payload = '<?xml version="1.0" encoding="UTF-8"?> <harman> <avr> <common> <control> <name>source-selection</name> <zone>Main Zone</zone> <para>Source A</para> </control> </common> </avr> </harman>';
zone = zone || 'Main Zone';
param = param || ''
text += 'POST HK_APP HTTP/1.1\r\n';
text += 'Host: :' + PORT + '\r\n';
text += 'User-Agent: Harman Kardon BDS Remote Controller/1.0\r\n';
text += 'Content-Length: ' + payload.length + '\r\n';
text += '\r\n';
text += payload;
return text;
}
var client = new net.Socket();
client.connect(PORT, HOST, function() {
console.log('CONNECTED TO: ' + HOST + ':' + PORT);
client.write(buildRequest('mute-on'));
client.destroy();
});
****************************************************************************************************
POST AVR HTTP/1.1
Host::10025
User-Agent:Harman Kardon AVR Controller/1.0
Content-Length:185
<?xml version="1.0" encoding="UTF-8"?> <harman> <avr> <common> <control> <name>source-selection</name> <zone>Main Zone</zone> <para>Source A</para> </control> </common> </avr> </harman>
****************************************************************************************************
POST AVR HTTP/1.1
Host::10025
User-Agent:Harman Kardon AVR Controller/1.0
Content-Length:186
<?xml version="1.0" encoding="UTF-8"?> <harman> <avr> <common> <control> <name>source-selection</name> <zone>Main Zone</zone> <para>Cable Sat</para> </control> </common> </avr> </harman>
****************************************************************************************************
CODE: ALLES AUSWÄHLEN
POST HK_APP HTTP/1.1
Host: :10025
User-Agent: Harman Kardon BDS Remote Controller/1.0
Content-Length: 163
<?xml version="1.0" encoding="UTF-8"?> <harman> <bds> <common> <control> <name>heart-alive</name> <zone></zone> <para></para> </control> </common> </bds> </harman>
POST HK_APP HTTP/1.1
Host: 192.168.178.24:10025
User-Agent: Harman Kardon BDS G3 /1
Content-Length: 150
<?xml version="1.0" encoding="UTF-8"?><harman><bds><common><status><name>heart-alive</name><zone></zone><para></para></status></common></bds></harman>
POST HK_APP HTTP/1.1
Host: :10025
User-Agent: Harman Kardon BDS Remote Controller/1.0
Content-Length: 172
<?xml version="1.0" encoding="UTF-8"?> <harman> <bds> <common> <control> <name>volume-down</name> <zone>Main Zone</zone> <para></para> </control> </common> </bds> </harman>
****************************************************************************************************
var net = require('net');
var HOST = '192.168.178.24';
var PORT = 10025;
// Supported commands:
// volume-down
// mute-on
// source-selection (param is used: Component, DISC)
// Play
function buildRequest(cmd, zone, param) {
var text = '';
var payload = '<?xml version="1.0" encoding="UTF-8"?> <harman> <bds> <common> <control> <name>' + cmd + '</name> <zone>' + zone + '</zone> <para>' + param + '</para> </control> </common> </bds> </harman>';
zone = zone || 'Main Zone';
param = param || ''
text += 'POST HK_APP HTTP/1.1\r\n';
text += 'Host: :' + PORT + '\r\n';
text += 'User-Agent: Harman Kardon BDS Remote Controller/1.0\r\n';
text += 'Content-Length: ' + payload.length + '\r\n';
text += '\r\n';
text += payload;
return text;
}
var client = new net.Socket();
client.connect(PORT, HOST, function() {
console.log('CONNECTED TO: ' + HOST + ':' + PORT);
client.write(buildRequest('mute-on'));
});
// Add a 'data' event handler for the client socket
// data is what the server sent to this socket
client.on('data', function(data) {
console.log('DATA: ' + data);
// Close the client socket completely
client.destroy();
});
// Add a 'close' event handler for the client socket
client.on('close', function() {
console.log('Connection closed');
});
************************************************************************************************************
<?xml version="1.0" encoding="UTF-8"?> <harman> <bds> <common> <control> <name>Back</name> <zone>Main Zone</zone> <para></para> </control> </common> </bds> </harman>
<?xml version="1.0" encoding="UTF-8"?> <harman> <bds> <common> <control> <name>bye-bye</name> <zone></zone> <para></para> </control> </common> </bds> </harman>
<?xml version="1.0" encoding="UTF-8"?> <harman> <bds> <common> <control> <name>Down</name> <zone>Main Zone</zone> <para></para> </control> </common> </bds> </harman>
<?xml version="1.0" encoding="UTF-8"?> <harman> <bds> <common> <control> <name>eject</name> <zone>Main Zone</zone> <para></para> </control> </common> </bds> </harman>
<?xml version="1.0" encoding="UTF-8"?> <harman> <bds> <common> <control> <name>heart-alive</name> <zone></zone> <para></para> </control> </common> </bds> </harman>
<?xml version="1.0" encoding="UTF-8"?> <harman> <bds> <common> <control> <name>Home</name> <zone>Main Zone</zone> <para></para> </control> </common> </bds> </harman>
<?xml version="1.0" encoding="UTF-8"?> <harman> <bds> <common> <control> <name>keyboard</name> <zone>Main Zone</zone> <para></para> </control> </common> </bds> </harman>
<?xml version="1.0" encoding="UTF-8"?> <harman> <bds> <common> <control> <name>Left</name> <zone>Main Zone</zone> <para></para> </control> </common> </bds> </harman>
<?xml version="1.0" encoding="UTF-8"?> <harman> <bds> <common> <control> <name>Ok</name> <zone>Main Zone</zone> <para></para> </control> </common> </bds> </harman>
<?xml version="1.0" encoding="UTF-8"?> <harman> <bds> <common> <control> <name>Options</name> <zone>Main Zone</zone> <para></para> </control> </common> </bds> </harman>
<?xml version="1.0" encoding="UTF-8"?> <harman> <bds> <common> <control> <name>popup</name> <zone>display</zone> <para></para> </control> </common> </bds> </harman>
<?xml version="1.0" encoding="UTF-8"?> <harman> <bds> <common> <control> <name>Program</name> <zone>Main Zone</zone> <para></para> </control> </common> </bds> </harman>
<?xml version="1.0" encoding="UTF-8"?> <harman> <bds> <common> <control> <name>Right</name> <zone>Main Zone</zone> <para></para> </control> </common> </bds> </harman>
<?xml version="1.0" encoding="UTF-8"?> <harman> <bds> <common> <control> <name>sleep</name> <zone>Main Zone</zone> <para></para> </control> </common> </bds> </harman>
<?xml version="1.0" encoding="UTF-8"?> <harman> <bds> <common> <control> <name>source-selection</name> <zone>Main Zone</zone> <para>AUX</para> </control> </common> </bds> </harman>
<?xml version="1.0" encoding="UTF-8"?> <harman> <bds> <common> <control> <name>source-selection</name> <zone>Main Zone</zone> <para>Bluetooth</para> </control> </common> </bds> </harman>
<?xml version="1.0" encoding="UTF-8"?> <harman> <bds> <common> <control> <name>source-selection</name> <zone>Main Zone</zone> <para>Component</para> </control> </common> </bds> </harman>
<?xml version="1.0" encoding="UTF-8"?> <harman> <bds> <common> <control> <name>source-selection</name> <zone>Main Zone</zone> <para>DISC</para> </control> </common> </bds> </harman>
<?xml version="1.0" encoding="UTF-8"?> <harman> <bds> <common> <control> <name>source-selection</name> <zone>Main Zone</zone> <para>HDMI1</para> </control> </common> </bds> </harman>
<?xml version="1.0" encoding="UTF-8"?> <harman> <bds> <common> <control> <name>source-selection</name> <zone>Main Zone</zone> <para>HDMI2</para> </control> </common> </bds> </harman>
<?xml version="1.0" encoding="UTF-8"?> <harman> <bds> <common> <control> <name>source-selection</name> <zone>Main Zone</zone> <para>HDMI3</para> </control> </common> </bds> </harman>
<?xml version="1.0" encoding="UTF-8"?> <harman> <bds> <common> <control> <name>source-selection</name> <zone>Main Zone</zone> <para>Picasa</para> </control> </common> </bds> </harman>
<?xml version="1.0" encoding="UTF-8"?> <harman> <bds> <common> <control> <name>source-selection</name> <zone>Main Zone</zone> <para>Radio</para> </control> </common> </bds> </harman>
<?xml version="1.0" encoding="UTF-8"?> <harman> <bds> <common> <control> <name>source-selection</name> <zone>Main Zone</zone> <para>USB</para> </control> </common> </bds> </harman>
<?xml version="1.0" encoding="UTF-8"?> <harman> <bds> <common> <control> <name>source-selection</name> <zone>Main Zone</zone> <para>YouTube</para> </control> </common> </bds> </harman>
<?xml version="1.0" encoding="UTF-8"?> <harman> <bds> <common> <control> <name>thumbnail</name> <zone>Main Zone</zone> <para></para> </control> </common> </bds> </harman>
<?xml version="1.0" encoding="UTF-8"?> <harman> <bds> <common> <control> <name>Up</name> <zone>Main Zone</zone> <para></para> </control> </common> </bds> </harman>
<?xml version="1.0" encoding="UTF-8"?> <harman> <bds> <common> <control> <name>zoom</name> <zone>Main Zone</zone> <para></para> </control> </common> </bds> </harman>
<?xml version="1.0" encoding="UTF-8"?><harman><bds><common><status><name>heart-alive</name><zone></zone><para></para></status></common></bds></harman>
************************************************************************************************************
[InternetShortcut]
URL=http://www.radioharmankardon.com/setupapp/harman/asp/AuthLogin/SignIn.asp