• H
    hayden_AUS

    Hi Craig,

    I am not familiar with httpBuilder.
    How does the "message" get updated in the script?

    From what I can see, httpBuilder method uses at least the point, an event detector, and a global script.

    The easier way would have been the original way I tried to get it to work with the Meta
    point getting published when the script changes. (which worked, apart from the delay I needed of 5 minutes)
    That way for the limit value, I could have used another Virtual numeric point, so the limit can be
    easily adjusted on the fly, from a dashboard.

    posted in Mango Automation general Discussion read more
  • H
    hayden_AUS

    On the Meta point, "context event type" is - Update

    The point updating the context is a Virtual point, so I assume is instant.

    Here is the Meta data point:

    {
             "purgePeriod":1,
             "setExtremeLowLimit":-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368,
             "intervalLoggingType":"INSTANT",
             "dataSourceXid":"DS_1467c3b6-808b-4f6f-8fe4-0cfe54292b77",
             "discardHighLimit":179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368,
             "deviceName":"Meta",
             "enabled":true,
             "rollup":"NONE",
             "purgeOverride":false,
             "chartRenderer":{
                "limit":10,
                "type":"TABLE"
             },
             "xid":"DP_8d626457-cc93-4d96-a580-53ecc1463373",
             "eventDetectors":[
             ],
             "textRenderer":{
                "useUnitAsSuffix":false,
                "type":"PLAIN",
                "suffix":""
             },
             "loggingType":"ON_CHANGE",
             "overrideIntervalLoggingSamples":false,
             "defaultCacheSize":1,
             "readPermission":"",
             "setPermission":"",
             "intervalLoggingPeriodType":"MINUTES",
             "intervalLoggingSampleWindowSize":0,
             "tolerance":0,
             "purgeType":"YEARS",
             "plotType":"STEP",
             "intervalLoggingPeriod":1,
             "discardExtremeValues":false,
             "tags":{
             },
             "unit":"",
             "pointLocator":{
                "contextUpdateEvent":"CONTEXT_UPDATE",
                "variableName":"my",
                "executionDelaySeconds":6,
                "dataType":"ALPHANUMERIC",
                "scriptPermissions":[
                ],
                "updateCronPattern":"",
                "script":"if(input1.value >= 28){\n    return \"Redlands Growth room 28 - Temperature HIGH\";\n}\nelse return \"Redlands Growth room 28 - Temperature NORMAL\";",
                "logCount":5,
                "settable":false,
                "logLevel":"NONE",
                "updateEvent":"NONE",
                "context":[
                   {
                      "varName":"input1",
                      "dataPointXid":"DP_32e6bd9b-a5a9-4b98-9b30-6e44dc96a6af",
                      "updateContext":true
                   }
                ],
                "logSize":1
             },
             "discardLowLimit":-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368,
             "setExtremeHighLimit":179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368,
             "name":"Redlands Growth room 28 - Temperature",
             "chartColour":"",
             "preventSetExtremeValues":false,
             "simplifyType":"NONE"
          },
    

    EDIT: This is my test setup:

    • A virtual numeric point

    • An alphanumeric meta point that reads the value of that point, with a script that returns a string depending on the script.

    • The Meta point has an execution delay, and the Meta point WILL NOT change state if the execution delay is over 5 seconds.

    if(input1.value >= 28){
        return "Redlands Growth room 28 - Temperature HIGH";
    }
    else return "Redlands Growth room 28 - Temperature NORMAL";
    

    posted in Mango feedback read more
  • H
    hayden_AUS

    I'm all for simple.

    The fact here is that the publisher works, and sends messages, so the problem is the execution delay on the Meta point does not work above 5 seconds.

    I did come up with a solution:

    • Room temperature point - NUMERIC

    • HIGH temp event detector, with 5 minute Duration (hold off delay)

    • Event handler that sets a Virtual Alphanumeric point - "Room temperature Alarm" - Active "Room temp HIGH", Inactive "Room temp NORMAL"

    • Publisher is HTTP Sender, which publishes the Alphanumeric points value (Text value)

    I think I'll run with this.

    Thanks for the help.

    posted in Mango Automation general Discussion read more
  • H
    hayden_AUS

    Hi IA,

    I have an alphanumeric META point, that will only change state if the execution delay is 5 seconds or under.
    This appears to be a bug.

    Please see this post (EDIT: Go to post 6)
    https://forum.infiniteautomation.com/topic/4781/http-sender-publisher/3

    I need to add an execution delay of 5 minutes.

    Many thanks

    posted in Mango feedback read more
  • H
    hayden_AUS

    Hi Fox, I am not sure what you mean.

    The only other way I worked out would be:

    1. Create a HIGH limit event on the room temperature point, with a duration
    2. Create event handler with the execution delay
    3. Have a virtual point be updated to a 1 or 0 value by the event handler
    4. Have the alphanumeric Meta point follow the virtual point

    Maybe IA could look into this?

    posted in Mango Automation general Discussion read more
  • H
    hayden_AUS

    Tried ALL data, no go...
    The new value is definitely updating on the triggering point. I have the points in a watch list together.

    There is no delay on the point updating the context(triggering), It is a Virtual point that I am just setting to 30 and waiting for the Meta point to go into alarm.

    Tried adjusting the cache, no go...

    Any more ideas?

    posted in Mango Automation general Discussion read more
  • H
    hayden_AUS

    Hi Fox,

    There appears to be an issue with the execution delay on the Meta Data point.

    When I set no delay, the point changes value instantly.
    When I set a delay of 5 seconds, the point takes 5 seconds to change.
    However anything 6 seconds and above, causes the point NOT TO UPDATE.

    This could be a bug?

    {
             "purgePeriod":1,
             "setExtremeLowLimit":-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368,
             "intervalLoggingType":"INSTANT",
             "dataSourceXid":"DS_1467c3b6-808b-4f6f-8fe4-0cfe54292b77",
             "discardHighLimit":179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368,
             "deviceName":"Meta",
             "enabled":true,
             "rollup":"NONE",
             "purgeOverride":false,
             "chartRenderer":{
                "limit":10,
                "type":"TABLE"
             },
             "xid":"DP_8d626457-cc93-4d96-a580-53ecc1463373",
             "eventDetectors":[
             ],
             "textRenderer":{
                "useUnitAsSuffix":false,
                "type":"PLAIN",
                "suffix":""
             },
             "loggingType":"ON_CHANGE",
             "overrideIntervalLoggingSamples":false,
             "defaultCacheSize":1,
             "readPermission":"",
             "setPermission":"",
             "intervalLoggingPeriodType":"MINUTES",
             "intervalLoggingSampleWindowSize":0,
             "tolerance":0,
             "purgeType":"YEARS",
             "plotType":"STEP",
             "intervalLoggingPeriod":1,
             "discardExtremeValues":false,
             "tags":{
             },
             "unit":"",
             "pointLocator":{
                "contextUpdateEvent":"CONTEXT_UPDATE",
                "variableName":"my",
                "executionDelaySeconds":6,
                "dataType":"ALPHANUMERIC",
                "scriptPermissions":[
                ],
                "updateCronPattern":"",
                "script":"if(input1.value >= 28){\n    return \"Redlands Growth room 28 - Temperature HIGH\";\n}\nelse return \"Redlands Growth room 28 - Temperature NORMAL\";",
                "logCount":5,
                "settable":false,
                "logLevel":"NONE",
                "updateEvent":"NONE",
                "context":[
                   {
                      "varName":"input1",
                      "dataPointXid":"DP_32e6bd9b-a5a9-4b98-9b30-6e44dc96a6af",
                      "updateContext":true
                   }
                ],
                "logSize":1
             },
             "discardLowLimit":-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368,
             "setExtremeHighLimit":179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368,
             "name":"Redlands Growth room 28 - Temperature",
             "chartColour":"",
             "preventSetExtremeValues":false,
             "simplifyType":"NONE"
          },
    

    posted in Mango Automation general Discussion read more
  • H
    hayden_AUS

    Thanks Fox,

    I created a new Alphanumeric Meta point.
    I'm actually using this to send an over temp alarm for a growth room.

    if(input1.value >= 28){
        return "Redlands Growth room 28 - Temperature HIGH";
    }
    else return "Redlands Growth room 28 - Temperature NORMAL";
    

    The "input1" is the room temperature.
    I set an execution delay also to stop sending multiple texts when hovering around
    the alarm set point.

    Thanks again

    posted in Mango Automation general Discussion read more
  • H
    hayden_AUS

    If some from IA could answer one question:

    In the HTTP sender data point, I am using a Binary data point, but have the Text rendering in the point set to:
    "Watering is OFF(for false) and Watering is ON(for true).
    But I am still just getting "true or false" in the message, not Watering ON or OFF.

    I need the rendered text to be sent in the message.

    posted in Mango Automation general Discussion read more
  • H
    hayden_AUS

    OK so I worked this out.

    Some parameters can go in the Static Parameters section of HTTP sender,
    and the point value parameter goes in the Data Points tab.

    So for the ClickSend service here in Australia to send an SMS:
    GET - https://api-mapper.clicksend.com/http/v2/send.php?method=http&username=xxxx&key=xxxx&to=xxxx,yyyy,zzzz&message=xxxx

    So in Mango publisher:

    URL= https://api-mapper.clicksend.com/http/v2/send.php

    Static parameters are:
    method=http
    username=xxxx
    key=xxxx
    to=xxxx,yyyy,zzzz

    Data point parameter is:
    message

    posted in Mango Automation general Discussion read more