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

  • Hello,

    We are just getting started with pop3 data sources, and initial testing is turning into a nightmare.

    First we tried setting it up with a Gmail account, but we were getting this message:

    'Monitoreo POP': Couldn't connect to host, port: pop.gmail.com, 110; timeout -1
    

    , so I tried with an Outlook account.

    As far as I understand, both Outlook and Gmail require SSL, and both use port 995, not 110. I would expect that, if Gmail didn't let me in, Outlook wouldn't either, but the message I'm getting is completely different now and doesn't really tell me what's going on.

    This is the event I'm getting now:

    'Monitoreo POP': Command is not valid in this state.
    

    Which command? Which state?

    This is my data source:

    {
       "dataSources":[
          {
             "xid":"Monitoreo_POP3_1",
             "name":"Monitoreo POP",
             "enabled":true,
             "type":"POP3",
             "alarmLevels":{
                "INBOX_EXCEPTION":"URGENT",
                "MESSAGE_READ_EXCEPTION":"URGENT",
                "POLL_ABORTED":"URGENT",
                "PARSE_EXCEPTION":"URGENT"
             },
             "purgeType":"YEARS",
             "updatePeriods":5,
             "updatePeriodType":"MINUTES",
             "password":"********",
             "pop3Server":"outlook.office365.com",
             "username":"?????@outlook.com",
             "quantize":false,
             "useCron":false,
             "editPermission":"superadmin",
             "purgeOverride":false,
             "purgePeriod":1
          }
       ],
       "dataPoints":[
          {
             "xid":"Monitoreo_POP3_1_Showroom_BOSS_LowSH",
             "name":"Low SH en Showroom",
             "enabled":true,
             "loggingType":"ON_CHANGE",
             "intervalLoggingPeriodType":"MINUTES",
             "intervalLoggingType":"INSTANT",
             "purgeType":"YEARS",
             "pointLocator":{
                "dataType":"BINARY",
                "findInSubject":false,
                "ignoreIfMissing":true,
                "timeFormat":"",
                "timeRegex":"",
                "useReceivedTime":true,
                "valueFormat":"END -",
                "valueRegex":"(Alarma LowSH)"
             },
             "eventDetectors":[
             ],
             "plotType":"STEP",
             "rollup":"NONE",
             "unit":"",
             "simplifyType":"NONE",
             "chartColour":"#57138d",
             "chartRenderer":{
                "type":"TABLE",
                "limit":10
             },
             "dataSourceXid":"Monitoreo_POP3_1",
             "defaultCacheSize":1,
             "deviceName":"Monitoreo POP",
             "discardExtremeValues":false,
             "discardHighLimit":1.7976931348623157E308,
             "discardLowLimit":-1.7976931348623157E308,
             "intervalLoggingPeriod":1,
             "intervalLoggingSampleWindowSize":0,
             "overrideIntervalLoggingSamples":false,
             "preventSetExtremeValues":false,
             "purgeOverride":false,
             "purgePeriod":1,
             "readPermission":"user",
             "setExtremeHighLimit":1.7976931348623157E308,
             "setExtremeLowLimit":-1.7976931348623157E308,
             "setPermission":"superadmin",
             "tags":{
             },
             "textRenderer":{
                "type":"BINARY",
                "oneColour":"#fe0000",
                "oneLabel":"one",
                "zeroColour":"#0000ff",
                "zeroLabel":"zero"
             },
             "tolerance":0.0
          }
       ]
    }
    

    There's a doubt with that, because when I'm configuring the data source in the 3.6 UI, there is no "valueFormat" text box, but in the exported JSON the "valueFormat" property has the string that I input into "Binary 0 Value". Is this the expected behaviour?

    So far, as you can see I only have one data point, and I'm not sure if I'm doing the right thing with the "Binary 0 value", do I need to put it in parenthesis as well as if I was trying to group it?

    This is the only error in the console, but I'm not sure it's related:

    13:45:41.181 Possibly unhandled rejection: {"data":null,"status":-1,"config":{"method":"GET","transformRequest":[null],"jsonpCallbackParam":"callback","timeout":{},"url":"/rest/v1/events","params":{},"headers":{"Accept":"application/json, text/plain, */*","X-Requested-With":"XMLHttpRequest","X-XSRF-TOKEN":"207c27ad-f014-41a8-bec3-44ba38a2ecd8"},"cached":false},"statusText":"","xhrStatus":"abort","mangoStatusText":"Request aborted","mangoStatusTextShort":"Request aborted","resource":[]} mangoUi~ngMango~ngMangoServices.js:78:78706
        o http://192.168.100.33:8088/ui/mangoUi~ngMango~ngMangoServices.js?v=d1c698ddb6fe71a70811:78
        c http://192.168.100.33:8088/ui/mangoUi~ngMango~ngMangoServices.js?v=d1c698ddb6fe71a70811:72
        o http://192.168.100.33:8088/ui/mangoUi~ngMango~ngMangoServices.js?v=d1c698ddb6fe71a70811:72
        c http://192.168.100.33:8088/ui/mangoUi~ngMango~ngMangoServices.js?v=d1c698ddb6fe71a70811:78
        $digest http://192.168.100.33:8088/ui/mangoUi~ngMango~ngMangoServices.js?v=d1c698ddb6fe71a70811:78
        timeout http://192.168.100.33:8088/ui/mangoUi~ngMango.js?v=4a67ee5ca81497c4ea25:77
        c http://192.168.100.33:8088/ui/mangoUi~ngMango~ngMangoServices.js?v=d1c698ddb6fe71a70811:78
        completeTask http://192.168.100.33:8088/ui/mangoUi~ngMango~ngMangoServices.js?v=d1c698ddb6fe71a70811:78
        r http://192.168.100.33:8088/ui/mangoUi~ngMango~ngMangoServices.js?v=d1c698ddb6fe71a70811:78
    

    Just as a note, I did configure both Gmail and Outlook accounts to authorize POP access.

    Do you think SSL / port # is the problem or what else could be wrong?

    Last doubt: what is the RegEx syntax flavor used by Mango? Just to be sure.

    Thanks in advance! :)


  • Hi jflores13, lots of questions!

    Do you think SSL / port # is the problem or what else could be wrong?

    That definitely seems like it would be part of the problem. I'm not sure why the POP3 data source didn't expose the port as an option, it's certainly easy to do, so I have opened a git issue about this in the repository the module is in. Somewhat impassable issue until that is configurable.

    Last doubt: what is the RegEx syntax flavor used by Mango?

    When in the Java code (i.e. data sources that don't have scripts) https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html

    When in scripts, JavaScript regex syntax.

    Which command? Which state?

    This message is coming from javax.mail . I'm guessing Outlook may have accepted the connection, but perhaps not the access, so there's some exception in trying to access the inbox, i'm not sure. Regardless if 995 is the port I would expect issues.

    There's a doubt with that, because when I'm configuring the data source in the 3.6 UI, there is no "valueFormat" text box, but in the exported JSON the "valueFormat" property has the string that I input into "Binary 0 Value". Is this the expected behaviour?

    Yes, They are stored in the same property on the point locator because they can be. If a numeric point, the value format is interpreted as a java.text.DecimalFormat, and if binary it is simply string matched with what is captured in the value regex (capture group 1)

    This is the only error in the console, but I'm not sure it's related:

    I don't think it is, but I appreciate you checking the console!


  • Hey, Phil!
    I know, many thanks for your lots of answers.

    Yes, They are stored in the same property on the point locator because they can be. If a numeric point, the value format is interpreted as a java.text.DecimalFormat, and if binary it is simply string matched with what is captured in the value regex (capture group 1)

    Perfect! I figured that was the case, just wanted to make sure. I had gotten the last part wrong though, so thanks for explaining that!

    That definitely seems like it would be part of the problem. I'm not sure why the POP3 data source didn't expose the port as an option, it's certainly easy to do, so I have opened a git issue about this in the repository the module is in. Somewhat impassable issue until that is configurable

    Alright then, I'll be waiting.

    Thanks again! Greetings.