• G
    Gordoe

    Has there been any further developments on a MQTT Publisher? The intended purpose would be to publish to Azure or AWS.

    posted in Wishlist read more
  • G
    Gordoe

    @terrypacker said in Datafile Source - Datetime is in UTC:

    .withZone(DateTimeZone.UTC);

    Terry Packer for the win! Thanks for the amazing help.

    posted in User help read more
  • G
    Gordoe

    @mattfox said in Datafile Source - Datetime is in UTC:

    02:[0-5][0-9]"

    Here's the error code when I inserted that code.
    Event from import class: org.joda.time.IllegalInstantException: Cannot parse "03/08/2015 02:00": Illegal instant due to time zone offset transition (America/New_York)

    I simplified it down to the following to be sure I wasn't missing something obvious. Any thoughts?

    			String ts = row[0]+' '+row[1]; //timestring
    			long dt;
    			if(ts.matches("^03/08/2015 02:[0-5][0-9]"))
    					{
    						return;
    					}
    					dt = dtf.parseDateTime(ts).getMillis();
    

    posted in User help read more
  • G
    Gordoe

    I'm receiving "Illegal instant due to time zone offset transition" on my file imports which I can see is caused by the transition to/from daylight savings time. My values are in UTC but I'm not sure how to set that in the import. My code is below. As you can see, I tried simply skipping the lines due to it being 2am but then it throws an error with the NumericImportPoint as time isn't set. How could I set the timezone as UTC?

    //import java.util.HashMap;
    import java.util.Map;
    
    import org.joda.time.format.DateTimeFormat;
    import org.joda.time.format.DateTimeFormatter;
    import org.joda.time.IllegalInstantException;
    
    import com.infiniteautomation.datafilesource.contexts.AbstractCSVDataSource;
    import com.infiniteautomation.datafilesource.dataimage.NumericImportPoint;
    
    /**
     * Importer that will import data on a point per column basis
     * The first column is the Date
     *
     * @author Terry Packer
     *
     */
    public class pxm4000_energyLog extends AbstractCSVDataSource {
    
    	private DateTimeFormatter dtf = DateTimeFormat.forPattern("MM/dd/yyyy HH:mm");
    //	private DateTimeFormatter dtf = DateTimeFormat.forPattern("MM/dd/yyyy");
    	
    	private Map<Integer, String> headerMap = new HashMap<Integer, String>();
    
    
    	@Override
    	public void importRow(String[] row, int rowNum) {
    		//Strip out the header row, it does not contain our data
    		if(rowNum == 0){
    			for(int k = 0; k < row.length; ++k) {
    				this.headerMap.put(k, row[k]);
    			}
    		}else{
    
    			//Column 0 is the time
    //			try {
    			long time = dtf.parseDateTime(row[0]+' '+row[1]).getMillis();
    //			} catch(IllegalInstantException e) {
    //			return; //Don't let the exception escape
    //			}
    			//Empty additional parameters
    			Map<String, String> extraParams = new HashMap<String,String>();
    
    			//For each additional column we will create an Import Point
    			for(int i=2; i<row.length; i++){
    				String identifier = headerMap.get(i); //Get the identifier from our header map
    				double value = Double.parseDouble(row*); //Create the value
    				NumericImportPoint point = new NumericImportPoint(identifier, value, time, extraParams);
    				this.parsedPoints.add(point);
    			}
    		}
    	}
    }
    
    

    posted in User help read more
  • G
    Gordoe

    Hello Philip,

    Thanks for the suggestions. I have tried restoring several old backups and they all failed. The attempted restore also caused Mango to stop responding so I had to stop it and restart it.

    I will try restoring a JSON configuration and see if that works.

    Mark

    posted in Mango Automation Installation read more
  • G
    Gordoe

    Issue was firewall related.

    posted in User help read more
  • G
    Gordoe

    @craigweb When I look at the pages on the server they work, yet it's not working from my desktop. Might be firewall related/vpn related. Here is the error log from my desktop.

    The server is running with a dual nic. Think that might have an impact?

    mangoUi~ngMango~ngMangoServices.js?v=0f03d20f7b30b4a597f9:78 Markup '<md-button flex></md-button>' may not work as expected in IE Browsers. Consult 'https://github.com/philipwalton/flexbugs#9-some-html-elements-cant-be-flex-containers' for details.
    (anonymous) @ mangoUi~ngMango~ngMangoServices.js?v=0f03d20f7b30b4a597f9:78
    mangoUi~ngMango~ngMangoServices.js?v=0f03d20f7b30b4a597f9:72 WebSocket connection to 'ws://172.30.0.5/rest/v1/websocket/json-data' failed: Error during WebSocket handshake: net::ERR_CONNECTION_RESET
    a.openSocket @ mangoUi~ngMango~ngMangoServices.js?v=0f03d20f7b30b4a597f9:72
    mangoUi~ngMango~ngMangoServices.js?v=0f03d20f7b30b4a597f9:72 WebSocket connection to 'ws://172.30.0.5/rest/v1/websocket/events' failed: Error during WebSocket handshake: net::ERR_CONNECTION_RESET
    openSocket @ mangoUi~ngMango~ngMangoServices.js?v=0f03d20f7b30b4a597f9:72
    mangoUi~ngMango~ngMangoServices.js?v=0f03d20f7b30b4a597f9:78 Markup '<md-button flex></md-button>' may not work as expected in IE Browsers. Consult 'https://github.com/philipwalton/flexbugs#9-some-html-elements-cant-be-flex-containers' for details.
    (anonymous) @ mangoUi~ngMango~ngMangoServices.js?v=0f03d20f7b30b4a597f9:78
    mangoUi~ngMango~ngMangoServices.js?v=0f03d20f7b30b4a597f9:72 WebSocket connection to 'ws://172.30.0.5/rest/v1/websocket/point-value' failed: Error during WebSocket handshake: net::ERR_CONNECTION_RESET
    a.openSocket @ mangoUi~ngMango~ngMangoServices.js?v=0f03d20f7b30b4a597f9:72
    

    posted in User help read more
  • G
    Gordoe

    Yup, there are errors.

    mangoUi~ngMango~ngMangoServices.js?v=0f03d20f7b30b4a597f9:78 Markup '<md-button flex></md-button>' may not work as expected in IE Browsers. Consult 'https://github.com/philipwalton/flexbugs#9-some-html-elements-cant-be-flex-containers' for details.
    (anonymous) @ mangoUi~ngMango~ngMangoServices.js?v=0f03d20f7b30b4a597f9:78
    mangoUi~ngMango~ngMangoServices.js?v=0f03d20f7b30b4a597f9:78 Markup '<md-button flex></md-button>' may not work as expected in IE Browsers. Consult 'https://github.com/philipwalton/flexbugs#9-some-html-elements-cant-be-flex-containers' for details.
    (anonymous) @ mangoUi~ngMango~ngMangoServices.js?v=0f03d20f7b30b4a597f9:78
    /rest/v2/data-points/DP_Site99_CB2-breakerStatus:1 Failed to load resource: the server responded with a status of 404 (Not Found)
    mangoUi~ngMango~ngMangoServices.js?v=0f03d20f7b30b4a597f9:78 Possibly unhandled rejection: {"data":{"cause":null,"mangoStatusName":null,"mangoStatusCode":-1,"localizedMessage":"Not found"},"status":404,"config":{"method":"GET","transformRequest":[null],"transformResponse":[null],"jsonpCallbackParam":"callback","timeout":{},"url":"/rest/v2/data-points/DP_Site99_CB2-breakerStatus","headers":{"Accept":"application/json, text/plain, */*","X-Requested-With":"XMLHttpRequest","X-XSRF-TOKEN":"026c6a9d-22d7-4ded-b59d-1ab329306058"},"cached":false},"statusText":"Not Found","xhrStatus":"complete","mangoStatusText":"Not found","resource":{}}
    (anonymous) @ mangoUi~ngMango~ngMangoServices.js?v=0f03d20f7b30b4a597f9:78
    

    posted in User help read more