Weather data

Einklappen
X
 
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge
  • RadoG
    Azubi
    • 01.09.2015
    • 3

    #1

    Weather data

    Hello


    Has anyone any experience with implementing weather forecast from yr.no in XML fomat to Loxone. E.g. http://www.yr.no/place/Slovakia/Ko%C...e/forecast.xml
    What should be used in Command recognition of Virtual Http input command, in order to read e.g. forecasted temperature for the following time period (0) ?

    Thanks for any advice
  • Rar9
    LoxBus Spammer
    • 25.08.2015
    • 219

    #2
    Hi

    This looks very similar to what we have here, which is using the weather.com data.

    This works easy without might tweaking to get a few day of forcast.



    Kommentar


    • RadoG
      RadoG kommentierte
      Kommentar bearbeiten
      Thanks. Yes I know that threat. I have no problem with setup for tuxnet, but no success with yr.no :-(
  • killeriq
    Smart Home'r
    • 18.09.2015
    • 91

    #3
    hm i even cant get running the tuxnet, everywhere just 0 , but if i enter that url to browser, its showing data from xml, no clue where is the problem

    Kommentar


    • RadoG
      RadoG kommentierte
      Kommentar bearbeiten
      Hmm I have no problem with such an inputs:
      URL of virtual http input: http://weather.tuxnet24.de/?mode=xml&id=LOXX0003&unit=c
      Command recognition for e.g. current temperature: \i<current_temp>\i\v
      Command recognition for e.g. current humidity: \i<humidity>\i\v
      Etc.
  • killeriq
    Smart Home'r
    • 18.09.2015
    • 91

    #4
    hmm could be that loxone server cant connect to internet? any way how to test it? within app? some ping command somewhere...

    Kommentar

    • killeriq
      Smart Home'r
      • 18.09.2015
      • 91

      #5
      this works for me : https://www.loxforum.com/forum/faqs-...stein-abfragen

      Kommentar


      • RadoG
        RadoG kommentierte
        Kommentar bearbeiten
        Hi

        Thanks for the link. But my German is very poor. And to set up anything based on Google translator is not good idea:-)

      • killeriq
        killeriq kommentierte
        Kommentar bearbeiten
        no mozeme aj slovensky

        long story short:
        1. register here http://www.wunderground.com/weather/api/ to get the reg number
        2. http://www.wunderground.com/wundermap/ - find your location
        3.take Wunderground API - Programm v2.Loxone from there open it and doubleclick on the &quot;program&quot; module and edit the lines
        like:
        #define API_KEY &quot;xxxxxxxxxxx&quot; // <-- Hier den API-Key eintragen. // Put your API-Key here.
        #define STATION &quot;pws:IPRHONIC2&quot; // <-- Hier ID der Wetterstation eintragen. // Put your Station ID here.
        #define LANG &quot;SK&quot; // <-- Sprache // Language (http://www.wunderground.com/weather/...e-support&MR=1)
        #define SERVER &quot;api.wunderground.com&quot;
        4. Also copy content of VIU_Wunderground API Template.zip to &quot;C:\ProgramData\Loxone\Loxone Config XXX\Templates\VirtualIn&quot; After in Loxone Config: Miniserver -> Virtual I/O -> template import

        That should be all
    • Gast

      #6
      RadoG

      Did you manage to use weather data from yr.no?

      Kommentar


      • RadoG
        RadoG kommentierte
        Kommentar bearbeiten
        No. I haven't so far.
    • Gast

      #7
      It's a very useful message , Marked !

      Kommentar

      • Gast

        #8
        I'm intressted inn a working solution using yr.no to. So if sombody can make a guide to get the informasjon from the xml files inn to loxone, I will be very pleased

        Espen

        Kommentar

        • Gast

          #9
          Hi guys.

          Just found this thread and was curious about using the yr.no website for weather myself. I did struggle a bit to find out how to use the Loxone "regex", but i finally found out how to use it on yr.no.

          URL of virtual http input: http://www.yr.no/sted/<your location>/forecast_hour_by_hour.xml (see the yr.no website for the path for your location)
          Command recognition for e.g. current temperature: \i<tabular>\i\i<temperature\i\ivalue="\i\v
          Command recognition for e.g. current precipitation: \i<tabular>\i\i<precipitation\i\ivalue="\i\v
          Command recognition for e.g. temperature the next hour: \i<tabular>\i\i</time>\i\i<temperature\i\ivalue="\i\v
          Command recognition for e.g. precipitationthe next hour: \i<tabular>\i\i</time>\i\i<precipitation\i\ivalue="\i\v
          Command recognition for e.g. temperature in 2 hours: \i<tabular>\i\i</time>\i\i</time>\i\i<temperature\i\ivalue="\i\v
          Command recognition for e.g. precipitation in 2 hours: \i<tabular>\i\i</time>\i\i</time>\i\i<precipitation\i\ivalue="\i\v

          and so forth. Study the XML to get the details you want. For every </time> you add to the command, the next hour is read. I found that the trick was to use the \ixxx\i a lot. the suggested method of using 'value="\v' did not work for me.

          Happy weathering.

          Finnsen

          Kommentar


          • RadoG
            RadoG kommentierte
            Kommentar bearbeiten
            It works. Thank you very much :-)
        • Gast

          #10
          Hello! This has been working great for several years, but 01.02.2022 YR.NO has changed their API, and I am struggling to re-configure my Loxone to retrieve the weather data.

          As an example I could go by this URL: https://api.met.no/weatherapi/locati...60.10&lon=9.58

          Anyone with a brief tutorial on how to get the Loxone to read for an example: <temperature id="TTT" unit="celsius" value="-0.3"/> ?

          Kommentar

          • EdiB
            Extension Master
            • 30.12.2015
            • 135

            #11
            I've been using YR.NO weather forecast for years and switched to querying with LoxberryXL > MQTT > Loxone some time ago. I use it to make the 1, 2, 3 and 4 hour predictions. If you are using Loxberry and are interested, I can provide you with the php script!

            Kommentar

            • Gast

              #12
              I've considered Loxberry, but if possible I'd prefer to keep the as a simple and clean install with the least number of dependencies. Are there no other work around?

              Kommentar

              • EdiB
                Extension Master
                • 30.12.2015
                • 135

                #13
                If I understand correctly, they switched to JSON format (https://developer.yr.no/doc/guides/g...-forecast-xml/). Your URL still returns an XML. So instead of https://api.met.no/weatherapi/locati...60.10&lon=9.58 you need to use this: https://api.met.no/weatherapi/locationforecast/2.0/compact?lat=60.10&lon=9.58 , then it comes in JSON format which I parse with php. The detection in Loxone for the first temperature should then be:
                \i"data"\i\i"air_temperature":\i\v
                or
                \i"data"\i\i"data"\i\i"air_temperature":\i\v for the second temperature one hour later
                Zuletzt geändert von EdiB; 10.02.2022, 18:51.

                Kommentar

                • Gast

                  #14
                  I finally got my head around this. I resolved by using the following: \i"details":\i\i"air_temperature":\i\v


                  Thank you for all of your hints and help on this one!

                  Kommentar

                  Lädt...