Ich möchte mit dem Befehl:
"GET /status?p0=playlist&p1=play&p2=94-87-158-209-70&player=00:15:af:b8:ac:25 HTTP/1.1"
von einem Client die Playlist "94-87-158-209-70.m3u" aufrufen. Dabei antwortet der LMS nicht und bleibt irgendwie hängen. Einzige Möglichkeit: runterfahren und wieder hochfahren.
Was mache ich falsch?
Hat jemand einen Tipp?
Eberhard
Results 1 to 5 of 5
Thread: Http-Befehl unsinnig???
-
2012-08-07, 13:25 #1Junior Member
- Join Date
- Jun 2011
- Posts
- 15
Http-Befehl unsinnig???
-
2012-08-07, 14:01 #2
Das ist 'ne illegale URL, Du wirst die Parameter URL-Encoden müssen.
Außerdem sind die http-Befehle des Web-Interface nicht standardisiert, verwende besser CLI über JSON/RPC (siehe Developer-Forum).---
learn more about iPeng, the iPhone and iPad remote for the Squeezebox and
New: Logitech UE Smart Radio as well as iPeng Party, the free Party-App,
at penguinlovesmusic.com
-
2012-08-07, 15:31 #3Junior Member
- Join Date
- Jun 2011
- Posts
- 15
Hallo pipin,
wenn das
stimmt dürfte ich auch nicht den Befehl "GET /status?p0=pause HTTP/1.1" absetzen können. Der funktioniert aber.
Im Logitech Media Sever Web Interface steht doch auch:
The following is an example of an HTTP status transactions. The text in blue is sent from the client to the HTTP server. Text in red is returned by the HTTP server.
GET /status.html?p0=pause&p1=1 HTTP/1.0
Vielleicht zur Erläuterung: Auf einem Arduino läuft ein Web-Client. In C geschrieben steht dann:
client.println(F("GET /status?p0=pause HTTP/1.1"));
bzw.
String SBox= "GET /status?p0=playlist&p1=play&p2=" + playlist + "&player=00:15:af:b8:ac:25 HTTP/1.1"; //playlist = "94-87-158-209-70"
client.println(SBox);
Das mit dem CLI üer JSON/RPC ist mir völlig fremd. Da finde ich nicht so den richtigen Zugang zu. Ist vielleicht was für den kommenden Winter :-).
EberhardLast edited by Musicpluto@web.de; 2012-08-07 at 15:33. Reason: Schreibfehler
-
2012-08-07, 15:37 #4
Der Parameter "pause" enthaelt bei mir weder Bindestriche, noch Doppelpunkte. Bei Bindestrichen bin ich nicht ganz sicher, aber die Doppelpunkte sind definitiv illegal.
Last edited by pippin; 2012-08-07 at 15:44.
---
learn more about iPeng, the iPhone and iPad remote for the Squeezebox and
New: Logitech UE Smart Radio as well as iPeng Party, the free Party-App,
at penguinlovesmusic.com
-
2012-08-25, 00:41 #5Junior Member
- Join Date
- Jun 2011
- Posts
- 15
Hallo Pippin,
der Befehl war vom Grundsatz her richtig. Das Problem lag in Zuweisung der in diesem Befehl enthaltenen Strings. Nachdem ich von den Strings abgekommen bin und mit uchar arbeite, läuft es tadellos.
snprintf(SBox, 92, "GET /status?p0=playlist&p1=play&p2=%d-%d-%d-%d-%d&player=%02x:%02x:%02x:%02x:%02x:%02x HTTP/1.1", serNum[0], serNum[1], serNum[2], serNum[3], serNum[4], macAdrSbox[0], macAdrSbox[1], macAdrSbox[2], macAdrSbox[3], macAdrSbox[4], macAdrSbox[5]);
und "SBox" wird gesendet....
Danke für Deine Hilfe.
Eberhard

Reply With Quote

