Ankündigung

Einklappen
Keine Ankündigung bisher.

Senec und Gira X1

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

    #76
    Hallo sti87,

    ohne content lenght geht es nicht.
    Es läuft auch nicht wenn ich mehr als die von dir vorgegeben 5 Werte Abfrage.

    Gruss aus dem schönen Köln am Rhein.

    Kommentar


      #77
      Okay, dann war ich schon am richtigen Weg. Welche Werte willst Du denn noch abgreifen? Was ist für Dich noch relevant (interessiert mich persönlich ;-))

      Hast Du schon versucht die Abfrage in zB. Postman nachzubauen und die Content-Length zu bestimmen?

      Kommentar


        #78
        Ich hatte damals in einem anderen Forum gelesen welche Werte es zum Abfragen aus dem SENEC gibt.
        Dort wurden 7 Abfragen angeboten:
        PV1_POWER_RATIO: PV-Begrenzung
        ENERGY_GUI_INVERTER_POWER:Erzeugter PV-Strom
        ENERGY_GUI_BAT_DATA_FUEL_CHARGE:AKKU-Beladung
        ENERGY_GUI_BAT_DATA_POWER:AKKU-Entnahme
        ENERGY_GUI_HOUSE_POW:Hausverbrauch
        PM1OBJ1_P_TOTAL:Netz-Bezug
        ENERGY_GUI_BAT_DATA_OA_CHARGING:Gesamtladeenergie( kWh)​

        Die 5 von dir reichen mir völlig aus

        Kommentar


          #79
          Hallo
          ich frage aktuell diese 5 Werte ab, aber die passen nicht ganz zu der Ausgabe aus dem Homeassistant. Bin bis zum Wochenende unterwegs und werde dann weitertesten.

          image.png

          Senec Home Battery
          Senec_v2_1 Battery Charge Percent
          100,0 %
          Senec_v2_1 Battery Charge Power
          0,0 W
          Senec_v2_1 Battery charged
          1.531,61 kWh
          Senec_v2_1 Battery Discharge Power
          195,23 W
          Senec_v2_1 Battery discharged
          1.382,64 kWh
          Senec_v2_1 Battery State Power
          -195,23 W
          Senec_v2_1 Battery Temperature
          18,0 °C
          Senec_v2_1 Case Temperature
          22,77 °C
          Senec_v2_1 Controller Temperature
          38,32 °C
          Senec_v2_1 Grid Exported
          6.843,45 kWh
          Senec_v2_1 Grid Exported Power
          15,63 W
          Senec_v2_1 Grid Imported
          537,48 kWh
          Senec_v2_1 Grid Imported Power
          0,0 W
          Senec_v2_1 Grid State Power
          -15,63 W
          Senec_v2_1 House consumed
          2.894,59 kWh
          Senec_v2_1 House Power
          180,17 W
          Senec_v2_1 Solar generated
          8.977,26 kWh
          Senec_v2_1 Solar Generated Power
          0,0 W
          Senec_v2_1 System State
          DISCHARGE
          ​​

          Kommentar


            #80
            Stimmt mal soweit alles bis auf Dein Hausverbrauch, der Wert ist mit -12,84 einerseits falsch und weicht von den anderen Werten ab.

            Hast Du die Logikblätter kopiert, oder jedes von Hand gemacht? Jedenfalls musst Du Dir das vom Hausverbrauch ansehen. Entweder hast Dich wo vertippt, was falsch verbunden oder ein iKO verhaut.

            Kommentar


              #81
              Hallo,

              habe mittlerweile eine ganze Anzahl an Abfragen laufen, was mir aber fehlt sind die Abfragen bezüglich Temperatur.
              Folgendes habe ich gefunden:

              {"ENERGY":{"GUI_HOUSE_POW":"","GUI_GRID_POW":"" ,"G UI_INVERTER_POWER":"","GUI_BAT_DATA_POWER":"","GUI _BAT_DATA_FUEL_CHARGE":""}}

              {"STATISTIC":{"LIVE_PV_GEN":"","LIVE_HOUSE_CONS ":" ","LIVE_GRID_EXPORT":"","LIVE_GRID_IMPORT":"", "LIV E_BAT_CHARGE":"","LIVE_BAT_DISCHARGE":""}}​

              Kennt jemand die richtigen Abfragen?

              Kommentar


                #82
                Naja, musst die API halt etwas durchforsten und dann die richtigen Arrays abfragen.

                Eventuell ist es dieses hier?

                00.jpg

                Kommentar


                  #83
                  Hallo,

                  wie würdet Ihr "TEMP_DATA_COLLECTED" in zusammenhang mit Senec übersetzen?

                  Kommentar


                    #84
                    Das die Temperaturwerte erfolgreich gelesen wurden? 0/1

                    Kommentar


                      #85
                      Guten Morgen,

                      habt ihr auch schon das Update auf Eurem Senec-Speicher erhalten? Damit geht unsere Abfrage der lala.cgi nicht mehr, weil Senec im Hintergrund HTTPS (enforced) implementiert hat.

                      Ich habe die Abfrage bereits auf Port 443 geändert und TCP/TLS gewählt, leider klappt es nicht.
                      Hat wer von Euch bereits eine Umstellung hinbekommen?

                      Danke
                      Angehängte Dateien

                      Kommentar


                        #86
                        Ich habe die Content-Length als Header entfernt und die Abfrage auf einen Wert reduziert.
                        Offensichtlich gibt mir SENEC einen 400 Bad Request zurück.

                        EugenDo Du bist doch ein WebAbfragen-Gott :-) Hast Du mir eventuell eine Idee? Das ist tatsächlich meine erste HTTPS Abfrage im HS.

                        DANKE

                        Kommentar


                          #87
                          Ich bin einen Schritt weiter. Wenn ich KEINE Content-Length in den Headern mitgebe, erhalte ich immer den "400 Bad Request".

                          Zu Testzwecken habe ich auf einen Abfragewert reduziert, die Content-Length hierfür entspricht 41. So habe ich gezählt, aber auch Postman. Dort funktioniert die Abfrage im Übrigen:

                          postman.jpg

                          Im HS habe ich folgende Abfrageparameter:

                          HS.jpg

                          Die Abfrage geht aber nicht und wirkt abgeschnitten:

                          snap.jpg

                          Spannend finde ich die HEX-Werte welche im (Send: 143) angezeigt werden. Wenn ich diese umrechne kommt folgende Anfrage raus:

                          Code:
                          POST /lala.cgi HTTP/1.1
                          Content-Type: application/json
                          Host: 172.16.20.108
                          Content-Length: 65
                          {"ENERGY":{"GUI_BAT_DATA_FUEL_CHARGE":"","CHARGE":65}}
                          Es scheint also als ob der HS die Content-Length eigenständig anpasst. Ebenso aber auch die JSON-Abfrage manipuliert.

                          Hat jemand von Euch noch die alte Version von SENEC installiert, wo die Abfrage noch läuft? Könnt ihr die Werte aus der Debug-Seite mal bekanntgeben?
                          Angehängte Dateien

                          Kommentar


                            #88
                            Hallo,

                            bei mir kommen auch keine Werte mehr

                            Kommentar


                              #89
                              Ooookay, das hat mich nun einiges an Zeit gekostet

                              Also, das Problem liegt an der neuen Implementierung von SENEC, vermutlich in deren nginx.
                              Bisher hatten wir einen POST /lala.cgi HTTP/1.1 durchgeführt. Der bisherige Webserver hat den HTTP/1.1 ignoriert, da er nur HTTP/1.0 konnte. Man sieht es auch an den alten Screenshots.

                              Mit dem neuen Webserver haben sich die Responses auch verändert. Dabei ist mir aufgefallen, dass Transfer-Encoding: chunked als Header gesetzt ist und hier startet der Spass: mit „chunked“ Antworten kommt der HS nicht klar:

                              Ich habe nun die POST Anfrage auf HTTP 1.0 gesetzt, damit geht es wieder.
                              Ebenso habe ich in dem Zuge auch die Abfrage genauer spezifiziert, falls wieder mal ein SENEC-Update kommt und Ärger macht.

                              Konkret:
                              1. POST auf HTTP 1.0 heruntergesetzt, HTTP 1.0 hat kein Transfer-Encoding: chunked.
                              2. Host zusätzlich mit Port 443 spezifiziert
                              3. Connection Close Statement angehängt
                              SENEC HTTPS wiederbelebt.png


                              Bitte um Rückmeldung ob es damit bei Euch auch funktioniert.

                              Viele Grüsse
                              Zuletzt geändert von sti87; 01.09.2023, 22:11. Grund: Typo

                              Kommentar


                                #90
                                Hallo,

                                bekomme das irgendwie nicht mehr zum laufen.

                                image.png

                                ​​image.png

                                "TEMPMEASURE":{"BATTERY_TEMP":"","CASE_TEMP":" ","M CU_TEMP":"","TEMP_DATA_COLLECTED":""}}
                                Con
                                (Recv: 407) 0x48 0x54 0x54 0x50 0x2f 0x31 0x2e 0x31 0x20 0x34 0x30 0x30 0x20 0x42 0x61 0x64 0x20 0x52 0x65 0x71 0x75 0x65 0x73 0x74 0xd 0xa 0x53 0x65 0x72 0x76 0x65 0x72 0x3a 0x20 0x6e 0x67 0x69 0x6e 0x78 0x2f 0x31 0x2e 0x31 0x37 0x2e 0x37 0xd 0xa 0x44 0x61 0x74 0x65 0x3a 0x20 0x53 0x61 0x74 0x2c 0x20 0x30 0x39 0x20 0x53 0x65 0x70 0x20 0x32 0x30 0x32 0x33 0x20 0x31 0x38 0x3a 0x32 0x31 0x3a 0x35 0x30 0x20 0x47 0x4d 0x54 0xd 0xa 0x43 0x6f 0x6e 0x74 0x65 0x6e 0x74 0x2d 0x54 0x79 0x70 0x65 0x3a 0x20 0x74 0x65 0x78 0x74 0x2f 0x68 0x74 0x6d 0x6c 0xd 0xa 0x43 0x6f 0x6e 0x74 0x65 0x6e 0x74 0x2d 0x4c 0x65 0x6e 0x67 0x74 0x68 0x3a 0x20 0x32 0x35 0x35 0xd 0xa 0x43 0x6f 0x6e 0x6e 0x65 0x63 0x74 0x69 0x6f 0x6e 0x3a 0x20 0x63 0x6c 0x6f 0x73 0x65 0xd 0xa 0xd 0xa 0x3c 0x68 0x74 0x6d 0x6c 0x3e 0xd 0xa 0x3c 0x68 0x65 0x61 0x64 0x3e 0x3c 0x74 0x69 0x74 0x6c 0x65 0x3e 0x34 0x30 0x30 0x20 0x54 0x68 0x65 0x20 0x70 0x6c 0x61 0x69 0x6e 0x20 0x48 0x54 0x54 0x50 0x20 0x72 0x65 0x71 0x75 0x65 0x73 0x74 0x20
                                HTTP/1.1 400 Bad Request
                                Server: nginx/1.17.7
                                Date: Sat, 09 Sep 2023 18:21:50 GMT
                                Content-Type: text/html
                                Content-Length: 255
                                Connection: close

                                <html>
                                <head><title>400 The plain HTTP request
                                (Gesamt: 17) (Work: 2) (Typ: Liste) (OK: 0)
                                09.09.2023 20:22:40 (IP: 172.24.174.100) (Port: 443)
                                (Send: 256) 0x50 0x4f 0x53 0x54 0x20 0x2f 0x6c 0x61 0x6c 0x61 0x2e 0x63 0x67 0x69 0x20 0x48 0x54 0x54 0x50 0x2f 0x31 0x2e 0x30 0xd 0xa 0x48 0x6f 0x73 0x74 0x3a 0x20 0x31 0x37 0x32 0x2e 0x32 0x34 0x2e 0x31 0x37 0x34 0x2e 0x31 0x30 0x30 0x3a 0x34 0x34 0x33 0xd 0xa 0x43 0x6f 0x6e 0x74 0x65 0x6e 0x74 0x2d 0x4c 0x65 0x6e 0x67 0x74 0x68 0x3a 0x20 0x31 0x39 0x37 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 0xd 0xa 0x7b 0x22 0x45 0x4e 0x45 0x52 0x47 0x59 0x22 0x3a 0x7b 0x22 0x47 0x55 0x49 0x5f 0x48 0x4f 0x55 0x53 0x45 0x5f 0x50 0x4f 0x57 0x22 0x3a 0x22 0x22 0x2c 0x22 0x47 0x55 0x49 0x5f 0x47 0x52 0x49 0x44 0x5f 0x50 0x4f 0x57 0x22 0x3a 0x22 0x22 0x2c 0x22 0x47 0x55 0x49 0x5f 0x49 0x4e 0x56 0x45 0x52 0x54 0x45 0x52 0x5f 0x50 0x4f 0x57 0x45 0x52 0x22 0x3a 0x22 0x22 0x2c 0x22 0x47 0x55 0x49 0x5f 0x42 0x41 0x54 0x5f 0x44 0x41 0x54 0x41 0x5f 0x50 0x4f 0x57 0x45 0x52 0x22 0x3a 0x22
                                POST /lala.cgi HTTP/1.0
                                Host: 172.x.x.x:443
                                Content-Length: 197
                                Content-Type: application/json

                                {"ENERGY":{"GUI_HOUSE_POW":"","GUI_GRID_POW":"" ,"G UI_INVERTER_POWER":"","GUI_BAT_DATA_POWER":"
                                (Recv: 407) 0x48 0x54 0x54 0x50 0x2f 0x31 0x2e 0x31 0x20 0x34 0x30 0x30 0x20 0x42 0x61 0x64 0x20 0x52 0x65 0x71 0x75 0x65 0x73 0x74 0xd 0xa 0x53 0x65 0x72 0x76 0x65 0x72 0x3a 0x20 0x6e 0x67 0x69 0x6e 0x78 0x2f 0x31 0x2e 0x31 0x37 0x2e 0x37 0xd 0xa 0x44 0x61 0x74 0x65 0x3a 0x20 0x53 0x61 0x74 0x2c 0x20 0x30 0x39 0x20 0x53 0x65 0x70 0x20 0x32 0x30 0x32 0x33 0x20 0x31 0x38 0x3a 0x32 0x32 0x3a 0x34 0x30 0x20 0x47 0x4d 0x54 0xd 0xa 0x43 0x6f 0x6e 0x74 0x65 0x6e 0x74 0x2d 0x54 0x79 0x70 0x65 0x3a 0x20 0x74 0x65 0x78 0x74 0x2f 0x68 0x74 0x6d 0x6c 0xd 0xa 0x43 0x6f 0x6e 0x74 0x65 0x6e 0x74 0x2d 0x4c 0x65 0x6e 0x67 0x74 0x68 0x3a 0x20 0x32 0x35 0x35 0xd 0xa 0x43 0x6f 0x6e 0x6e 0x65 0x63 0x74 0x69 0x6f 0x6e 0x3a 0x20 0x63 0x6c 0x6f 0x73 0x65 0xd 0xa 0xd 0xa 0x3c 0x68 0x74 0x6d 0x6c 0x3e 0xd 0xa 0x3c 0x68 0x65 0x61 0x64 0x3e 0x3c 0x74 0x69 0x74 0x6c 0x65 0x3e 0x34 0x30 0x30 0x20 0x54 0x68 0x65 0x20 0x70 0x6c 0x61 0x69 0x6e 0x20 0x48 0x54 0x54 0x50 0x20 0x72 0x65 0x71 0x75 0x65 0x73 0x74 0x20
                                HTTP/1.1 400 Bad Request
                                Server: nginx/1.17.7
                                Date: Sat, 09 Sep 2023 18:22:40 GMT
                                Content-Type: text/html
                                Content-Length: 255
                                Connection: close

                                <html>
                                <head><title>400 The plain HTTP request
                                (Gesamt: 21) (Work: 2) (Typ: Liste) (OK: 0)
                                09.09.2023 20:22:45 (IP: 172.24.174.100) (Port: 443)
                                (Send: 271) 0x50 0x4f 0x53 0x54 0x20 0x2f 0x6c 0x61 0x6c 0x61 0x2e 0x63 0x67 0x69 0x20 0x48 0x54 0x54 0x50 0x2f 0x31 0x2e 0x30 0xd 0xa 0x48 0x6f 0x73 0x74 0x3a 0x20 0x31 0x37 0x32 0x2e 0x32 0x34 0x2e 0x31 0x37 0x34 0x2e 0x31 0x30 0x30 0x3a 0x34 0x34 0x33 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 0x74 0x65 0x6e 0x74 0x2d 0x4c 0x65 0x6e 0x67 0x74 0x68 0x3a 0x20 0x32 0x32 0x30 0xd 0xa 0xd 0xa 0x7b 0x22 0x53 0x54 0x41 0x54 0x49 0x53 0x54 0x49 0x43 0x22 0x3a 0x7b 0x22 0x4c 0x49 0x56 0x45 0x5f 0x50 0x56 0x5f 0x47 0x45 0x4e 0x22 0x3a 0x22 0x22 0x2c 0x22 0x4c 0x49 0x56 0x45 0x5f 0x48 0x4f 0x55 0x53 0x45 0x5f 0x43 0x4f 0x4e 0x53 0x22 0x3a 0x22 0x22 0x2c 0x22 0x4c 0x49 0x56 0x45 0x5f 0x47 0x52 0x49 0x44 0x5f 0x45 0x58 0x50 0x4f 0x52 0x54 0x22 0x3a 0x22 0x22 0x2c 0x22 0x4c 0x49 0x56 0x45 0x5f 0x47 0x52 0x49 0x44 0x5f 0x49 0x4d 0x50 0x4f 0x52 0x54 0x22 0x3a 0x22
                                POST /lala.cgi HTTP/1.0
                                Host: 172.x.x.x:443
                                Content-Type: application/json
                                Content-Length: 220

                                {"STATISTIC":{"LIVE_PV_GEN":"","LIVE_HOUSE_CONS ":" ","LIVE_GRID_EXPORT":"","LIVE_GRID_IMPORT":"
                                (Recv: 407) 0x48 0x54 0x54 0x50 0x2f 0x31 0x2e 0x31 0x20 0x34 0x30 0x30 0x20 0x42 0x61 0x64 0x20 0x52 0x65 0x71 0x75 0x65 0x73 0x74 0xd 0xa 0x53 0x65 0x72 0x76 0x65 0x72 0x3a 0x20 0x6e 0x67 0x69 0x6e 0x78 0x2f 0x31 0x2e 0x31 0x37 0x2e 0x37 0xd 0xa 0x44 0x61 0x74 0x65 0x3a 0x20 0x53 0x61 0x74 0x2c 0x20 0x30 0x39 0x20 0x53 0x65 0x70 0x20 0x32 0x30 0x32 0x33 0x20 0x31 0x38 0x3a 0x32 0x32 0x3a 0x34 0x35 0x20 0x47 0x4d 0x54 0xd 0xa 0x43 0x6f 0x6e 0x74 0x65 0x6e 0x74 0x2d 0x54 0x79 0x70 0x65 0x3a 0x20 0x74 0x65 0x78 0x74 0x2f 0x68 0x74 0x6d 0x6c 0xd 0xa 0x43 0x6f 0x6e 0x74 0x65 0x6e 0x74 0x2d 0x4c 0
                                Zuletzt geändert von be1001; 09.09.2023, 19:35.

                                Kommentar

                                Lädt...
                                X