• 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

    Meta Point Event Detector Usage

    Scripting general Discussion
    2
    5
    2.8k
    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.
    • M
      mlavelle42
      last edited by

      I created a alphanumeric-data type script to evaluate an operating condition - which works. The problem is triggering the Event Detector. I'm using State Detector but I can't tell what causes it to fire. It seems that the field State should match (character string) one of the meta point script returns (i.e. "Fan Off). I couldn't find a reference to State Detector setup.

      0_1464264745407_Screen Shot 2016-05-26 at 8.11.30 AM.png

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

        You intuition is correct, are you experiencing a problem with getting it to work? Can you make your Meta point settable for the sake of testing your detectors?

        I consulted the code for AlphanumericStateDetectorRT:

        protected boolean stateDetected(PointValueTime newValue) {
                String newAlpha = newValue.getStringValue();
                return StringUtils.equals(newAlpha, vo.getAlphanumericState());
            }
        
        1 Reply Last reply Reply Quote 0
        • M
          mlavelle42
          last edited by

          No sooner did I post this question than I got it too work. Very nice.

          Got another question: Is it possible to insert variables into the string? Something like "Got a problem with sensor - value is $sensorvariablename".

          BTW - who wrote all this code?

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

            Also, is time available as a variable? Or do I have to create it? The concept is to check for Time >= ATimeValue.

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

              By "the string" do you mean the Alias? No, it is not possible. Using state detectors, it doesn't make sense to me to have to do that. Point event detectors are on a per-point basis already, so the data point that it applies to is known. Similarly, for a State detector (but not a regex state detector) the state is unchanging. So, I don't know why you would want to do that. It does make some sense for a Regex state detector, though, but isn't possible at the moment.

              Mango has existed for quite a while, so there have been a few contributors. Of absolute noteworthiness are Matthew Lohbiler, who wrote Mango M2M, and Terry Packer, who is our senior developer. But, if you peruse our opensource Github repositories you may find others, such as myself, who have made contributions. A great many of the modules are written by contributors. Most classes do have an author documented at the top, but this is not always updated to reflect everyone who touched a class.

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