• R
    raylatbasix

    Boy, do I feel stupid!! It was the Logging Interval!! All set now!

    Thanks for putting up with me!!

    posted in Scripting general Discussion read more
  • R
    raylatbasix

    Hi Phil,
    Sorry for the late reply. Just checked my settings for both meta points. My originating kWh meta point is set up for "Start of Hour" on update event, and the "Updates context" checkbox is unchecked for the modbus kW point (p40). I generate my kWh calculation from my modbus kW point as follows:

    var stats = p40.past(HOUR, 1);
    if(stats.count !== 0) return stats.average;
    return 0;
    

    My new Meta point is setup "Start of Month" for update event, and "Updates context" is unchecked for my kWh meta point (p130) as well. My code:

    TIMESTAMP=CONTEXT.getRuntime()-1;
    return p130.past(MONTH).sum;
    

    Like I said, it seems to calculate monthly totals ok, Just looking for a way to "Rollup" the data rows to 1 monthly total per month. Thanks again.

    posted in Scripting general Discussion read more
  • R
    raylatbasix

    Hi Phil,

    This looks like it's working!! Just one more question. Is there any way to rollup the data so there is only one row per month in the dataset? Right now, it shows the same monthly sum total for every kWh hourly entry for each month, which equals over 283,000 rows. Do you know how to just display one row per month showing the total?

    Thanks Again!

    posted in Scripting general Discussion read more
  • R
    raylatbasix

    Awesome Phil!! I will give this a try! Thanks for the help!

    posted in Scripting general Discussion read more
  • R
    raylatbasix

    Looking for a solution in Mango 2.8 Meta Script.
    I have a kilowatt/hour meta point that I sample once an hour.
    I need to sum up the total kWh usage for each month for the current year to date (ie. Jan '18 through today's last kWh entry.) Any guidance would be appreciated.

    posted in Scripting general Discussion read more
  • R
    raylatbasix

    Thanks for the excellent support today Phil!!

    posted in MangoES Hardware read more
  • R
    raylatbasix

    I was in the parent directory for the java-8-oracle. Tried it both ways, still no luck.

     Note <filename> must be a regular (non-symlink) file.
    > cd /usr/lib/jvm/
    > sudo setcap 'cap_net_bind_sevice=+ep' java-8-oracle/bin/java
    fatal error: Invalid argument
    usage: setcap [-q] [-v] (-r|-|<caps>) <filename> [ ... (-r|-|<capsN>) <filenameN> ]
    
     Note <filename> must be a regular (non-symlink) file.
    > sudo setcap 'cap_net_bind_sevice=+ep' /usr/lib/jvm/java-8-oracle/bin/java
    fatal error: Invalid argument
    usage: setcap [-q] [-v] (-r|-|<caps>) <filename> [ ... (-r|-|<capsN>) <filenameN> ]
    
     Note <filename> must be a regular (non-symlink) file.
    

    posted in MangoES Hardware read more
  • R
    raylatbasix

    @phildunlap said in Java update to 1.8 162 has caused Mango ES 3.2.2 to become unreachable.:

    sudo setcap 'cap_net_bind_sevice=+ep' java-8-oracle/bin/java

    Just upgraded to 1.8 162. Having an issue with the:

    sudo setcap 'cap_net_bind_sevice=+ep' java-8-oracle/bin/java
    

    Throws an invalid argument error for setcap:

    > sudo setcap 'cap_net_bind_sevice=+ep' java-8-oracle/bin/java
    fatal error: Invalid argument
    usage: setcap [-q] [-v] (-r|-|<caps>) <filename> [ ... (-r|-|<capsN>) <filenameN> ]
    
     Note <filename> must be a regular (non-symlink) file.
    

    Any ideas?

    posted in MangoES Hardware read more
  • R
    raylatbasix

    Thanks Phil,

    So I should be safe to attempt a java update back to 1.8 162, and perform you additional steps??

    Also, it seems all of my licensing on the modules page shows as "Unlicensed" or free mode now. Any Idea how to fix that? I'm guessing in this mode, I'm limited on my point count to 300, and I am well over that.

    Thanks.

    posted in MangoES Hardware read more
  • R
    raylatbasix

    ma.log file error:

    ERROR 2018-02-13T10:48:32,418 (com.serotonin.m2m2.Main.main:129) - Error during initialization 
    java.lang.RuntimeException: java.net.SocketException: Permission denied
    	at com.serotonin.m2m2.Lifecycle.webServerInitialize(Lifecycle.java:922) ~[ma-priv-3.2.2.jar:?]
    	at com.serotonin.m2m2.Lifecycle.initialize(Lifecycle.java:199) ~[ma-priv-3.2.2.jar:?]
    	at com.serotonin.m2m2.Main.main(Main.java:125) [ma-priv-3.2.2.jar:?]
    Caused by: java.net.SocketException: Permission denied
    	at sun.nio.ch.Net.bind0(Native Method) ~[?:1.8.0_131]
    	at sun.nio.ch.Net.bind(Net.java:433) ~[?:1.8.0_131]
    	at sun.nio.ch.Net.bind(Net.java:425) ~[?:1.8.0_131]
    	at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[?:1.8.0_131]
    	at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[?:1.8.0_131]
    	at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:317) ~[jetty-server-9.3.11.v20160721.jar:9.3.11.v20160721]
    	at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80) ~[jetty-server-9.3.11.v20160721.jar:9.3.11.v20160721]
    	at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:235) ~[jetty-server-9.3.11.v20160721.jar:9.3.11.v20160721]
    	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) ~[jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721]
    	at org.eclipse.jetty.server.Server.doStart(Server.java:390) ~[jetty-server-9.3.11.v20160721.jar:9.3.11.v20160721]
    	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) ~[jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721]
    	at com.serotonin.m2m2.Lifecycle.webServerInitialize(Lifecycle.java:919) ~[ma-priv-3.2.2.jar:?]
    	... 2 more
    INFO  2018-02-13T10:48:32,431 (com.serotonin.m2m2.Lifecycle.terminate:361) - Mango Lifecycle terminating... 
    ERROR 2018-02-13T10:48:32,447 (com.serotonin.m2m2.Lifecycle.terminate:436) - com.serotonin.provider.InputStreamEPollProvider 
    ERROR 2018-02-13T10:48:32,449 (com.serotonin.m2m2.Lifecycle.terminate:444) - com.serotonin.provider.ProcessEPollProvider 
    FATAL 2018-02-13T10:48:32,459 (com.infiniteautomation.zwave.rt.ZwaveControlCenter.<init>:62) - Z-Wave Device configuration directory at:  does not exist! 
    FATAL 2018-02-13T10:48:32,459 (com.infiniteautomation.zwave.rt.ZwaveControlCenter.<init>:68) - Z-Wave user data directory at:  does not exist, Mango will shutodwn.! 
    INFO  2018-02-13T10:48:32,466 (com.serotonin.m2m2.Lifecycle.terminate:480) - Mango Lifecycle terminated. 
    
    

    So it was some sort of permission issue. How do you recommend updating java ??

    posted in MangoES Hardware read more