• Recent
    • Tags
    • Popular
    • Register
    • Login
    1. Home
    2. uelojazz

    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
    U
    • Profile
    • Following 0
    • Followers 0
    • Topics 4
    • Posts 10
    • Best 0
    • Controversial 0
    • Groups 0

    uelojazz

    @uelojazz

    0
    Reputation
    552
    Profile views
    10
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    uelojazz Unfollow Follow

    Latest posts made by uelojazz

    • RE: Cannot get the numeric data type in Mqtt sub topic

      hi,

      in the end the datapoint started working by itself and seem to work 100%,
      I used /value as JSON pointer for value in this message:

      {"tsE":1589204279000,"tsM":"20200511153800","value":23118}

      I also need to use the topic type "JSON with Timestamp" but I could not get the right value as timestamp so for example for the message:

      {"tsE":1589204279000,"tsM":"20200511153800","value":23118}

      tsM = timestamp in format yyyyMMddHHmmss

      I used the following parameters but is not working:
      0_1589204799355_Schermata 2020-05-11 alle 16.46.25.png

      the error is:

      MQTT Client':
      Error during read topic: "gipo/inv7/wh/eday"
      datapoint: "MQTT Client - 0gipo/inv7/wh/eday -- /tsM"
      payload: "{"tsE":1589207111000,"tsM":"20200511162512","value":25105}"
      error: "Text '20200511162512' could not be parsed: Unable to obtain Instant from TemporalAccessor: {},ISO resolved to 2020-05-11T16:25:12 of type java.time.format.Parsed"

      I also want to upgrade the Mqtt module but in the modules pages I see:0_1589205571038_Schermata 2020-05-11 alle 16.55.26.png

      What I can do?
      Thanks for your help
      Rgards

      posted in User help
      U
      uelojazz
    • RE: Cannot get the numeric data type in Mqtt sub topic

      hi,
      the actual core version I'm using is 3.4.4, MQTT module version. 3.4.0

      the error is : the actual point has no value
      0_1588640611473_Schermata 2020-05-05 alle 04.01.43.png

      I suscribed to the same topic with 2 data points:

      a) first data point I selected data time Alphanumeric - Subscribed topic type: Plain

      I get for example {"time":1588587782,"sensor":782} so is 100% working

      b) second data point I selected data time: Numeric - Subscribed topic type: JSON - Json pointer for value: /sensor or $.sensor or just sensor

      I get no data while the datapoint a is getting all the points correctly

      I don't know where to find the ma.log please help so I can give you more info

      Thanks

      posted in User help
      U
      uelojazz
    • RE: Cannot get the numeric data type in Mqtt sub topic

      Yes not working...

      posted in User help
      U
      uelojazz
    • Cannot get the numeric data type in Mqtt sub topic

      Hello

      I suscribed a topic and send me information in json format, I´m tring read information but, it´s not posible. The message send for example is:

      "{"time":1588587782,"sensor":782}"

      if I read the same topic with alphabetical data type I get this

      0_1588588312132_Schermata 2020-05-04 alle 13.26.23.png

      My configuration in data point is this :

      0_1588588235003_Schermata 2020-05-04 alle 13.22.16.png

      I also tried $.sensor but not working, can someone help me?

      posted in User help
      U
      uelojazz
    • IEC 62056-21 or DLMS protocols

      Dear MANGO community, I use mango le last years to monitor the production of Photovoltaic system and is working great!! The only limitation is that I can't manage to read directly the energy meters because they use EC 62056-21 or DLMS protocols.
      There is a way to use such protocols... thanks

      posted in User help
      U
      uelojazz
    • Problem rendering grid in 3d amchart

      hello
      i try to make a simple serial chart to work as 3d but the grids behind the bars are rendered as 3d and it looks really confusing.

      <ma-point-query query="{name:'Module Daily Energy 01'}" limit="1" points="points2"></ma-point-query>
                       <ma-point-values points="points2" values="combined22" from="dateBar.from" to="dateBar.to" rollup="MAXIMUM" rendered="true" rollup-interval="1 DAYS">
                </ma-point-values>
      
      <ma-serial-chart style="height: 400px; width: 100%" series-1-title="Energia Mensile Totale" values="combined22" points="points2" legend="true" default-type="column" export=true options='{
              "theme": "light",
              "type": "serial",
              "depth3D": 20,
               "angle": 30
              }'>
              </ma-serial-chart>
      

      the result is this one and you can see the white background white lines that are shwon as 3d
      0_1533826405498_Screenshot_2018-08-09 View page - Innova Solare.png

      In a basic 3d amchart example the grid is not like that https://www.amcharts.com/demos/3d-bar-chart/
      I tried to change the grid alpha of ValueAxes and CategoryAxis via the options with "gridAlpha":1 but whatever is above 0 the alpha doesnt change
      I tried to change the amchart theme from light to dark but it deosnt work .. how do we switch amchart theme via mango ? because in the options the "theme": "black", is not working or any other theme

      And right now as i tried to export as jpg to post it here i realized that as soon as i click the download as button on upper right corner then suddenly the grid is render to normal and not as 3d and its like that which is correct
      0_1533826786653_Screenshot_2018-08-09 View page - Innova Solare(1).png
      I tried to look in css and debug in files like
      /web/resources/amcharts-3.13/themes/patterns.js
      /web/resources/mango-2.0/SerialChart.js
      but couldnt find the cause ...
      As it seems its should be a conflict with some other mango class or whatever custom amchart initialisation you are making in mango
      Any idea ?
      thank you :)

      posted in How-To
      U
      uelojazz
    • RE: Sorting an output array of ma-point-statistics

      @Jared-Wiltshire thank you very much !
      yes i figured it out how to sort the output of a ma-point-statistics with ma-calc..
      Can you help me out how to sort an output of a ma-point-values ?
      Im not sure how which variable exaclty i have to orderBy and how to correctly to the ng-repeat.
      Basically this was my last question, how to sort the combined array of a ma-point-values https://forum.infiniteautomation.com/topic/3603/sorting-an-output-array-of-ma-point-statistics/4]

      Also do you have any link of User module URL examples (or an actual page that you are allowed to share) .
      Just to get ideas and see how to properly write components, modules,controllers etc in the userModule.js of mango
      Thank you very much !

      posted in Scripting general Discussion
      U
      uelojazz
    • RE: Sorting an output array of ma-point-statistics

      any help on the above questions ? :)
      Can you at least help me out how to orderBy the combined array by the biggest value ?

      <ma-now update-interval="1 MINUTES" output="now"></ma-now>
      <ma-calc input="(now | maDate: 'HH')*60++(now | maDate: 'mm')--1"   output="rollupHours"></ma-calc>
      <ma-calc input="now | maMoment:'startOf':'day'" output="myfrom"></ma-calc>
      
      <ma-point-query query="'or(name=like=STR_4.*,name=like=*STR_5.*,name=like=*STR_6.*,name=like=STR_7.*,name=like=*STR_8.*,name=like=*STR_9.*)'" limit="300" sort="'-name'" points="points1"></ma-point-query>
      <ma-point-values points="points1" from="myfrom" to="now" values="combined"  rollup="INTEGRAL" rollup-interval="{{rollupHours}} MINUTES" ></ma-point-values>
      
      <!-- here im trying somehow to sort the combined array by biggest values .. how to do it with my calc ? what exactly im supposed to write inthe orderBy since this array has not keys ?-->
      <ma-calc input="combined" |orderBy:'value_' output="combined_sorted"></ma-calc>
      
      <!-- and here im trying to print the output by orderBy .. so i would need the biggest value on top and not sorted by name as is by default -->
      <div ng-repeat="(index,value) in combined |orderBy:value['value_' + point.xid]">
          <div ng-repeat="point in points1">XID: {{point.xid}} , Time: {{value.timestamp | maMoment:'format':'DD/MM/YYYY'}} ,Point Name: {{point.name}} ,Point Value:  {{value['value_' + point.xid]}}</div>
      </div>
      

      My output is the following which i would like to have it sorted my the biggest Point Value .. how to do this with ng-repeat and orderBy ??
      thank you very much

      XID: ST_000924 , Time: 27/06/2018 ,Point Name: STR_9.24 ,Point Value: 107.25
      XID: ST_000923 , Time: 27/06/2018 ,Point Name: STR_9.23 ,Point Value: 152675.05
      XID: ST_000922 , Time: 27/06/2018 ,Point Name: STR_9.22 ,Point Value: 154184.4
      XID: ST_000921 , Time: 27/06/2018 ,Point Name: STR_9.21 ,Point Value: 0.6

      And what i would like to have is :

      XID: ST_000922 , Time: 27/06/2018 ,Point Name: STR_9.22 ,Point Value: 154184.4
      XID: ST_000923 , Time: 27/06/2018 ,Point Name: STR_9.23 ,Point Value: 152675.05
      XID: ST_000924 , Time: 27/06/2018 ,Point Name: STR_9.24 ,Point Value: 107.25
      XID: ST_000921 , Time: 27/06/2018 ,Point Name: STR_9.21 ,Point Value: 0.6

      posted in Scripting general Discussion
      U
      uelojazz
    • RE: Sorting an output array of ma-point-statistics

      thank you , didnt know all the capabilities of the ma-calc are there more examples or documentation available? i guess it can be used in various ways.
      I have multiple errors now in my console
      Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting!
      Watchers fired in the last 5 iterations: [[{"msg":"fn: r","newVal":[{"hasData":true,"first":"...","last":"...","start":"...","minimum":"...","maximum":"...","average":"...","integral":"...","sum":"...","count":6912},

      Basically my code now looks like that:

      <ma-calc input="day | maMoment:'add':preset:'days'" output="day2"></ma-calc>
      <ma-calc input="day2 | maMoment:'set':{'hour': 5, 'minute': 0}" output="myfrom"></ma-calc>
      <ma-point-query query="'or(name=like=STR_4.*,name=like=*STR_5.*,name=like=*STR_6.*,name=like=STR_7.*,name=like=*STR_8.*,name=like=*STR_9.*)'" limit="300" points="points1"></ma-point-query>
      <ma-point-values points="points1" values="combined" from="myfrom" to="dateBar.to" rollup="INTEGRAL" rollup-interval="1 DAYS">
      </ma-point-values>
      
      <ma-point-statistics points="points1" rendered=false from="myfrom" to="dateBar.to" display-mode="INTEGRAL" timeout=7000 statistics="statsObj"></ma-point-statistics>
      
      <ma-calc input= statsObj|orderBy:'-integral.value'|maFirst  output="max" ></ma-calc>
      <ma-calc input= statsObj|orderBy:'-integral.value' output="sorted_integrals" ></ma-calc>
      <ma-calc input= "((max.integral.value) * 0.8)" output="max8" ></ma-calc>
      
      <div ng-repeat="(index,value) in sorted_integrals">
          <div ng-repeat="point in points1">XID: {{point.xid}} , Time: {{value.timestamp | maMoment:'format':'DD/MM/YYYY'}} ,Point Name: {{point.name}} ,Point Value:  {{value['value_' + point.xid]}}</div>
      
      </div>
      
      1. Seems that those ma-calc are updating their values constantly .. tried to timeout the statistics in 7seconds but didnt work .. is this the reason of the errors in the console ?

      2. i would like to filter and get only the integral values of my statistics object so i can print that array sorted with the ng-repeat ..
        first line should be the biggest integral ..
        Tried with display-mode="INTEGRAL" in the ma-point-statistcs directive but im not sure exactly what is does since there is no example in the documentation ..is it supposed to filter only the integral values ?
        Also i tried to filter it and print it by

      <ma-calc input= statsObj |filter:{statistics:'INTEGRAL'}|orderBy:'-integral.value' output="sorted_integrals" ></ma-calc>
      
      <div ng-repeat="(index,value) in sorted_integrals">
          <div ng-repeat="point in points1">XID: {{point.xid}} , Time: {{value.timestamp | maMoment:'format':'DD/MM/YYYY'}} ,Point Name: {{point.name}} ,Point Value:  {{value['value_' + point.xid]}}</div>
      
      </div>
      

      but its not working. the sorted_integrals still contains all the statistics like average, first etc that i dont need in order to correctly ng-repeat <div ng-repeat="(index,value) in sorted_integrals">

      3)also my

      <div ng-repeat="(index,value) in sorted_integrals">
          <div ng-repeat="point in points1">XID: {{point.xid}} , Time: {{value.timestamp | maMoment:'format':'DD/MM/YYYY'}} ,Point Name: {{point.name}} ,Point Value:  {{value['value_' + point.xid]}}</div>
      
      </div>
      

      Is not sorted by the biggest integral.. it gives me the default sort of the point XID of the ma-point-query

      And it gets even more complicated when i have null or undefined values in my integral values .. the orderby by default sorts the nulls and undefined as greater than numbers ... tried few workarounds like the fowllowing but none of them work.. how to sort it correctly and keep the nulls and undefined at the end so i get the biggest value first ?

      <ma-calc input= statsObj| orderBy:['integral.value==null || integral.value']  output="max" ></ma-calc>
      <ma-calc input= statsObj| orderBy:['!integral.value', '-integral.value', ]  output="max" ></ma-calc>
      

      Basically i want to sort the statistics object by biggest integral, then keep only the integral values and then print a table of the sorted values withe their corresponding data point names and xid
      What im doing wrong ?
      thank you very much :)

      posted in Scripting general Discussion
      U
      uelojazz
    • Sorting an output array of ma-point-statistics

      Hello
      im trying sort an output array of a ma-point-statistics .. I sort it correctly but then i need to be able to get or print or copy the max value to a variable
      Basically i have

      <ma-calc input="day | maMoment:'add':preset:'days'" output="day2"></ma-calc>
      <ma-calc input="day2 | maMoment:'set':{'hour': 5, 'minute': 0}" output="from"></ma-calc>
      <ma-point-query query="'or(name=like=STR_5*)'" limit="300" points="box5"></ma-point-query>
      <ma-point-values points="box5" values="box5_val" from="from" to="dateBar.to" rollup="INTEGRAL" rollup-interval="1 DAYS">
      </ma-point-values>
      <ma-point-statistics points="box5" rendered=false from="from" to="dateBar.to" statistics="statsObj"></ma-point-statistics>
      
      {{ statsObj | orderBy:'-integral.value'}}
      {{statsObj[0].integral.value }}
      <script>
      console.log(statsObj);
      </script>
      

      I would expect that the {{statsObj[0].integral.value }} would give me the 0 entry of my sorted array so the max integral value .. but it doesnt . it still gives me the first entry of the unsorted array..
      Is there a way to copy it to a new array and there have the sorted one ?

      {{statsObj2=statsObj | orderBy:'-integral.value'}}
      {{statsObj2[0].integral.value }}
      

      the above is not working
      maybe with javascript ?
      2) by the way i try to console.log the statsObj and i got error is not defined .. how do i console.log the output of any of the mango directives ?

      <script>
      console.log(statsObj);
      </script>
      

      the above gives me error statsObj is undefined

      1. basically im trying to find the maximum of integral of few data points
        What is the best approach that i have above?
        a)
      <ma-point-query query="'or(name=like=STR_5*)'" limit="300" points="box5"></ma-point-query>
      <ma-point-values points="box5" values="box5_val" from="from" to="dateBar.to" rollup="INTEGRAL" rollup-interval="1 DAYS">
      </ma-point-values>
      

      or b)

      <ma-point-query query="'or(name=like=STR_5*)'" limit="300" points="box5"></ma-point-query>
      <ma-point-statistics points="box5" rendered=false from="from" to="dateBar.to" statistics="statsObj"></ma-point-statistics>
      

      which is the fastest computing method and more clever way to do it ?
      In the same page i will have multiple pairs of (queries and ma-point-statistics) or (queries and ma-point-values) .. Which is the one that will crash less the system and is more time and cpu efficient?
      thank you !

      posted in Scripting general Discussion
      U
      uelojazz