• Recent
    • Tags
    • Popular
    • Register
    • Login

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    Admin template- Adding something similar to ma-ui-user-datatime

    Scheduled Pinned Locked Moved Dashboard Designer & Custom AngularJS Pages
    4 Posts 3 Posters 1.2k Views 3 Watching
    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.
    • W Offline
      Wingnut2.0
      last edited by

      Hello,

      I have a 2 part question -

      1. How would I go about displaying weather (OAT) information in the admin template similar to the existing date/time display? This would display values returned from API using a predefined location.

      2. When there are many remote locations, could the device be "tagged" with a location that would drive the display to show the local conditions of the device being viewed?

      Thank you.

      1 Reply Last reply Reply Quote 0
      • Jared WiltshireJ Offline
        Jared Wiltshire
        last edited by Jared Wiltshire

        @Wingnut2-0
        You can put any HTML that you wish into the adminTemplate. There are many weather websites which provide HTML snippets which you can paste into your pages. Or you could write your own AngularJS component to get the data from the API and present it however you like.

        Another approach to this would be to setup a Mango HTTP Retriever data source which would fetch values from a weather API into a Mango data point. You could then use the standard <ma-point-value> component to display a temperature on the page for example.

        Regarding #2 you could store the location in the JSON store.

        P.S. I don't know what OAT is.

        Developer at Radix IoT

        1 Reply Last reply Reply Quote 0
        • MattFoxM Offline
          MattFox
          last edited by

          I've written something basic that displays the forecast from wUnderground (Weather Underground).

          1. Are you calling the API? if so, I don't see why you cannot utilise the ma-date elements combined with the ng-change to fire a function and perform a $http GET with the date parameters to collect your data. My only concern is API calls with this. one - it can cost a fair bit, two - can be some delay as you wait for the data to come through, parse said data and display on the screen in the format you like.

          2. If you have devices that are linked to specific locations which will not change, why not use a virtual datasource and map them accordingly to the respective device. Simply then map that back through in code to reveal the corresponding data for that device location. Or use Jared's JSON store suggestion.

          OAT? Oat mountain?
          Hope this helps somewhat....
          3) Good Luck.

          Do not follow where the path may lead; go instead where there is no path.
          And leave a trail - Muriel Strode

          1 Reply Last reply Reply Quote 0
          • Jared WiltshireJ Offline
            Jared Wiltshire
            last edited by

            Here's another thread where I helped someone get a AngularJS weather widget working -
            https://forum.infiniteautomation.com/topic/2844/how-to-use-json-receiver-data-point/2

            Developer at Radix IoT

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