Ankündigung

Einklappen
Keine Ankündigung bisher.

PUT Befehle an HUE Bridge ?

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

    HS/FS PUT Befehle an HUE Bridge ?

    Ich suche eine Möglichkeit einen PUT Befehl an meine HUE Bridge zu senden um eine Szene mit einer bestimmten Anlaufzeit (langsames andimmen) zu starten.
    Den Befehl habe ich schon, aber noch keine Möglichkeit ihn abzuschicken. Webseiten auswerten geht nicht weil dort nur GET befehle genutzt werden.

    Hat jemand einen Tipp für mich ?

    #2
    Du musst die Header und den Body manuell eingeben ...

    Kommentar


      #3
      Zitat von EugenDo Beitrag anzeigen
      Du musst die Header und den Body manuell eingeben ...
      Danke kannst Du das bitte genauer Beschreiben! Wo soll ich welchen Body eingeben. Das ist mir nicht ganz so klar , ich habe die befehle bisher nur genutzt um
      Nachrichten an eine Dreambox zu senden.

      Kommentar


        #4
        Das HTTP Protokoll schreibt einen Telegrammaufbau für PUT, GET, POST, etc. vor ... Gira hat hier GET implementiert... http://www.hs-help.net/hshelp/gira/v4_9/de/ipbi.html

        ... für alle anderen VERBen musst Du das manuell mit „Datenblöcken senden“ lösen, indem Du erst die richtigen Header und bei PUT zusätzlich den zu erwartenden Body (JSON bei Hue) sendest.

        Kommentar


          #5
          Danke das werde ich mal testen

          Kommentar


            #6
            klapp leider noch nicht, hast Du noch eine Idee

            smart sniff aufzeichnung

            Code:
            PUT /api/AFJx96dTmOvX4p0VnAxlvVNPgsl04LnQSDvM-m19/groups/pVmq6yRv3XbMNZ8/action HTTP/1.1
            Host: 192.168.5.167
            Connection: keep-alive
            Content-Length: 11
            User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.106 Safari/537.36
            DNT: 1
            Content-Type: text/plain;charset=UTF-8
            Accept: */*
            Origin: http://192.168.5.167
            Accept-Encoding: gzip, deflate
            Accept-Language: de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7
            
            {"on":true}
            HTTP/1.1 200 OK
            Server: nginx
            Date: Sun, 21 Jun 2020 08:58:02 GMT
            Content-Type: application/json
            Connection: close
            Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
            Pragma: no-cache
            Expires: Mon, 1 Aug 2011 09:00:00 GMT Access-Control-Max-Age: 3600
            Access-Control-Allow-Origin: *
            Access-Control-Allow-Credentials: true
            Access-Control-Allow-Methods: POST, GET, OPTIONS, PUT, DELETE, HEAD
            Access-Control-Allow-Headers: Content-Type
            X-XSS-Protection: 1; mode=block
            X-Frame-Options: SAMEORIGIN
            X-Content-Type-Options: nosniff
            Content-Security-Policy: default-src 'self'
            Cache-Control: no-store
            Pragma: no-cache
            Referrer-Policy: no-referrer
            [{"success":{"/groups/pVmq6yRv3XbMNZ8/action/on":true}}]


            debug sieh so aus
            21.06.2020 12:02:46 (IP: 192.168.5.167) (Port: 80)
            (Send: 201) 0x50 0x55 0x54 0x20 0x2f 0x61 0x70 0x69 0x2f 0x41 0x46 0x4a 0x78 0x39 0x36 0x64 0x54 0x6d 0x4f 0x76 0x58 0x34 0x70 0x30 0x56 0x6e 0x41 0x78 0x6c 0x76 0x56 0x4e 0x50 0x67 0x73 0x6c 0x30 0x34 0x4c 0x6e 0x51 0x53 0x44 0x76 0x4d 0x2d 0x6d 0x31 0x39 0x2f 0x67 0x72 0x6f 0x75 0x70 0x73 0x2f 0x70 0x56 0x6d 0x71 0x36 0x79 0x52 0x76 0x33 0x58 0x62 0x4d 0x4e 0x5a 0x38 0x2f 0x61 0x63 0x74 0x69 0x6f 0x6e 0x20 0x48 0x54 0x54 0x50 0x2f 0x31 0x2e 0x31 0xd 0xa 0x48 0x6f 0x73 0x74 0x3a 0x20 0x31 0x39 0x32 0x2e 0x31 0x36 0x38 0x2e 0x35 0x2e 0x31 0x36 0x37 0xd 0xa 0x43 0x6f 0x6e 0x6e 0x65 0x63 0x74 0x69 0x6f 0x6e 0x3a 0x20 0x6b 0x65 0x65 0x70 0x2d 0x61 0x6c 0x69 0x76 0x65 0xd 0xa 0x7b 0x22 0x6f 0x6e 0x22 0x3a 0x74 0x72 0x75 0x65 0x7d 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 0x43 0x6f 0x6e 0x6e 0x65 0x63 0x74 0x69 0x6f 0x6e 0x3a 0x20 0x63 0x6c 0x6f 0x73 0x65 0xd 0xa 0xd
            PUT /api/AFJx96dTmOvX4p0VnAxlvVNPgsl04LnQSDvM-m19/groups/pVmq6yRv3XbMNZ8/action HTTP/1.1
            Host: 192.168.5.167
            Connection: keep-alive
            {"on":true}
            Content-Type: application/json
            Connection: close

            (Recv: 795) 0x48 0x54 0x54 0x50 0x2f 0x31 0x2e 0x31 0x20 0x32 0x30 0x30 0x20 0x4f 0x4b 0xd 0xa 0x53 0x65 0x72 0x76 0x65 0x72 0x3a 0x20 0x6e 0x67 0x69 0x6e 0x78 0xd 0xa 0x44 0x61 0x74 0x65 0x3a 0x20 0x53 0x75 0x6e 0x2c 0x20 0x32 0x31 0x20 0x4a 0x75 0x6e 0x20 0x32 0x30 0x32 0x30 0x20 0x31 0x30 0x3a 0x30 0x32 0x3a 0x34 0x36 0x20 0x47 0x4d 0x54 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 0x43 0x6f 0x6e 0x6e 0x65 0x63 0x74 0x69 0x6f 0x6e 0x3a 0x20 0x63 0x6c 0x6f 0x73 0x65 0xd 0xa 0x43 0x61 0x63 0x68 0x65 0x2d 0x43 0x6f 0x6e 0x74 0x72 0x6f 0x6c 0x3a 0x20 0x6e 0x6f 0x2d 0x73 0x74 0x6f 0x72 0x65 0x2c 0x20 0x6e 0x6f 0x2d 0x63 0x61 0x63 0x68 0x65 0x2c 0x20 0x6d 0x75 0x73 0x74 0x2d 0x72 0x65 0x76 0x61 0x6c 0x69 0x64 0x61 0x74 0x65 0x2c 0x20 0x70 0x6f 0x73 0x74 0x2d 0x63 0x68 0x65 0x63 0x6b 0x3d 0x30 0x2c 0x20 0x70 0x72 0x65 0x2d 0x63 0x68 0x65 0x63 0x6b 0x3d 0x30 0xd 0xa 0x50
            HTTP/1.1 200 OK
            Server: nginx
            Date: Sun, 21 Jun 2020 10:02:46 GMT
            Content-Type: application/json
            Connection: close
            Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
            P
            (Gesamt: 0) (Work: 0) (Typ: Liste) (OK: 1)
            You do not have permission to view this gallery.
            This gallery has 1 photos.

            Kommentar


              #7
              Ich würde mich an das HTTP Protokoll halten ...

              erst Header
              Abstand
              dann Body

              Kommentar


                #8
                Hallo!

                Wenn Du einen HS hast, wäre der Baustein 14100 HueGroup nichts für Dich? Ok, dass langsame Andimmen macht der noch nicht, aber vielleicht kann der Tobias ( En3rGy ) das noch einbauen? Denn für alles andere funktioniert der 14100 bei mir sehr gut....

                Grüße

                Olaf
                Möchte den Komfort meiner Installation nicht mehr missen!

                Kommentar


                  #9
                  Zitat von Hightech Beitrag anzeigen
                  Hallo!

                  Wenn Du einen HS hast, wäre der Baustein 14100 HueGroup nichts für Dich? Ok, dass langsame Andimmen macht der noch nicht, aber vielleicht kann der Tobias ( En3rGy ) das noch einbauen? Denn für alles andere funktioniert der 14100 bei mir sehr gut....

                  Grüße

                  Olaf
                  Kannst du mir mal ein Screenshot von deiner Logik schicken?
                  Mich würde der Teil interessieren wo der aktuelle Status auf die K Objekte kommt (On/Off, Brightness, Color...)

                  Danke und Gruß
                  Sascha

                  Kommentar

                  Lädt...
                  X