Save
Saving
  • R Rodrigo

    Hi @mattfox are you available for a quick chat?

    posted in How-To read more
  • R Rodrigo

    :)
    Thanks, my background is actually electromechanical, so this is like advance chinese translated to esperanto hahaha
    I miss DGLux, the combination with Mango was very powerful, at least for my not programmer capacity.

    posted in How-To read more
  • R Rodrigo

    Hi Matt,

    With your help and also a little local help (my brother) I have managed to do what I wanted.
    One change I did was to move the trigger from the virtual data source to the scripted data source.
    Virtual Data Source + Points

    {
      "dataSources":[
        {
          "xid":"DS_EdificioA",
          "name":"Edificio A",
          "enabled":true,
          "type":"VIRTUAL",
          "alarmLevels":{
            "POLL_ABORTED":"URGENT"
          },
          "purgeType":"YEARS",
          "updatePeriods":10,
          "updatePeriodType":"SECONDS",
          "polling":true,
          "quantize":true,
          "useCron":false,
          "editPermission":"",
          "purgeOverride":false,
          "purgePeriod":1
        }
      ],
      "dataPoints":[
        {
          "xid":"DP_Equipo01A",
          "name":"ON \/ OFF (0 = ON - 1 = OFF )",
          "enabled":true,
          "loggingType":"ON_CHANGE",
          "intervalLoggingPeriodType":"MINUTES",
          "intervalLoggingType":"INSTANT",
          "purgeType":"YEARS",
          "pointLocator":{
            "dataType":"BINARY",
            "changeType":{
              "type":"NO_CHANGE",
              "startValue":"true"
            },
            "settable":true
          },
          "eventDetectors":[
          ],
          "plotType":"STEP",
          "rollup":"NONE",
          "unit":"",
          "simplifyType":"NONE",
          "chartColour":"",
          "chartRenderer":{
            "type":"TABLE",
            "limit":10
          },
          "dataSourceXid":"DS_EdificioA",
          "defaultCacheSize":1,
          "deviceName":"Equipo 01 A",
          "discardExtremeValues":false,
          "discardHighLimit":1.7976931348623157E308,
          "discardLowLimit":-1.7976931348623157E308,
          "intervalLoggingPeriod":1,
          "intervalLoggingSampleWindowSize":0,
          "overrideIntervalLoggingSamples":false,
          "preventSetExtremeValues":false,
          "purgeOverride":false,
          "purgePeriod":1,
          "readPermission":"",
          "setExtremeHighLimit":1.7976931348623157E308,
          "setExtremeLowLimit":-1.7976931348623157E308,
          "setPermission":"",
          "tags":{
          },
          "textRenderer":{
            "type":"BINARY",
            "oneColour":"rgb(255, 51, 51)",
            "oneLabel":"OFF",
            "zeroColour":"rgb(102, 255, 102)",
            "zeroLabel":"ON"
          },
          "tolerance":0.0
        },
        {
          "xid":"DP_Equipo02A",
          "name":"ON \/ OFF (0 = ON - 1 = OFF )",
          "enabled":true,
          "loggingType":"ON_CHANGE",
          "intervalLoggingPeriodType":"MINUTES",
          "intervalLoggingType":"INSTANT",
          "purgeType":"YEARS",
          "pointLocator":{
            "dataType":"BINARY",
            "changeType":{
              "type":"NO_CHANGE",
              "startValue":"true"
            },
            "settable":true
          },
          "eventDetectors":[
          ],
          "plotType":"STEP",
          "rollup":"NONE",
          "unit":"",
          "simplifyType":"NONE",
          "chartColour":"",
          "chartRenderer":{
            "type":"TABLE",
            "limit":10
          },
          "dataSourceXid":"DS_EdificioA",
          "defaultCacheSize":1,
          "deviceName":"Equipo 02 A",
          "discardExtremeValues":false,
          "discardHighLimit":1.7976931348623157E308,
          "discardLowLimit":-1.7976931348623157E308,
          "intervalLoggingPeriod":15,
          "intervalLoggingSampleWindowSize":0,
          "overrideIntervalLoggingSamples":false,
          "preventSetExtremeValues":false,
          "purgeOverride":false,
          "purgePeriod":1,
          "readPermission":"",
          "setExtremeHighLimit":1.7976931348623157E308,
          "setExtremeLowLimit":-1.7976931348623157E308,
          "setPermission":"",
          "tags":{
          },
          "textRenderer":{
            "type":"BINARY",
            "oneColour":"rgb(255, 51, 51)",
            "oneLabel":"OFF",
            "zeroColour":"rgb(102, 255, 102)",
            "zeroLabel":"ON"
          },
          "tolerance":0.0
        },
        {
          "xid":"DP_Equipo03A",
          "name":"ON \/ OFF (0 = ON - 1 = OFF )",
          "enabled":true,
          "loggingType":"ON_CHANGE",
          "intervalLoggingPeriodType":"MINUTES",
          "intervalLoggingType":"INSTANT",
          "purgeType":"YEARS",
          "pointLocator":{
            "dataType":"BINARY",
            "changeType":{
              "type":"NO_CHANGE",
              "startValue":"true"
            },
            "settable":true
          },
          "eventDetectors":[
          ],
          "plotType":"STEP",
          "rollup":"NONE",
          "unit":"",
          "simplifyType":"NONE",
          "chartColour":"",
          "chartRenderer":{
            "type":"TABLE",
            "limit":10
          },
          "dataSourceXid":"DS_EdificioA",
          "defaultCacheSize":1,
          "deviceName":"Equipo 03 A",
          "discardExtremeValues":false,
          "discardHighLimit":1.7976931348623157E308,
          "discardLowLimit":-1.7976931348623157E308,
          "intervalLoggingPeriod":15,
          "intervalLoggingSampleWindowSize":0,
          "overrideIntervalLoggingSamples":false,
          "preventSetExtremeValues":false,
          "purgeOverride":false,
          "purgePeriod":1,
          "readPermission":"",
          "setExtremeHighLimit":1.7976931348623157E308,
          "setExtremeLowLimit":-1.7976931348623157E308,
          "setPermission":"",
          "tags":{
          },
          "textRenderer":{
            "type":"BINARY",
            "oneColour":"rgb(255, 51, 51)",
            "oneLabel":"OFF",
            "zeroColour":"rgb(102, 255, 102)",
            "zeroLabel":"ON"
          },
          "tolerance":0.0
        },
        {
          "xid":"DP_Equipo04A",
          "name":"ON \/ OFF (0 = ON - 1 = OFF )",
          "enabled":true,
          "loggingType":"ON_CHANGE",
          "intervalLoggingPeriodType":"MINUTES",
          "intervalLoggingType":"INSTANT",
          "purgeType":"YEARS",
          "pointLocator":{
            "dataType":"BINARY",
            "changeType":{
              "type":"NO_CHANGE",
              "startValue":"true"
            },
            "settable":true
          },
          "eventDetectors":[
          ],
          "plotType":"STEP",
          "rollup":"NONE",
          "unit":"",
          "simplifyType":"NONE",
          "chartColour":"",
          "chartRenderer":{
            "type":"TABLE",
            "limit":10
          },
          "dataSourceXid":"DS_EdificioA",
          "defaultCacheSize":1,
          "deviceName":"Equipo 04 A",
          "discardExtremeValues":false,
          "discardHighLimit":1.7976931348623157E308,
          "discardLowLimit":-1.7976931348623157E308,
          "intervalLoggingPeriod":15,
          "intervalLoggingSampleWindowSize":0,
          "overrideIntervalLoggingSamples":false,
          "preventSetExtremeValues":false,
          "purgeOverride":false,
          "purgePeriod":1,
          "readPermission":"",
          "setExtremeHighLimit":1.7976931348623157E308,
          "setExtremeLowLimit":-1.7976931348623157E308,
          "setPermission":"",
          "tags":{
          },
          "textRenderer":{
            "type":"BINARY",
            "oneColour":"rgb(255, 51, 51)",
            "oneLabel":"OFF",
            "zeroColour":"rgb(102, 255, 102)",
            "zeroLabel":"ON"
          },
          "tolerance":0.0
        },
        {
          "xid":"DP_Equipo05A",
          "name":"ON \/ OFF (0 = ON - 1 = OFF )",
          "enabled":true,
          "loggingType":"ON_CHANGE",
          "intervalLoggingPeriodType":"MINUTES",
          "intervalLoggingType":"INSTANT",
          "purgeType":"YEARS",
          "pointLocator":{
            "dataType":"BINARY",
            "changeType":{
              "type":"NO_CHANGE",
              "startValue":"true"
            },
            "settable":true
          },
          "eventDetectors":[
          ],
          "plotType":"STEP",
          "rollup":"NONE",
          "unit":"",
          "simplifyType":"NONE",
          "chartColour":"",
          "chartRenderer":{
            "type":"TABLE",
            "limit":10
          },
          "dataSourceXid":"DS_EdificioA",
          "defaultCacheSize":1,
          "deviceName":"Equipo 05 A",
          "discardExtremeValues":false,
          "discardHighLimit":1.7976931348623157E308,
          "discardLowLimit":-1.7976931348623157E308,
          "intervalLoggingPeriod":15,
          "intervalLoggingSampleWindowSize":0,
          "overrideIntervalLoggingSamples":false,
          "preventSetExtremeValues":false,
          "purgeOverride":false,
          "purgePeriod":1,
          "readPermission":"",
          "setExtremeHighLimit":1.7976931348623157E308,
          "setExtremeLowLimit":-1.7976931348623157E308,
          "setPermission":"",
          "tags":{
          },
          "textRenderer":{
            "type":"BINARY",
            "oneColour":"rgb(255, 51, 51)",
            "oneLabel":"OFF",
            "zeroColour":"rgb(102, 255, 102)",
            "zeroLabel":"ON"
          },
          "tolerance":0.0
        }
      ]
    }
    

    Scritped Data Source with Trigger Point

    {
      "dataSources":[
        {
          "xid":"DS_ScriptEdificioA",
          "name":"Script Edificio A",
          "enabled":true,
          "type":"SCRIPTING",
          "alarmLevels":{
            "SCRIPT_ERROR":"DO_NOT_LOG",
            "CONTEXT_POINT_DISABLED":"DO_NOT_LOG",
            "DATA_TYPE_ERROR":"DO_NOT_LOG",
            "POLL_ABORTED":"DO_NOT_LOG",
            "LOG_ERROR":"DO_NOT_LOG"
          },
          "purgeType":"YEARS",
          "updatePeriods":5,
          "updatePeriodType":"SECONDS",
          "updateEvent":"UPDATE",
          "context":[
            {
              "varName":"pt01",
              "dataPointXid":"DP_Equipo01A",
              "updateContext":false
            },
            {
              "varName":"pt02",
              "dataPointXid":"DP_Equipo02A",
              "updateContext":false
            },
            {
              "varName":"pt03",
              "dataPointXid":"DP_Equipo03A",
              "updateContext":false
            },
            {
              "varName":"pt04",
              "dataPointXid":"DP_Equipo04A",
              "updateContext":false
            },
            {
              "varName":"pt05",
              "dataPointXid":"DP_Equipo05A",
              "updateContext":false
            }
          ],
          "logLevel":"NONE",
          "scriptPermissions":[
            "superadmin"
          ],
          "polling":false,
          "executionDelaySeconds":0,
          "historicalSetting":false,
          "logCount":5,
          "logSize":1.0,
          "script":"\/\/First: Get triggerA data.\r\nvar triggerPoint = triggerA.getDataPointWrapper();\r\n\r\n\/\/Second: For each point in CONTEXT_POINTS\r\n\/\/For example: Equipo 01 A, Equipo 02 A...\r\nfor (var contextPoint in CONTEXT_POINTS) {\r\n    \r\n    \/\/Third: Get the data\/status of each point.\r\n    \/\/For example: Equipo 01 A data.\r\n    var currentPoint = this[contextPoint].getDataPointWrapper();\r\n   \r\n    var triggerRuntimeValue = triggerPoint.runtime.value;\r\n    \r\n    if(currentPoint.xid === triggerPoint.xid) {\r\n        \/\/Considering that triggerA belongs to CONTEXT_POINTS.\r\n        \/\/We have to skip this one to avoid an infinite loop.\r\n        continue;\r\n        \r\n    } else {\r\n        \r\n        if(triggerRuntimeValue === true) {\r\n            currentPoint.runtime.set( false );\r\n            \r\n        } else if (triggerRuntimeValue === false) {\r\n            currentPoint.runtime.set( true );\r\n        }\r\n    }\r\n }",
          "quantize":true,
          "useCron":false,
          "editPermission":"superadmin",
          "purgeOverride":false,
          "purgePeriod":1
        }
      ],
      "dataPoints":[
        {
          "xid":"DP_scriptingEdificioA",
          "name":"Trigger Edificio A",
          "enabled":true,
          "loggingType":"ON_CHANGE",
          "intervalLoggingPeriodType":"MINUTES",
          "intervalLoggingType":"INSTANT",
          "purgeType":"YEARS",
          "pointLocator":{
            "dataType":"BINARY",
            "contextUpdate":true,
            "settable":true,
            "varName":"triggerA"
          },
          "eventDetectors":[
          ],
          "plotType":"STEP",
          "rollup":"NONE",
          "unit":"",
          "simplifyType":"NONE",
          "chartColour":"",
          "chartRenderer":{
            "type":"TABLE",
            "limit":10
          },
          "dataSourceXid":"DS_ScriptEdificioA",
          "defaultCacheSize":1,
          "deviceName":"Script Edificio A (Trigger)",
          "discardExtremeValues":false,
          "discardHighLimit":1.7976931348623157E308,
          "discardLowLimit":-1.7976931348623157E308,
          "intervalLoggingPeriod":1,
          "intervalLoggingSampleWindowSize":0,
          "overrideIntervalLoggingSamples":false,
          "preventSetExtremeValues":false,
          "purgeOverride":false,
          "purgePeriod":1,
          "readPermission":"",
          "setExtremeHighLimit":1.7976931348623157E308,
          "setExtremeLowLimit":-1.7976931348623157E308,
          "setPermission":"",
          "tags":{
          },
          "textRenderer":{
            "type":"BINARY",
            "oneColour":"rgb(102, 255, 102)",
            "oneLabel":"ON",
            "zeroColour":"rgb(255, 51, 51)",
            "zeroLabel":"OFF"
          },
          "tolerance":0.0
        }
      ]
    }
    

    Worked great!
    I wanted to thank you again!
    Best,
    Rodrigo

    posted in How-To read more
  • R Rodrigo

    Thanks Matt!

    Best,
    Rodrigo

    posted in User help read more
  • R Rodrigo

    Thank a lot Matt! I will be trying it this week and see how it goes.
    I really appreciate your help.

    Best,
    Rodrigo

    posted in How-To read more
  • R Rodrigo

    Hi guys,

    I am creating a set point event handler to use with the advanced scheduler, following this video

    In the set point settings of the Event Handler there's a field I can not quite understand how to use. the "Target Point"
    If the goal is to set several data points, one loads them in the External context points, and set their keys to use in the active and inactive actions scripts.
    Now, the target point gives me the option of every point I have in the system and does not allows to leave it blank.
    What to put there?
    Screenshot_1.png
    Thanks,
    Best,
    Rodrigo

    posted in User help read more
  • R Rodrigo

    You are the best!

    posted in How-To read more
  • R Rodrigo

    @mattfox
    Really! Awesome, do not worry about the time, here is 19:21 (March 5) now.
    Paraguayan time.
    I could read it later tonight or even tomorrow and try to apply it.

    Thanks a lot!

    posted in How-To read more
  • R Rodrigo

    thanks Matt, but I am not able to understand how to make it work :(

    posted in How-To read more
  • R Rodrigo

    Hi Matt,

    You are alway ready to help! Thanks for that.
    I am not bening able to understand how to do this, I have created the Scripting Data Source and added to it, External Context Points (from other Data Sources), this points are the ones that turn devices ON or OFF. Like this
    Screenshot_1.png

    Then, I created the Binary data point with this properties
    Screenshot_2.png
    Screenshot_3.png

    Would you be so kind of expanding your previous reply a little more with this data?

    Thanks in advance.
    Best,
    Rodrigo

    posted in How-To read more