Ankündigung

Einklappen
Keine Ankündigung bisher.

Solarweb API Abfrage

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

    HS/FS Solarweb API Abfrage

    ​Hi, versuche gerade über den HS eine HTTPS API Abfrage bei fronius (solarweb Ertragsprognose, daher auch den Weg über die API, da die Daten im GEN24 nicht vorliegen) zum Laufen zu bekommen.

    Habe den Code erfolgreich in einen HTTP Editor getestet (es wird ein Token als Ergebnis generiert :-)), bekomme das Ganze aber nicht über die HS Webseiten Abfrage hin.

    POST /swqapi/iam/jwt HTTP/1.1
    Host: api.solarweb.com
    accept: application/json
    AccessKeyId: FKIxxxxxx
    AccessKeyValue: 90xxxxxxxx
    Content-Type: application/json-patch+json
    {"userId":"frank@abc.com","password":"geheim"}​

    Anbei die Screenshots mit der HS Konfiguration.
    Bildschirmfoto 2024-09-23 um 16.34.26.png Bildschirmfoto 2024-09-23 um 16.40.47.png

    Danke für Eure Hilfe!​

    #2
    Hello, since I also am having issues with a POST command using a HTTPS API (see my forum-posting from yesterday) maybe I can at least help you to get more information that will be usefull for the experts here.

    It would be helpfull to see the output from the HS debug webpage and specifically the Event-BiDir section. This could at provide a clue as to if the API is connected and authorised correctly.

    //Rolf

    Kommentar


      #3
      Hi,
      in diesem Bereich würde ich nicht den HS4 einsetzen wollen.

      Ich habe für solche Fälle einen eigenen Raspberry Node-Red Server, der mit solchen Abfragen spielerisch umgeht. Wenn du die Werte unbedingt im HS4 benötigst kannst du dir die Infos über den Node Red KNX Ultimate Baustein übertragen. Allerdings mit den bekannten Einschränkungen bei Tetxten (Maximal 14 Byte).

      Kommentar


        #4
        Zitat von rolfbive Beitrag anzeigen
        Hello, since I also am having issues with a POST command using a HTTPS API (see my forum-posting from yesterday) maybe I can at least help you to get more information that will be usefull for the experts here.

        It would be helpfull to see the output from the HS debug webpage and specifically the Event-BiDir section. This could at provide a clue as to if the API is connected and authorised correctly.

        //Rolf
        nice - we are facing the same issue. My code also works perfectly on postman.

        Attached the HS debug

        Bildschirmfoto 2024-09-23 um 17.30.58.png

        Kommentar


          #5
          Try adding the full path including the host as part of the POST line:

          POST api.solarweb.com/swqapi/iam/jwt HTTP/1.1

          The Event-BiDir seems to indicate that you are not getting any response from the server (see my Event-BiDir response). The full path seems to be needed specifically for the POST request and not for GET requests for some reason.

          Give it a go...

          //Rolf

          Kommentar

          Lädt...
          X