• 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

    Script - Mimic No Update State

    Scripting general Discussion
    2
    14
    3.9k
    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.
    • phildunlapP
      phildunlap
      last edited by

      Do you have the latest version of the Meta module installed?

      1 Reply Last reply Reply Quote 0
      • M
        mihairosu
        last edited by

        Looks like it: Meta 2.2.4.

        1 Reply Last reply Reply Quote 0
        • phildunlapP
          phildunlap
          last edited by

          Hmm. You could try adding a print(data); after the first line, see what the statistics object looks like. Is the boiler on interval logging?

          1 Reply Last reply Reply Quote 0
          • M
            mihairosu
            last edited by mihairosu

            The point I am monitoring has a logging type: "When point value changes".

            I have set up a No Update event notification, on that same point, to email when triggered, and that does work.

            The data prints out as "0.0"

            1 Reply Last reply Reply Quote 0
            • phildunlapP
              phildunlap
              last edited by

              "print(data)" should print out an object, like {"count":0, "average":null, firstValue:PointValueTime@ABCDEF, lastValue:.... }

              1 Reply Last reply Reply Quote 0
              • M
                mihairosu
                last edited by mihairosu

                Oh, in that case I don't know where it print outs to. I tried looking around... I have no idea, sorry.

                1 Reply Last reply Reply Quote 0
                • phildunlapP
                  phildunlap
                  last edited by phildunlap

                  It would be right around where you are looking, above the return value. I would think the 0.0 you're seeing is the return value. Some of them have issues with the printstream getting eaten... you could try another browser perhaps. Or, you can just return data.toString() which would work to get its value returned in the error message saying it cannot be cast to a numeric.

                  1 Reply Last reply Reply Quote 0
                  • M
                    mihairosu
                    last edited by mihairosu

                    Here ya go.

                    0_1476827250560_updateprint.png

                    PS: I was using Chrome.

                    1 Reply Last reply Reply Quote 0
                    • phildunlapP
                      phildunlap
                      last edited by phildunlap

                      It looks like it's still reading values! Also I got my expectation wrong, that's just a list of PointValueTimes! I was thinking about the structure of statistics objects, like one would get from p.past()

                      i betcha my mistake is testing 'data.count == 0' instead of 'data.length == 0'

                      1 Reply Last reply Reply Quote 0
                      • M
                        mihairosu
                        last edited by

                        Replacing data.count == 0 with data.length == 0 now works.

                        Thanks for your help Phil.

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