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.
Script - Mimic No Update State
-
Do you have the latest version of the Meta module installed?
-
Looks like it: Meta 2.2.4.
-
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?
-
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"
-
"print(data)" should print out an object, like {"count":0, "average":null, firstValue:PointValueTime@ABCDEF, lastValue:.... }
-
Oh, in that case I don't know where it print outs to. I tried looking around... I have no idea, sorry.
-
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.
-
Here ya go.
PS: I was using Chrome.
-
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'
-
Replacing data.count == 0 with data.length == 0 now works.
Thanks for your help Phil.