Can't retract values from site

Einklappen
X
 
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge
  • ty5500
    Smart Home'r
    • 11.06.2018
    • 37

    #1

    Can't retract values from site

    Hi,

    the following link gives me the rain forecast for a location (https://gpsgadget.buienradar.nl/data...t?lat=51&lon=3). If no rain is forecasted the hourly numbers are zero.
    I want to retrieve the first three number of this link in loxone. this is the forecasted rain for the present time. this so i can close my sunshades if it is higher than zero.
    I can't seem to retract these numbers with a virtual http input (\v). Could you please assist as i've tried everything?

    Also, is there a possibility to extract weather data from sites such as : https://www.buienradar.be/weer/Grote%20Heide/BE/2796956?

    Currently i use a darksky api to retract weather data but certainly for rain it is not always reliable enough.

    Thanks for your appreciated advice.
    Zuletzt geändert von ty5500; 12.04.2020, 22:01.
  • Tico
    Lox Guru
    • 31.08.2016
    • 1035

    #2
    Both sites use https. The Miniserver doesn't work for https sites.

    There is a workaround using the Loxberry and the https2http plugin.





    Otherwise find a resource that uses http.
    Ich spreche kein Deutsch. Gib Google Translate die Schuld, wenn ich unverständlich bin.

    Kommentar

    • Gerd Clever
      MS Profi
      • 24.07.2016
      • 642

      #3
      I think that is not a problem, because http://gpsgadget.buienradar.nl/data/...t?lat=51&lon=3 works too.

      To retrieve the first three values I suggest:

      value 1: \v
      value 2: \s10\v
      value 3: \s20\v

      But I didn't test it. If it fails, you can combine \v, \ixxx\i, \r and \n.
      Zuletzt geändert von Gerd Clever; 13.04.2020, 06:57.
      Miniserver Gen 2, v13.1.11.17, 9x Extension, 2x Relay Extension, 4x 1-Wire, Türkontakte, Mobotix T25

      Wenn der Herr nicht das Haus baut, dann ist alle Mühe der Bauleute umsonst. (Psalm 127,1)

      Kommentar

      • ty5500
        Smart Home'r
        • 11.06.2018
        • 37

        #4
        Thanks, works like a charm after i changed it to http. Didn't know the virtual http input didn't support https. It's however a bit strange as my darksky link was also https.

        Kommentar


        • Tico
          Tico kommentierte
          Kommentar bearbeiten
          Darksky is an interesting case... It's address is https but it's not an encrypted site (owing to the fact the Miniserver can't decrypt https).

          But it also shows the padlock symbol in Chrome browser (which suggests it is an encrypted connection).

          Perhaps someone has an explanation?

        • HBeumer
          HBeumer kommentierte
          Kommentar bearbeiten
          darksky is now part of apple and by the end of 2021 the API will no longer be available to others...

        • HBeumer
          HBeumer kommentierte
          Kommentar bearbeiten
          Can you share a few screenshots how you've made this work? I need to migrate away from Darksky and buienradar would be a good option for my location (Central NL)
      • HBeumer
        Smart Home'r
        • 24.02.2017
        • 45

        #5
        interesting, do you happen to have a XML file to ease the integration with Loxone for others?

        Kommentar

        • ty5500
          Smart Home'r
          • 11.06.2018
          • 37

          #6
          More information regarding darksky and the xml template is available on https://www.loxwiki.eu/display/LOX/D...xone+einbinden. For me, i registered in the past (when they still allowed subscriptions) and using the custom darksky https link (with personal token) i can retrieve the weather values with the miniserver and a virtual http input command with no problems.

          Kommentar

          • ty5500
            Smart Home'r
            • 11.06.2018
            • 37

            #7
            Hi HBEUMER, it attached 2 screenshots of how i use it for buienradar. I only detect when it's going to rain to close my sun shades.
            Angehängte Dateien
            Zuletzt geändert von ty5500; 19.06.2020, 21:00.

            Kommentar

            • Gast

              #8
              Hi all,

              my first time post overhere...

              I have a Okofen Pellematic heating system that has modBus and Json implementation on it... I've bought the Loxone modbus module but for a strange reason it doesn't work. (I have a case open with Loxone Belgium)
              So I started to think that I might do it with JSON ... but im stuck as well.

              I've included the json data as attachment.

              How can I for example read out the following value?

              "L_ambient" : "166", which is 16.6 degrees outside temperature

              I tried with system\iL_ambient":"\i'v but it still show as 0 in the live view.

              thanks in advance!

              Jimmy



              Angehängte Dateien

              Kommentar

              • Christian Fenzl
                Lebende Foren Legende
                • 31.08.2015
                • 11234

                #9
                It is very important that you use the raw content, not any pre-formatted json output from the Browser or an editor. White spaces might have been changed through a pretty-print output.

                Check the raw output. If you have LoxBerry, try the Command Recognition plugin.
                Hilfe für die Menschen der Ukraine: https://www.loxforum.com/forum/proje...Cr-die-ukraine

                Kommentar


                • Christian Fenzl
                  Christian Fenzl kommentierte
                  Kommentar bearbeiten
                  You have written ‘v this is a typo in your post? Should be \v

                • Gast
                  Gast kommentierte
                  Kommentar bearbeiten
                  Hi Christian... I managed to do this with your tip for using raw data: L_ambient= it did that fine but it shows up as 234 and it should be 23.4 degrees. I looking into a math module in Loxone but couldn't find it. Or can I do this from the query itself?

                  now an hour later when checking the value it still shows up as 234 and its 21.9 degrees outside... hmmm.. strange
                  Zuletzt geändert von Gast; 27.08.2020, 18:35. Grund: edited the "hour later"
              • Gast

                #10
                Hi Christian thanks for your update... I tried with the \v in the end but that doesn't work either.. I will try installing loxberry later today on a spare Pi I have lying around...

                Kommentar

                • HBeumer
                  Smart Home'r
                  • 24.02.2017
                  • 45

                  #11
                  I've finally found some time to invest in moving from the darksky data to the KNMI data (relevant mostly for NL) through weerlive.nl. The response is:


                  { "liveweer": [{"plaats": "Amsterdam", "temp": "17.2", "gtemp": "15.8", "samenv": "Geheel bewolkt", "lv": "84", "windr": "ZO", "windms": "3", "winds": "2", "windk": "5.8", "windkmh": "10.8", "luchtd": "1015.4", "ldmmhg": "762", "dauwp": "14", "zicht": "14", "verw": "Afwisseling van wolkenvelden en zon, lokaal een bui. Morgen meer buien", "sup": "06:43", "sunder": "20:40", "image": "bewolkt", "d0weer": "bewolkt", "d0tmax": "20", "d0tmin": "11", "d0windk": "2", "d0windknp": "6", "d0windms": "3", "d0windkmh": "11", "d0windr": "Z", "d0neerslag": "17", "d0zon": "14", "d1weer": "regen", "d1tmax": "20", "d1tmin": "14", "d1windk": "3", "d1windknp": "8", "d1windms": "4", "d1windkmh": "15", "d1windr": "ZW", "d1neerslag": "90", "d1zon": "30", "d2weer": "regen", "d2tmax": "19", "d2tmin": "13", "d2windk": "2", "d2windknp": "6", "d2windms": "3", "d2windkmh": "11", "d2windr": "W", "d2neerslag": "80", "d2zon": "20", "alarm": "0"}]}

                  whenever the variable is a number it comes through without issues. However I'm struggling to get the following data into loxone appropriately:
                  "sup": "06:43" --> "sup": "\v --> Only seems to provide the piece in front of the colon (hours) but not the part after it (the minutes).
                  "windr": "ZO" --> "windir" : "\v --> I only get the value 0. How on earth can I capture a string?



                  Kommentar

                  • Christian Fenzl
                    Lebende Foren Legende
                    • 31.08.2015
                    • 11234

                    #12
                    Strings cannot directly be read, but only by a workaround.
                    By using \1 you can read the ASCII code of one character.

                    For example
                    Code:
                    "windir": "\i --> Z --> 90
                    "windir": "\.\i --> O --> 79
                    With a status block, you can back-convert the numbers to letters. It is important to know all combinations. If there would be a windr of ZZO you also would require additional logic to recognize three letters instead of two.

                    With the time, you can use
                    Code:
                    "sup": "\v
                    "sup": "\s3\v
                    that gives you two numbers, that also by a status block can be re-combined (<v1>:<v2>).


                    Hilfe für die Menschen der Ukraine: https://www.loxforum.com/forum/proje...Cr-die-ukraine

                    Kommentar

                    • HBeumer
                      Smart Home'r
                      • 24.02.2017
                      • 45

                      #13
                      Zitat von Christian Fenzl
                      Strings cannot directly be read, but only by a workaround.
                      By using \1 you can read the ASCII code of one character.

                      For example
                      Code:
                      "windir": "\i --> Z --> 90
                      "windir": "\.\i --> O --> 79
                      With a status block, you can back-convert the numbers to letters. It is important to know all combinations. If there would be a windr of ZZO you also would require additional logic to recognize three letters instead of two.

                      With the time, you can use
                      Code:
                      "sup": "\v
                      "sup": "\s3\v
                      that gives you two numbers, that also by a status block can be re-combined (<v1>:<v2>).

                      Uh, oh... the "windir" parameter can have 2 letter and 3 letter values. e.g. ZO and NNO. what would the outcome be for the 3rd letter if the string is only 2 letters long?

                      Code:
                      "windir": "\i --> Z --> 90
                      "windir": "\.\i --> O --> 79
                      "windir": "\.\.\i --> ? --> ??
                      Zuletzt geändert von HBeumer; 01.09.2020, 10:39.

                      Kommentar

                      • Christian Fenzl
                        Lebende Foren Legende
                        • 31.08.2015
                        • 11234

                        #14
                        A complete list of all ASCII codes, characters, symbols and signs included in the 7-bit ASCII table and the extended ASCII table according to the Windows-1252 character set, which is a superset of ISO 8859-1 in terms of printable characters.

                        " --> 34
                        Hilfe für die Menschen der Ukraine: https://www.loxforum.com/forum/proje...Cr-die-ukraine

                        Kommentar

                        • HBeumer
                          Smart Home'r
                          • 24.02.2017
                          • 45

                          #15
                          Thanks a lot Christian Fenzl . I've managed to make it work using a status block and the splitting of the ASCII codes. Right now I've migrated away from Darksky onto the Dutch weather service site works like a charm

                          Kommentar

                          Lädt...