• 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

    How Can I get a specific data in a data point of serial data source

    Mango Automation general Discussion
    2
    14
    2.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.
    • F
      Fabier
      last edited by

      Hello, I can get to specific data now with your help, but when I use point identifier in the data piont, I can't recived data. How can I filter data if my identifier message is: 007000116 in the next message

      ST300STT;007000116;40;312;20180305;18:22:02;c93121;+04.684003;-074.050968;000.000;270.30;10;1;29;12.07;000000;1;0035

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

        Did you modify the regex on the data source to select for that ID and capture group?

        1 Reply Last reply Reply Quote 0
        • F
          Fabier
          last edited by

          This is my configuration in the data source

          0_1520363665614_4be1ccba-d000-4400-a282-8233937c9474-image.png

          I don't modify the regex.

          I have a question. I have differents devices that can conect to my data source to TCP/IP protocol. Do I need a data source to device or can I filter devices in similar data source with point identifier?

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

            Because this is a serial data source, you can only have one serial data source serving one serial transport media. You can parse this data into many points, but you have to use the message regex on the data source to figure out which point to then use the value regex on.

            Currently your point identifier group is 1, which is a capture of nothing ()[^ ]+ so if something else was in the capture group in the message regex, that would have to exactly match the point identifier configured on the point.

            1 Reply Last reply Reply Quote 0
            • F
              Fabier
              last edited by

              I use the message regex in my data point, but, i don't understand the relation between Message regex and point identifier group.

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

                The message regex sees if you have received a message. And, if you have, what is the point identifier (which is configurable in the data point) contained in the message. This is where the regex capture group comes in, and that needs an index to identify which group it is. So, in your message regex the only capture group is index 1, which is () yielding a point identifier of "". Group index 0 is the whole match, otherwise groups are enumerated as they are opened.

                Were something inside the capturing group 1, the (), then that portion of the message would have to exactly match the point identifier of the point whose value regex was to be applied to the message.

                F 1 Reply Last reply Reply Quote 0
                • F
                  Fabier @phildunlap
                  last edited by

                  @phildunlap Thank you. Now I understand for example:

                  My message is:

                  ST300STT;007000116;40;312;20180305;18:22:02;c93121;+04.684003;-074.050968;000.000;270.30;10;1;29;12.07;000000;1;0035

                  in this case I make the configuration of my data source:

                  Message regex: ([0-9A-Z;]{18}).*
                  point identifier group 1

                  Now the configuration of my data point is this:

                  0_1520453737021_13bc2f5e-60e8-4c58-a6a4-74b17aa4fa66-image.png

                  When arrive my message is going to match with my point identifier. That is good. because I can identifier my device and event. Now if I need identifier in a data point only firsts 5 chars how can I do this if in my data source I defined that the point identifier is of 18 chars.

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

                    Now if I need identifier in a data point only firsts 5 chars how can I do this if in my data source I defined that the point identifier is of 18 chars.

                    You can't, that's not how it works. If you define the point identifier to be 18 characters in the message regex, then it must be. If you define it to be a variable length capture group, then whatever is captured must match the point identifier of a data point that is to receive that value exactly.

                    F 1 Reply Last reply Reply Quote 0
                    • F
                      Fabier @phildunlap
                      last edited by

                      @phildunlap Ummm, isn't possible in the message regex created ([A-Z]{18}) ([0-9]{5}).* with value group 2 to in a data point match 18 chars with the group 1 and in other data point match 5 chars with the group 2?

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

                        Perhaps I didn't understand your question. Yes you can write the regex you have there, and yes you are correct about the group numbering. But, because the point identifier group is set on the data source, you can't have one point use group 1 and another use group 2, you have to always capture the point identifier into the same group number.

                        F 1 Reply Last reply Reply Quote 0
                        • F
                          Fabier @phildunlap
                          last edited by

                          @phildunlap I´m sorry by ask a lot. I thought that if I define the group in my data point, my data point go to do match with specific message regex, I mean that if I defined group 1 in my data point "a" it can do match with first expresion () and if I define my data point "b" with group 2, It goes to do match with second expresion (), but now see that I have a concept mistake.

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