• C
    cuihe

    @craigweb thank you first!
    I don't know if what I'm offering is what you want.
    here is "dashboard code":

    <ma-point-value id="e76d6d6c-45f1-440c-90f3-c446aa6c87b6" enable-popup="hide" style="position: absolute; left: 399px; top: 75px; width: 25px; height: 25px;" point-xid="DP_c6eebfd0-d128-4ea2-8bf1-77f7cf355edd"></ma-point-value>
    <ma-switch id="078c0795-8eba-4cc1-9166-f62c62de3af6" style="position: absolute; left: 394px; top: 220px; width: 50px; height: 50px; background-color: rgb(0, 46, 92);" point-xid="DP_da02f5a8-afc1-4ecb-ba8c-403ffe6345dd"></ma-switch>
    

    here is dataSource-dataPoint(SET_LIGHT):
    (also, I use mango-publisher to publish this. In this way I control my light)
    (<ma-switch> Connect with this)

    {
       "dataPoints":[
          {
             "xid":"DP_da02f5a8-afc1-4ecb-ba8c-403ffe6345dd",
             "name":"Light01_print",
             "enabled":true,
             "loggingType":"ON_CHANGE",
             "intervalLoggingPeriodType":"MINUTES",
             "intervalLoggingType":"INSTANT",
             "purgeType":"YEARS",
             "pointLocator":{
                "dataType":"BINARY",
                "changeType":{
                   "type":"NO_CHANGE",
                   "startValue":"0"
                },
                "settable":true
             },
             "eventDetectors":[
             ],
             "plotType":"STEP",
             "rollup":"NONE",
             "unit":"",
             "templateXid":"Light",
             "simplifyType":"NONE",
             "chartColour":"",
             "chartRenderer":{
                "type":"TABLE",
                "limit":10
             },
             "dataSourceXid":"DS_afafb004-8328-49e6-8bbb-1e5520c377d8",
             "defaultCacheSize":1,
             "deviceName":"TEST2",
             "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":"#99ff99",
                "oneLabel":"",
                "zeroColour":"#c0c0ee",
                "zeroLabel":""
             },
             "tolerance":0.0
          }
       ]
    }
    

    here is dataSource-dataPoint(GET_LIGHT):
    My light send HTTP message to Mango.

    {
       "dataPoints":[
          {
             "xid":"DP_c6eebfd0-d128-4ea2-8bf1-77f7cf355edd",
             "name":"light01",
             "enabled":true,
             "loggingType":"ON_CHANGE",
             "intervalLoggingPeriodType":"MINUTES",
             "intervalLoggingType":"INSTANT",
             "purgeType":"YEARS",
             "pointLocator":{
                "dataType":"BINARY",
                "binary0Value":"false",
                "includeTimestamp":false,
                "parameterName":"light01",
                "setPointName":"",
                "settable":false
             },
             "eventDetectors":[
             ],
             "plotType":"STEP",
             "rollup":"NONE",
             "unit":"",
             "templateXid":"ReadLight",
             "simplifyType":"NONE",
             "chartColour":"",
             "chartRenderer":{
                "type":"TABLE",
                "limit":10
             },
             "dataSourceXid":"DS_0638891e-846e-4413-a3d3-c5b5596f688a",
             "defaultCacheSize":1,
             "deviceName":"light_source",
             "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":"#eeee00",
                "oneLabel":"亮",
                "zeroColour":"#c0c0ee",
                "zeroLabel":"灭"
             },
             "tolerance":0.0
          }
       ]
    }
    

    [virtual data source] and [<ma-switch> control and show data] work well
    [virtual data publisher] work well
    [hard device (light)] work well
    [<ma-point-value> receive HTTP msg and show value] work well
    The problem is that when someone controls the light from other systems, <ma-point-value> displays normally and the <ma-switch> does not.
    (Of course I know because the data is not connected. but how)
    (Please let me know what else you need.)

    posted in Development general discussion read more
  • C
    cuihe

    Sorry, my title is not very clear.

    • I have a dataSource from HTTP receiver. Here we set the datapoint's name GET_LIGHT.
      I dessigned a dashboard. using "Point Value" to show GET_LIGHT's value. <- work well

    • I have a dataSource from Virtual data source. Here we set the datapoint's name SET_LIGHT.
      at the same dashboard. using "Binary Switch Button" to control SET_LIGHT's value. <- work well

    • when they work together, Control the "Binary Switch Button" and "Point Value" changed(Although they are not directly connected). <- work well

    • BUT, when another controller change the light(such as using light_switch at scene). "Point Value" in dashboard can change. "Binary Switch Button" can NOT change(because the Virtual data source not change). <- problem here

    I'm not very proficient in using Mango system.
    is there a way when GET_LIGHT changed making the Virtual data source SET_LIGHT change as well?
    Or I dont need a Virtual data source, another way to solve this problem?

    review this topic title, How can I describe this problem in one sentence? ^_^

    posted in Development general discussion read more
  • C
    cuihe

    thank you!

    I think I need to improve myself for some time.
    It's simpler to use Mango.

    posted in Development general discussion read more
  • C
    cuihe

    I think I understand. Thank you very much!

    posted in Development general discussion read more
  • C
    cuihe

    Mango Public Code:https://github.com/infiniteautomation/ma-core-public

    I don't know JAVA very well. Suppose I have studied JAVA for half a year.

    I want to know what architecture these codes use (or how I should start reading).
    The Learning Route I Formulated is: java -> spring -> Mango Public Code. Do you have any suggestions for this?

    My editor (Idea) told me that some of the packages used in the code did not exist.

    java: packages org.apache.commons.io did not exist
    java: packages org.apache.commons.io.comparator did not exist
    java: packages org.apache.commons.io.output did not exist
    

    and there is a strange problem: (but i really find the class in project)

    java: can not find symbol
      symbol:   class CompiledCoreVersion
      position: packages com.infiniteautomation.mango
    

    posted in Development general discussion read more
  • C
    cuihe

    @jared-wiltshire @phildunlap thank you for reply!
    I know that mango provides a completely superior function to UDP.
    But the reality is that an old system only accepts control signals in the form of UDP, and queries its database to determine whether the control effect has been achieved.

    my old system use these code(c#), if you need to skip:

    //your code here
    private void opendoor(string DoorNumber)
            {
                string strDestinationIP = System.Configuration.ConfigurationSettings.AppSettings["DoorContoler"];
                string strMessage = string.Empty;
                if (DoorNumber.Equals("MainDoor"))
                    strMessage = System.Configuration.ConfigurationSettings.AppSettings["MainDoorOpen"];           
                if (strMessage.Equals(string.Empty)) return;
                UdpClient udpClient = new UdpClient();
                IPAddress destinationIP = IPAddress.Parse(strDestinationIP);
                IPEndPoint destination = new IPEndPoint(destinationIP, 18001);
                byte[] message = HexStringToByteArray(strMessage);
                udpClient.Send(message, message.Length, destination);
                udpClient.Close();
            }
    

    posted in Development general discussion read more
  • C
    cuihe

    I see four protocols on the publisher page: BACnet、HTTP、Modbus、Twilio

    I want to use UDP to send data out.
    I think he should be in the HTTP protocol option.
    But I can't find it. It seems Only TCP in there.

    Is there a way to send data using UDP protocol?

    posted in Development general discussion read more
  • C
    cuihe

    thank you all!
    I implemented the configuration of virtual data sources. this make me happy!

    these website help me a lot(Although my internet speed is not very good)

    posted in Development general discussion read more
  • C
    cuihe

    7 forget to remind, where is DOC(guidance step by step) about mango?
    8 In my mother language, this topic content is “我刚刚接触芒果,我在win10安装了芒果,也能在芒果系统中看到默认的几个芒果内置的数据点,我想配置自己的数据点,我还没有购买硬件,有没有办法配置自己的数据点。如何继续学习使用芒果,我在中国,官网上的教学视频没有文档对我的帮助大,但是我找不到文档在哪。”

    posted in Development general discussion read more