0

I am using Geckoboard to display certain metrics. I have used the Java API which to push my content to widgets in Geckoboard. However, when I try to push my data to Text widget I keep on getting the error as invalid type provided: expected "float64", got "string". There isn't much information available on the web regarding this. How would I remove the errors. Here is the link to my dashboard and the first widget is the error.

https://agero.geckoboard.com/dashboards/1FC347183F126E8D#

public class ClusterGeckoMeter {
static Geckoboard geckoboard = new Geckoboard("sfsfsdfds");
static GeckOMeter text;
static GeckOMeter textprod;

static {
    text = new GeckOMeter("wewrwer", GraphType.STANDARD);
    textprod = new GeckOMeter("sdsdfaf", GraphType.STANDARD);
}

public ClusterGeckoMeter() {
}

public static void main(String[] args) throws ValidationException, GeckoboardException, IOException, NoSuchAlgorithmException {
    handShake();
    pushToDevProd();
}

public static void handShake() throws IOException, NoSuchAlgorithmException {
    TrustManager[] trustAllCerts = new TrustManager[]{new X509TrustManager() {
        public X509Certificate[] getAcceptedIssuers() {
            return null;
        }

        public void checkClientTrusted(X509Certificate[] certs, String authType) {
        }

        public void checkServerTrusted(X509Certificate[] certs, String authType) {
        }
    }};
    SSLContext sc = SSLContext.getInstance("SSL");

    try {
        sc.init((KeyManager[])null, trustAllCerts, new SecureRandom());
    } catch (KeyManagementException var7) {
        var7.printStackTrace();
    }

    HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
    HostnameVerifier allHostsValid = new HostnameVerifier() {
        public boolean verify(String hostname, SSLSession session) {
            return true;
        }
    };
    HttpsURLConnection.setDefaultHostnameVerifier(allHostsValid);
    URL url = new URL("https://sri.geckoboard.com");
    URLConnection con = url.openConnection();
    InputStreamReader reader = new InputStreamReader(con.getInputStream());

    while(true) {
        int ch = reader.read();
        if(ch == -1) {
            return;
        }

        System.out.print((char)ch);
    }
}

public static void pushToDevProd() throws IOException {
    text.setCurrent("4");
    text.setMin("", "0");
    text.setMax("", "10");
    geckoboard.push(text);
    text.setCurrent("4");
    textprod.setCurrent("4");
    textprod.setMin("", "0");
    textprod.setMax("", "10");
    geckoboard.push(textprod);
}

}

ZZzzZZzz
  • 1,800
  • 3
  • 29
  • 51
  • 1
    Please give us an [MCVE](http://stackoverflow.com/help/mcve). That way, even if you don't figure out the answer yourself, it's much easier for us to help with than if you dump all of the code on us. If you can't, please at least put the relevant part of the code (*not the whole thing*) in your question. – Nic Jan 23 '15 at 17:16
  • 1
    I have updated my code. Its working one other dashboards but not on the one that i provided the link for. I guess there some limitation to the size what we push. – ZZzzZZzz Jan 23 '15 at 18:31

0 Answers0