• Products
    • Isadora
    • Get It
    • ADD-ONS
    • IzzyCast
    • Get It
  • Forum
  • Help
  • Werkstatt
  • Newsletter
  • Impressum
  • Dsgvo
  • Press
  • Isadora
  • Get It
  • ADD-ONS
  • IzzyCast
  • Get It
  • Press
  • Dsgvo
  • Impressum

Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags

    [ANSWERED] WeatherAPI.com Integration

    How To... ?
    4
    4
    609
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      CJsass 0 last edited by Woland

      Trying to get weather data into Isadora. How can I get the API info into Isadora. I did the API tutorial from https://www.dusxproductions.co... and that worked great but I don't know how to move to get values such as 

      "condition": { "text": "Partly cloudy" from the weather.api into the msg from the TCP In Watcher - Text in Isadora. Want to have weather data drive the visuals to trigger rain and clouds, etc.

      bonemap DusX clafarge 3 Replies Last reply Reply Quote 0
      • bonemap
        bonemap Izzy Guru @CJsass 0 last edited by bonemap

        @cjsass-0 said:

        weather.api

         Hi,

        I had a quick look at the specifications for WeatherAPI.com. However, it requires a subscription to access the API. Instead I have accessed the free Archive.org API to demonstrate the use of the Get URL Text and JSON Parser. These are significantly more straight forward when working with API data in my experience.

        archive.org API call

        search-api-archive.org.izz

        Best Wishes,
        Russell 

        http://bonemap.com | Australia
        Izzy STD 4.2 | USB 3.6 | + Beta
        MBP 16” 2019 2.4 GHz Intel i9 64GB AMD Radeon Pro 5500 8 GB 4TB SSD | 14.5 Sonoma
        Mac Studio 2023 M2 Ultra 128GB | OSX 15.3 Sequoia
        A range of deployable older Macs

        1 Reply Last reply Reply Quote 1
        • DusX
          DusX Tech Staff @CJsass 0 last edited by

          @cjsass-0 said:

          and that worked great

           Does this mean you were able to connect to the Weather API and receive a return message? If you were, then it would be very helpful to see the full returned text. If it is JSON, the JSON actors should allow you to access the different elements, if not, you may need to parse the text with a Text Parser, or JavaScript.

          Are you using the "msg:string={00-FF}" message parsing string?


          Troikatronix Technical Support

          • New Support Ticket Link: https://support.troikatronix.com/support/tickets/new
          • My Add-ons: https://troikatronix.com/add-ons/?u=dusx
          • Profession Services: https://support.troikatronix.com/support/solutions/articles/13000109444-professional-services

          Running: Win 11 64bit, i7, M.2 PCIe SSD's, 32gb DDR4, nVidia GTX 4070 | located in Ontario Canada.

          1 Reply Last reply Reply Quote 0
          • clafarge
            clafarge Beta Tester @CJsass 0 last edited by

            @cjsass-0

            I tend to pass the response to a JavaScript actor so I can manipulate it while plucking out the values I care about.

            The first bit of business is to get the response into JSON object:

            const theContents = JSON.parse(arguments[0]);

            All done! Now you can use keys or iterate through arrays from the response.

            let theCondition = theContents.condition.text; // assuming your sample is from the root

            I do not know if there is an efficiency cost associated, but in my use-case, I need JavaScript to do some "thinking" anyway.

            I hope this helps!

            Chad LaFarge | Isadora 3.2.6, Win 10 64bit, i9-10900KF @ 3.70GHz, 64.0 GB RAM, NVIDIA GeForce RTX 3080 10 GB VRAM

            1 Reply Last reply Reply Quote 0
            • First post
              Last post