• C
    chrapchp

    I am using the rest API in my user module, components, etc. and works fine. However, I recently read on a post an example using a call on the pointvalues object. e.g.

    PointValues.getPointValuesForXid(...)
    

    I tried it and works fine and was wondering this officially documented?

    pjc

    posted in User help read more
  • C
    chrapchp

    Thanks. It will probably end up a user component.

    pjc

    posted in User help read more
  • C
    chrapchp

    I would like to retrieve the historical values stored via cron/meta-data point that are run once an hr and per month for a chart. When I perform a mysql query, I get what I expect. e.g. if there are 5 entries I get 5 entries.
    MySql query returns what I expect.
    e.g.

    
    select pointValue, from_unixtime(ts/1000) from pointvalues where datapointid=474
    

    via ma-point-values I get the 5 + a current value which is the same as the last log value. I am using these to seed a chart and always get an extra point that mirrors that of what was saved via cron.

    <ma-point-values point="point1" values="point1Values" from="dateBar.from" to="dateBar.to" rollup="{{dateBar.rollupType}}" rollup-interval="{{dateBar.rollupIntervals}} {{dateBar.rollupIntervalPeriod}}">
    </ma-point-values>
    
    <p>There are {{point1Values.length}} rows to display.</p>
    
    
    <md-table-container>
        <table md-table>
            <thead md-head>
            <tr>
                <th md-column>TimeStamp</th>
                <th md-column>Point Value</th>
            </tr>
            </thead>
            <tbody md-body>
            <tr ng-repeat="value in point1Values">
                <td md-cell>{{value.timestamp | maMoment:'format':'ll LTS'}}</td>
                <td md-cell>{{value.value}}</td>
            </tr>
            </tbody>
        </table>
    </md-table-container>
    

    This is an output on the per month points. I don't want the Dec 3 to return. mySql only has the 1 entry.
    0_1543887564989_Capture.JPG

    posted in User help read more
  • C
    chrapchp

    How does the parent item drop down list get populated in the create menu item from the dashboard designer? via the register a menu item in a user module? I am trying to create a menu bar at the top using the suggestions in forum and nothing but the canned entries appear.

    I;m obviously missing something.

    pjc

    posted in User help read more
  • C
    chrapchp

    I'm updating once 1 minute. Did not seem to bad. So far no issue with mysql.

    posted in User help read more
  • C
    chrapchp

    I converted to mysql and it runs a lot faster. Will convert to no-sql when the POC is done.

    posted in User help read more
  • C
    chrapchp

    I'm getting out of memory errors which I never received before. What are the conditions when one has to tune the memory allocation? This app is relatively small.

    Two things changed - Updated to latest version & added some Charting, Charting seems to be the issue. If I don't load the screen then system runs as before.

    JRE 1.8.0_171-b11/JDK 1.8.0_162
    Windows 10 Pro 16GB/i7

    Latest mango
    Loaded chart screen and walked away
    Out of memory
    Exported DB and Reimported
    Size down to ~680MB
    Loaded chart screen and walked way again
    h2 db at mem fault time time ~1.4GB
    restarted instance
    h2 db at 1.9GB
    95 datapoints enabled 146 configued

    Partial Log output

        org.springframework.core.convert.support.StreamConverter@451068cf
            org.springframework.core.convert.support.StringToArrayConverter@18a9d44f
            org.springframework.core.convert.support.StringToCollectionConverter@1917c302
    
       CharacterEncodingFilter.FILTERED=true
       org.springframework.security.web.csrf.CsrfFilter@3f45dfec.FILTERED=true
       javax.servlet.http.HttpServletResponse=org.springframework.security.web.header.HeaderWriterFilter$HeaderWriterResponse@12fb9bc6
       org.springframework.security.web.FilterChainProxy.APPLIED=true
       _csrf=org.springframework.security.web.csrf.DefaultCsrfToken@592cbe52
       __spring_security_filterSecurityInterceptor_filterApplied=true
       org.springframework.web.servlet.DispatcherServlet.THEME_SOURCE=WebApplicationContext for namespace 'REST_DISPATCHER-servlet': startup date [Thu Oct 25 16:23:20 MDT 2018]; parent: Root WebApplicationContext
       com.serotonin.m2m2.web.mvc.spring.security.RateLimitingFilter.FILTERED=true
       etagFilter.FILTERED=true
       org.springframework.web.servlet.HandlerMapping.pathWithinHandlerMapping=/v2/point-values/time-period/DP_3d092d65-2bcd-4c20-b411-0880fa10802e
       org.springframework.security.web.csrf.CsrfToken=org.springframework.security.web.csrf.DefaultCsrfToken@592cbe52
       org.springframework.web.servlet.HandlerMapping.uriTemplateVariables={xid=DP_3d092d65-2bcd-4c20-b411-0880fa10802e}
       org.springframework.web.servlet.DispatcherServlet.THEME_RESOLVER=org.springframework.web.servlet.theme.FixedThemeResolver@78b025a4
    ':
    java.lang.OutOfMemoryError: GC overhead limit exceeded
    Exception in thread "Log4j2-TF-5-AsyncLoggerConfig--2" java.lang.OutOfMemoryError: GC overhead limit exceeded
    Exception in thread "high-pool-2-thread-6" java.lang.OutOfMemoryError: GC overhead limit exceeded
    Exception in thread "Scheduler-959055079" java.lang.OutOfMemoryError: GC overhead limit exceeded
    Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Scheduler-959055079"
    
    Exception in thread "qtp818859466-607" java.lang.OutOfMemoryError: GC overhead limit exceeded
    

    Chart Code t0 see what can be done out of the box.

            <ma-get-point-value point-xid="DP_5ced8162-7dc9-4946-ac53-4ae8118e476d" point="pH_PV"></ma-get-point-value>
        <ma-get-point-value point-xid="DP_3d092d65-2bcd-4c20-b411-0880fa10802e" point="EC_PV"></ma-get-point-value>
        <ma-get-point-value point-xid="DP_23418117-43a1-4d9b-b4fb-651c6cb3a5da" point="AMBT_PV"></ma-get-point-value>
        <ma-get-point-value point-xid="DP_e89fe385-4758-4861-8c16-f8cb6577f280" point="TUBT_PV"></ma-get-point-value>
            <ma-get-point-value point-xid="DP_808d90e3-ccb8-43b9-ac0a-e52267ded197" point="CO2_PV"></ma-get-point-value>
        <ma-get-point-value point-xid="DP_5a3863c8-4ba6-4ca0-a22d-d319d1626cf6" point="RELH_PV"></ma-get-point-value>
    
    
    
    <ma-point-values point="pH_PV" values="pHValues" from="dateBar.from" to="dateBar.to" rollup="{{dateBar.rollupType}}" rollup-interval="{{dateBar.rollupIntervals}} {{dateBar.rollupIntervalPeriod}}">
    </ma-point-values>
    <ma-point-values point="EC_PV" values="ECValues" from="dateBar.from" to="dateBar.to" rollup="{{dateBar.rollupType}}" rollup-interval="{{dateBar.rollupIntervals}} {{dateBar.rollupIntervalPeriod}}">
    </ma-point-values>
    
    
    
    
    <ma-serial-chart style="height: 300px; width: 100%" series-1-values="pHValues" series-1-title="AT-001"  series-1-color="yellow" series-2-values="ECValues"  series-2-title="AT-002" series-2-color="green" series-2-axis="right" legend="true" balloon="true"
    options="{valueAxes:[{minimum:'0', axisColor:'yellow', color:'yellow', title: 'pH'}, {axisColor:'green', color:'green', title:'EC'}]}">
    </ma-serial-chart>
    
    
    
    <ma-point-values point="AMBT_PV" values="AMBTValues" from="dateBar.from" to="dateBar.to" rollup="{{dateBar.rollupType}}" rollup-interval="{{dateBar.rollupIntervals}} {{dateBar.rollupIntervalPeriod}}">
    </ma-point-values>
    <ma-point-values point="TUBT_PV" values="TUBTValues" from="dateBar.from" to="dateBar.to" rollup="{{dateBar.rollupType}}" rollup-interval="{{dateBar.rollupIntervals}} {{dateBar.rollupIntervalPeriod}}">
    </ma-point-values>
    
    
    
    
    <ma-serial-chart style="height: 300px; width: 100%" series-1-values="AMBTValues" series-1-title="TT-101"  series-1-color="yellow" series-2-values="TUBTValues"  series-2-title="TT-001" series-2-color="green" series-2-axis="right" legend="true" balloon="true"
    options="{valueAxes:[{minimum:'0', axisColor:'yellow', color:'yellow', title: 'Ambient (C)'}, {axisColor:'green', color:'green', title:'Tub (C)'}]}">
    </ma-serial-chart>
    
    <ma-point-values point="CO2_PV" values="CO2TValues" from="dateBar.from" to="dateBar.to" rollup="{{dateBar.rollupType}}" rollup-interval="{{dateBar.rollupIntervals}} {{dateBar.rollupIntervalPeriod}}">
    </ma-point-values>
    <ma-point-values point="RELH_PV" values="RELHValues" from="dateBar.from" to="dateBar.to" rollup="{{dateBar.rollupType}}" rollup-interval="{{dateBar.rollupIntervals}} {{dateBar.rollupIntervalPeriod}}">
    </ma-point-values>
    
    
    
    
    <ma-serial-chart style="height: 300px; width: 100%" series-1-values="CO2TValues" series-1-title="AT-102"  series-1-color="yellow" series-2-values="RELHValues"  series-2-title="AT-101" series-2-color="green" series-2-axis="right" legend="true" balloon="true"
    options="{valueAxes:[{minimum:'0', axisColor:'yellow', color:'yellow', title: 'CO2 ppm'}, {axisColor:'green', color:'green', title:'Rel Humidity'}]}">
    </ma-serial-chart>
    

    posted in User help read more