Kodi Webinterface Chorus2

  • Enable remote users to control this application through the built-in web server. Never expose the web server port to the Internet.

    --> ist Eingeschaltet

  • bei deiner Eingabe fehlt oben vor den Videos noch ein slash. es müsste aber /home/pi/Videos/5.mp4 auch gehen.

    --------------
    Guides nicht mehr verfügbar wegen Youtube unvermögen guten von schlechten Kodi Videos zu unterscheiden.

  • So, hab mal recherchiert das Problem ist folgendes: Du musst Post anstatt Get benutzen. Es gab mal ne Änderung im Kodi RPC Protokoll mit Kodi 18 und es wird nur noch POST akzeptiert. Also pur eine URL aufrufen reicht nicht mehr.

    --------------
    Guides nicht mehr verfügbar wegen Youtube unvermögen guten von schlechten Kodi Videos zu unterscheiden.

  • alles in den POST gepackt, aber mit dieser Funktion funktioniert es nicht.....

    Die Verbindung ist da, dann wird mit dem Error code HTTPC_ERROR_CONNECTION_LOST abgebrochen ....


    void send_video_start_stop() {

    String jsondata =("/jsonrpc?request={\"jsonrpc\":\"2.0\",\"id\":\"1\",\"method\":\"Player.Open\",\"params\":{\"item\":{\"file\":\"/home/pi/Videos/1.mp4\"}}}");

    const char *serverName = "http://192.168.178.91:8080";

    WiFiClient client;

    HTTPClient http;

    BT.print("Verbunden: ");

    BT.println(http.begin(client, serverName));

    http.addHeader("Content-Type", "Content-Type: application/json");

    int httpResponseCode = http.POST(jsondata); //Send the actual POST request

    if (httpResponseCode > 0) {

    String response = http.getString(); //Get the response to the request

    BT.println(httpResponseCode); //Print return code

    BT.println(response); //Print request answer

    } else {

    BT.print("Error on sending POST: ");

    BT.println(httpResponseCode);

    }

    http.end();

    }

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!