Ankündigung

Einklappen
Keine Ankündigung bisher.

Control of XBMC in HS3?

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    HS/FS Control of XBMC in HS3?

    Hi!

    I Have a raspberry pi (raspbmc) that i want to control using my hs3, but i cant get it to work.

    Im trying to send ex the following command
    http://192.168.1.176:8080/jsonrpc?request={%22jsonrpc%22:%222.0%22,%22method %22:%22Input.Home%22,%22id%22:1}

    to go to "home" it works in safari etc.

    Im using Webpages/Ip devices for sending.
    I have put in host : port
    and put in
    Send http call:/jsonrpc?request={"jsonrpc":"2.0","method":"Input.H ome","id":1}

    is the problem that its using the "get" command but i need "post" or simular?

    how can i solv this?

    #2
    Problem Solved

    Zitat von Polkaz Beitrag anzeigen
    Hi!

    I Have a raspberry pi (raspbmc) that i want to control using my hs3, but i cant get it to work.

    Im trying to send ex the following command
    http://192.168.1.176:8080/jsonrpc?request={%22jsonrpc%22:%222.0%22,%22method %22:%22Input.Home%22,%22id%22:1}

    to go to "home" it works in safari etc.

    Im using Webpages/Ip devices for sending.
    I have put in host : port
    and put in
    Send http call:/jsonrpc?request={"jsonrpc":"2.0","method":"Input.H ome","id":1}

    is the problem that its using the "get" command but i need "post" or simular?

    how can i solv this?
    Problem Solved!

    Kommentar


      #3
      Problem solved?

      How?

      Could you share it with us?

      Grtz

      Kommentar


        #4
        Einfach per IP Telegramm senden:


        04.09.2013 14:52:45 (Prot: TCP) (IP: 192.168.2.20) (Port: 9090)
        (Len: 47) 0x7b 0x22 0x6a 0x73 0x6f 0x6e 0x72 0x70 0x63 0x22 0x3a 0x22 0x32 0x2e 0x30 0x22 0x2c 0x22 0x6d 0x65 0x74 0x68 0x6f 0x64 0x22 0x3a 0x22 0x49 0x6e 0x70 0x75 0x74 0x2e 0x48 0x6f 0x6d 0x65 0x22 0x2c 0x22 0x69 0x64 0x22 0x3a 0x31 0x7d 0xd
        {"jsonrpc":"2.0","method":"Input.Home","id":1}
        (OK: 0)


        Gruß
        Klaus

        Kommentar


          #5
          Danke klaus

          Kann man auch ein Response bekommen von XBMC mit Visu und das im einen KO setzen.

          z.B. das commando {"jsonrpc": "2.0", "method": "Player.GetItem", "params": { "properties": ["title", "album", "artist", "season", "episode", "duration", "showtitle", "tvshowid", "thumbnail", "file", "fanart", "streamdetails"], "playerid": 1 }, "id": "VideoGetItem"}

          Und dann das title, album, artist usw. im einen eigenes KO oder gibt es ergeht wo eine muster Project zum Ansteuerung von XBMC. Und ich denke dann nicht an deine Homeintouch für die iPad, das haben wir schon

          Ich mochte gerne mit einen Touchscreen (PC) ein Film aussuchen und dann starten.

          Die weitere Bedienung läuft dann über das iPad.

          Kommentar


            #6
            Hab nicht genau verstanden was Du machen willst...

            Um Anfragen mit den HS Bordmitteln direkt auszuwerten musst Du die Funktion Web-Seiten-IP Geräte verwenden. Viel Spaß beim JSON zerpflücken..

            04.09.2013 22:12:15 (IP: 192.168.2.20) (Port: 8080)
            (Send: 146) 0x47 0x45 0x54 0x20 0x2f 0x6a 0x73 0x6f 0x6e 0x72 0x70 0x63 0x3f 0x72 0x65 0x71 0x75 0x65 0x73 0x74 0x3d 0x25 0x37 0x42 0x22 0x6a 0x73 0x6f 0x6e 0x72 0x70 0x63 0x22 0x25 0x33 0x41 0x22 0x32 0x2e 0x30 0x22 0x25 0x32 0x43 0x22 0x6d 0x65 0x74 0x68 0x6f 0x64 0x22 0x25 0x33 0x41 0x22 0x50 0x6c 0x61 0x79 0x65 0x72 0x2e 0x47 0x65 0x74 0x41 0x63 0x74 0x69 0x76 0x65 0x50 0x6c 0x61 0x79 0x65 0x72 0x73 0x22 0x25 0x32 0x43 0x22 0x69 0x64 0x22 0x25 0x33 0x41 0x31 0x25 0x37 0x44 0x20 0x48 0x54 0x54 0x50 0x2f 0x31 0x2e 0x30 0xd 0xa 0x48 0x6f 0x73 0x74 0x3a 0x20 0x31 0x39 0x32 0x2e 0x31 0x36 0x38 0x2e 0x32 0x2e 0x32 0x30 0xd 0xa 0x43 0x6f 0x6e 0x6e 0x65 0x63 0x74 0x69 0x6f 0x6e 0x3a 0x20 0x43 0x6c 0x6f 0x73 0x65 0xd 0xa 0xd 0xa
            GET /jsonrpc?request=%7B"jsonrpc"%3A"2.0"%2C"method"%3A "Player.GetActivePlayers"%2C"id"%3A1%7D HTTP/1.0 Host: 192.168.2.20 Connection: Close
            (Recv: 173) 0x48 0x54 0x54 0x50 0x2f 0x31 0x2e 0x31 0x20 0x32 0x30 0x30 0x20 0x4f 0x4b 0xd 0xa 0x43 0x6f 0x6e 0x74 0x65 0x6e 0x74 0x2d 0x4c 0x65 0x6e 0x67 0x74 0x68 0x3a 0x20 0x36 0x35 0xd 0xa 0x43 0x6f 0x6e 0x74 0x65 0x6e 0x74 0x2d 0x54 0x79 0x70 0x65 0x3a 0x20 0x61 0x70 0x70 0x6c 0x69 0x63 0x61 0x74 0x69 0x6f 0x6e 0x2f 0x6a 0x73 0x6f 0x6e 0xd 0xa 0x44 0x61 0x74 0x65 0x3a 0x20 0x57 0x65 0x64 0x2c 0x20 0x30 0x34 0x20 0x53 0x65 0x70 0x20 0x32 0x30 0x31 0x33 0x20 0x32 0x30 0x3a 0x31 0x32 0x3a 0x31 0x39 0x20 0x47 0x4d 0x54 0xd 0xa 0xd 0xa 0x7b 0x22 0x69 0x64 0x22 0x3a 0x31 0x2c 0x22 0x6a 0x73 0x6f 0x6e 0x72 0x70 0x63 0x22 0x3a 0x22 0x32 0x2e 0x30 0x22 0x2c 0x22 0x72 0x65 0x73 0x75 0x6c 0x74 0x22 0x3a 0x5b 0x7b 0x22 0x70 0x6c 0x61 0x79 0x65 0x72 0x69 0x64 0x22 0x3a 0x31 0x2c 0x22 0x74 0x79 0x70 0x65 0x22 0x3a 0x22 0x76 0x69 0x64 0x65 0x6f 0x22 0x7d 0x5d 0x7d
            HTTP/1.1 200 OK Content-Length: 65 Content-Type: application/json Date: Wed, 04 Sep 2013 20:12:19 GMT {"id":1,"jsonrpc":"2.0","result":[{"playerid":1,"type":"video"}]}
            (Gesamt: 5) (Work: 5) (Typ: Liste) (OK: 1)


            Gruß
            Klaus

            Kommentar


              #7
              Hallo Klaus,

              ich habe es noch nicht wirklich verstanden. Wie soll das funktionieren, wenn ich den Webserver von xbmc via IP-Telegramm senden das Kommando schicken will? Ich kann doch bei dem Befehl beim Senden von IP Telegrammen kein User/PWD mitgeben. Den will aber xbmc haben.
              Auch wenn ich es per Webseitenabfrage versuche, komme ich nicht wirklich weiter. Ich möchte ein System.Shutdown an den xbmc senden (/jsonrpc?request={"jsonrpc":"2.0","method":"System. Shutdown","id":1}). Leider werden dabei die geschweiften Klammern abgeschnitten und der Befehl wird nicht verabreitet. Was muss ich eingeben, damit xbmc das Kommando verarbeitet?
              Vielen Dank im Voraus!

              PS
              Vom ie/ff klappt es natürlich ohne Probleme.

              Kommentar


                #8
                Das sind 2 paar Stiefel.

                Du kannst die JSON Befehle per TCP an den Port 9090 schicken oder per HTTP an Port 8080. Das sind die Standard Ports.

                Bei der Funktion Web-seiten/IP Geräte musst Du beachten das der Teil nach

                /jsonrpc?request=

                url encoded sein muss.

                Bsp:

                /jsonrpc?request=%7B"jsonrpc"%3A"2.0"%2C"method"%3A "Player.GetActivePlayers"%2C"id"%3A1%7D

                Werf den JSON Befehl einfach in einen Online URL Encoder.

                Gruß
                Klaus

                Kommentar


                  #9
                  Oh man...
                  Vielen Dank Klaus - wenn ich das IP-Paket auf Port 9090 gebe, klappt es natürlich sofort.
                  Peinlich...

                  Kommentar


                    #10
                    Klaus,
                    Und wie bekomm ich jetzt das Resultat in verschiedene KO variablen.
                    Wenn ich in “Web-seiten/IP-Gerate“ das Empfang auf “Wert als Klartext“ stellen dann wird mir nur ein { anscheinet und nicht das komplette Resultat, das schönste wer das ich die Resultaten in einzelnen variablen bekommen.
                    Vielen dank.
                    Gruß,
                    Raymond

                    Kommentar


                      #11
                      Hallo Raymond,

                      Zum Beispiel:

                      Um festzustellen was gerade auf XBMC abgespielt wird also Musik,Video oder Bilder folgenden Befehl senden. Ausführliche JSON API Beschreibung von XBMC gibts auf deren Wiki.

                      /jsonrpc?request=%7B"jsonrpc"%3A"2.0"%2C"method"%3A "Player.GetActivePlayers"%2C"id"%3A1%7D

                      Antwort:

                      {"id":1,"jsonrpc":"2.0","result":[{"playerid":1,"type":"video"}]}

                      0 = Musik
                      1 = Video
                      2 = Bilder

                      Jetzt kannst Du siehe Beispiel die Daten filtern und in ein KO schreiben.
                      Man könnte XBMC zyklisch abfragen und dann entprechend die gewünschten Befehl ausführen je nachdem was auf XBMC gespielt wird. Ein Baustein der eine konstante Verbindung herstellt wäre besser...


                      Gruß
                      Klaus





                      Kommentar


                        #12
                        Dank, viele Dank für deine Antwort und die muhe, aber nach 8 Stunden Verzuge und fiele Zigaretten hat’s mir noch nicht geklappt.

                        Daten senden ist mir klar aber ich empfangen keine Daten zurück ich empfange nur eine leeres String.
                        XBMC ist darbei aktive und spielt ein Movie
                        Gruß,
                        Raymond

                        Kommentar


                          #13
                          Dann poste doch mal was Du hast.

                          Screenshots...

                          Wenn Du wie oben beschrieben vorgegangen bist sollte es funktionieren.

                          Gruß
                          Klaus

                          Kommentar


                            #14
                            Auf http://IP_HS/hslist

                            Listenschlüssel

                            debug

                            solltest Du bei Event-BiDir sowas sehen:

                            11.09.2013 21:24:16 (IP: 192.168.2.20) (Port: 8080)
                            (Send: 146) 0x47 0x45 0x54 0x20 0x2f 0x6a 0x73 0x6f 0x6e 0x72 0x70 0x63 0x3f 0x72 0x65 0x71 0x75 0x65 0x73 0x74 0x3d 0x25 0x37 0x42 0x22 0x6a 0x73 0x6f 0x6e 0x72 0x70 0x63 0x22 0x25 0x33 0x41 0x22 0x32 0x2e 0x30 0x22 0x25 0x32 0x43 0x22 0x6d 0x65 0x74 0x68 0x6f 0x64 0x22 0x25 0x33 0x41 0x22 0x50 0x6c 0x61 0x79 0x65 0x72 0x2e 0x47 0x65 0x74 0x41 0x63 0x74 0x69 0x76 0x65 0x50 0x6c 0x61 0x79 0x65 0x72 0x73 0x22 0x25 0x32 0x43 0x22 0x69 0x64 0x22 0x25 0x33 0x41 0x31 0x25 0x37 0x44 0x20 0x48 0x54 0x54 0x50 0x2f 0x31 0x2e 0x30 0xd 0xa 0x48 0x6f 0x73 0x74 0x3a 0x20 0x31 0x39 0x32 0x2e 0x31 0x36 0x38 0x2e 0x32 0x2e 0x32 0x30 0xd 0xa 0x43 0x6f 0x6e 0x6e 0x65 0x63 0x74 0x69 0x6f 0x6e 0x3a 0x20 0x43 0x6c 0x6f 0x73 0x65 0xd 0xa 0xd 0xa
                            GET /jsonrpc?request=%7B"jsonrpc"%3A"2.0"%2C"method"%3A "Player.GetActivePlayers"%2C"id"%3A1%7D HTTP/1.0 Host: 192.168.2.20 Connection: Close
                            (Recv: 173) 0x48 0x54 0x54 0x50 0x2f 0x31 0x2e 0x31 0x20 0x32 0x30 0x30 0x20 0x4f 0x4b 0xd 0xa 0x43 0x6f 0x6e 0x74 0x65 0x6e 0x74 0x2d 0x4c 0x65 0x6e 0x67 0x74 0x68 0x3a 0x20 0x36 0x35 0xd 0xa 0x43 0x6f 0x6e 0x74 0x65 0x6e 0x74 0x2d 0x54 0x79 0x70 0x65 0x3a 0x20 0x61 0x70 0x70 0x6c 0x69 0x63 0x61 0x74 0x69 0x6f 0x6e 0x2f 0x6a 0x73 0x6f 0x6e 0xd 0xa 0x44 0x61 0x74 0x65 0x3a 0x20 0x57 0x65 0x64 0x2c 0x20 0x31 0x31 0x20 0x53 0x65 0x70 0x20 0x32 0x30 0x31 0x33 0x20 0x31 0x39 0x3a 0x32 0x34 0x3a 0x33 0x38 0x20 0x47 0x4d 0x54 0xd 0xa 0xd 0xa 0x7b 0x22 0x69 0x64 0x22 0x3a 0x31 0x2c 0x22 0x6a 0x73 0x6f 0x6e 0x72 0x70 0x63 0x22 0x3a 0x22 0x32 0x2e 0x30 0x22 0x2c 0x22 0x72 0x65 0x73 0x75 0x6c 0x74 0x22 0x3a 0x5b 0x7b 0x22 0x70 0x6c 0x61 0x79 0x65 0x72 0x69 0x64 0x22 0x3a 0x31 0x2c 0x22 0x74 0x79 0x70 0x65 0x22 0x3a 0x22 0x76 0x69 0x64 0x65 0x6f 0x22 0x7d 0x5d 0x7d
                            HTTP/1.1 200 OK Content-Length: 65 Content-Type: application/json Date: Wed, 11 Sep 2013 19:24:38 GMT {"id":1,"jsonrpc":"2.0","result":[{"playerid":1,"type":"video"}]}
                            (Gesamt: 5) (Work: 5) (Typ: Liste) (OK: 1)

                            Kommentar


                              #15
                              11.09.2013 22:43:11 (IP: 192.168.2.15) (Port: 80)
                              (Send: 147) 0x47 0x45 0x54 0x20 0x2f 0x6a 0x73 0x6f 0x6e 0x72 0x70 0x63 0x3f 0x72 0x65 0x71 0x75 0x65 0x73 0x74 0x3d 0x25 0x37 0x42 0x22 0x6a 0x73 0x6f 0x6e 0x72 0x70 0x63 0x22 0x25 0x33 0x41 0x22 0x32 0x2e 0x30 0x22 0x25 0x32 0x43 0x22 0x6d 0x65 0x74 0x68 0x6f 0x64 0x22 0x25 0x33 0x41 0x20 0x22 0x50 0x6c 0x61 0x79 0x65 0x72 0x2e 0x47 0x65 0x74 0x41 0x63 0x74 0x69 0x76 0x65 0x50 0x6c 0x61 0x79 0x65 0x72 0x73 0x22 0x25 0x32 0x43 0x22 0x69 0x64 0x22 0x25 0x33 0x41 0x31 0x25 0x37 0x44 0x20 0x48 0x54 0x54 0x50 0x2f 0x31 0x2e 0x30 0xd 0xa 0x48 0x6f 0x73 0x74 0x3a 0x20 0x31 0x39 0x32 0x2e 0x31 0x36 0x38 0x2e 0x32 0x2e 0x31 0x35 0xd 0xa 0x43 0x6f 0x6e 0x6e 0x65 0x63 0x74 0x69 0x6f 0x6e 0x3a 0x20 0x43 0x6c 0x6f 0x73 0x65 0xd 0xa 0xd 0xa
                              GET /jsonrpc?request=%7B"jsonrpc"%3A"2.0"%2C"method"%3A "Player.GetActivePlayers"%2C"id"%3A1%7D HTTP/1.0 Host: 192.168.2.15 Connection: Close
                              (Recv: 184) 0x48 0x54 0x54 0x50 0x2f 0x31 0x2e 0x31 0x20 0x32 0x30 0x30 0x20 0x4f 0x4b 0xd 0xa 0x43 0x6f 0x6e 0x74 0x65 0x6e 0x74 0x2d 0x4c 0x65 0x6e 0x67 0x74 0x68 0x3a 0x20 0x37 0x36 0xd 0xa 0x43 0x6f 0x6e 0x74 0x65 0x6e 0x74 0x2d 0x54 0x79 0x70 0x65 0x3a 0x20 0x61 0x70 0x70 0x6c 0x69 0x63 0x61 0x74 0x69 0x6f 0x6e 0x2f 0x6a 0x73 0x6f 0x6e 0xd 0xa 0x44 0x61 0x74 0x65 0x3a 0x20 0x57 0x65 0x64 0x2c 0x20 0x31 0x31 0x20 0x53 0x65 0x70 0x20 0x32 0x30 0x31 0x33 0x20 0x32 0x30 0x3a 0x34 0x33 0x3a 0x31 0x30 0x20 0x47 0x4d 0x54 0xd 0xa 0xd 0xa 0x7b 0x22 0x65 0x72 0x72 0x6f 0x72 0x22 0x3a 0x7b 0x22 0x63 0x6f 0x64 0x65 0x22 0x3a 0x2d 0x33 0x32 0x37 0x30 0x30 0x2c 0x22 0x6d 0x65 0x73 0x73 0x61 0x67 0x65 0x22 0x3a 0x22 0x50 0x61 0x72 0x73 0x65 0x20 0x65 0x72 0x72 0x6f 0x72 0x2e 0x22 0x7d 0x2c 0x22 0x69 0x64 0x22 0x3a 0x6e 0x75 0x6c 0x6c 0x2c 0x22 0x6a 0x73 0x6f 0x6e 0x72 0x70 0x63 0x22 0x3a 0x22 0x32 0x2e 0x30 0x22 0x7d
                              HTTP/1.1 200 OK Content-Length: 76 Content-Type: application/json Date: Wed, 11 Sep 2013 20:43:10 GMT {"error":{"code":-32700,"message":"Parse error."},"id":null,"jsonrpc":"2.0"}
                              (Gesamt: 8) (Work: 2) (Typ: Liste) (OK: 0)


                              Parse Error mmmm.
                              Im Browser empfang ich die richtigen Daten. Hat es etwas zu tun mit Port 80. Nein doch.
                              Baustein funktioniert, jede 6 sec empfang ich die Parse error.
                              Gruß,
                              Raymond

                              Kommentar

                              Lädt...
                              X