Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 5 of 5
  1. #1

    Http-Befehl unsinnig???

    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

  2. #2
    Senior Member pippin's Avatar
    Join Date
    Oct 2007
    Location
    Berlin
    Posts
    10,383
    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

  3. #3
    Hallo pipin,
    wenn das
    Quote Originally Posted by pippin View Post
    Das ist 'ne illegale URL, Du wirst die Parameter URL-Encoden müssen.
    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 :-).

    Eberhard
    Last edited by Musicpluto@web.de; 2012-08-07 at 15:33. Reason: Schreibfehler

  4. #4
    Senior Member pippin's Avatar
    Join Date
    Oct 2007
    Location
    Berlin
    Posts
    10,383
    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

  5. #5
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •