Ankündigung

Einklappen
Keine Ankündigung bisher.

Wetterdaten von Webseite mir Gira Homeserver abfragen Einsteiger

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

    Wetterdaten von Webseite mir Gira Homeserver abfragen Einsteiger

    Hallo versuche seit 2 tagen nur das aktuelle Temperatur von wetter.com abzufragen.
    Habe folgende Zeile aus der URl sprich dem Quellcode ermittelt

    <div class="text--white beta palm-hide">4°C</div>

    jetzt meine Frage. wie kann ich diesen Wert in ein iKo umwandeln?
    Hab mir dazu schon einige Foren angeschaut und komm einfach nicht klar...

    Habe unter Webseiten /IP Geräte abfragen einen neuen Eintrag Wetter gemacht...
    Dann unter DATEN

    Bezeichnung: Wetter
    IP/ Host Adresse: http://www.wetter.com
    IP-Port: 80


    Dann unter SENDEN
    HTTP-Abruf senden:
    URL nur pfad: /deutschland/rosenheim/pang/DE0009029023.html



    Jetzt das eingentliche Problem.

    Ich weiß nicht wirklich was ich bei Empfang alles eintragen muss...
    Vielleicht hat das von euch schon mal jemand so gemacht und kann mir einen Tipp geben.
    Wäre sehr dankbar.


    Zuletzt geändert von Andreas1986; 12.01.2017, 18:04.

    #2
    Schau mal hier an:
    https://knx-user-forum.de/forum/öffe...ung-nicht-klar

    Letzte Bild in Beitrag #8 ist eine gute Beispiel.

    Bram

    Kommentar


      #3
      Okay habe ich mir angeschaut. Kapiere bloß irgendwie nicht wie sich die Daten sprich Beliebige Daten, Text ..... usw. Zusammensetzen. wie müsste das anhand von meinem Beispiel z.B. aussehen? <div class="text--white beta palm-hide">4°C</div>

      Beliebige Daten
      Text ?????
      Wert als Klartext Aktuelles Wetter
      Text ?????
      Beliebige Daten
      Mfg Andy

      Kommentar


        #4
        Zum Beispiel so:

        Beliebige Daten
        Text beta palm-hide">
        Wert als Klartext Aktuelles Wetter
        Text </div>
        Beliebige Daten


        Kommentar


          #5
          You need to check the source data of the webpage to define how much text prior to the temperature value needs to be defined to ensure the data is unique. I assumed you go to the page for Rosenheim.
          In your case,
          palm-hide">
          occurs multiple times in the sourceof that page, prior to the temperature value you are looking for. You need to implement a two-step approach, first find the forecast area for the city, then look for that palm-hide">. The reason for that is that it then will be the only occurrence of that string prior to the temperature value.
          The query you would specify:
          Beliebige Daten
          Text Aktuelle Wettermeldung für
          Beliebige Daten
          Text palm-hide">
          Wert als Klartext Aktuelles Wetter
          Text </div>
          Beliebige Daten

          Your 14-byte internal KO Aktuelles Wetter then will be populated with 4°C.

          Sometimes you will get an issue with special characters. For testing, include commands in the tab 'Commands' to set an IKO (zB "Wetter Abfrage Error") to 0 or 1 depending on the success or failure of the query evaluation.

          Bram

          Kommentar


            #6
            Okay wollte ich grade probieren. Im Logik habe ich mit einem Eingang (Bei Systemstart immer 1) einem Telegrammgenerator mit einem impuls von 120 s und beim Ausgang die Webseitenabfrage.

            Beim Prüfen mekert er und sagt "Ausgang liefert anderes Datenformat". Das Datenformat ist jetzt auf 14-Byte Text eingestellt. Sollte doch eigentlich passen?

            Kommentar


              #7
              Include a screenshot of that part of the logic.

              Kommentar


                #8
                Anbei die Logik
                You do not have permission to view this gallery.
                This gallery has 1 photos.

                Kommentar


                  #9
                  The issue likely is with KO "WetterAktuell". I presume the command in that output box is the actual web request, KO "WetterAktuell" must be a 1-bit object.

                  Kommentar


                    #10
                    I Make Pictures of all my settings
                    You do not have permission to view this gallery.
                    This gallery has 5 photos.

                    Kommentar


                      #11
                      In your output box 162659, remove the KO WetterAktuell.
                      Change the object type of WetterAktuell to 14-Byte.
                      Add the first two lines of the web evaluation as written above:
                      Beliebige Daten
                      Text Aktuelle Wettermeldung für
                      as otherwise you will not get the temperature but whatever follows the first instance of palm-hide"> on that page.

                      Kommentar


                        #12
                        ?
                        You do not have permission to view this gallery.
                        This gallery has 1 photos.

                        Kommentar


                          #13
                          One more "Beliebige Daten" between the two text lines, so insert it as the third line. See post #5.

                          Kommentar


                            #14
                            debug
                            You do not have permission to view this gallery.
                            This gallery has 1 photos.

                            Kommentar


                              #15
                              Andy, it works for me, so should work for you. Three things are different from what I can see:
                              • Do not include the http:// portion, so only specify wetter.com or www.wetter.com
                              • I dropped the für to be sure that umlaut does not cause any issues
                              • I use a standard conversion to get rid of the special character A-carrot.


                              When I trigger the request with my test KO, I get the response as shown in the attachment and a 'no error' feedback ("0").

                              Bram
                              PS: Don't forget to mark the "Value as plain text" to use the conversion table!
                              Angehängte Dateien
                              Zuletzt geändert von bramlangen; 13.01.2017, 13:13. Grund: Added the PS

                              Kommentar

                              Lädt...
                              X