ThingSpeak?

Posted on
  • Chanced across this tonight. Struck me as useful for Espruino developers and I've not seen mention of it on here. As far as I can see based on my sign-up, all free and you can keep data private or publish a feed.

    API and toolset seems comprehensive. Could be very useful to people who don't want to implement a capture/storage backend for an Espruino project that involves data collection?

    Hope of interest.

    ThingSpeak - https://thingspeak.com/

  • Thanks - that looks great. API looks very easy to interface to as well. If you use it with Espruino, do you think you could post some code up?

    Maybe I should have a page on the website dedicated to these services, with some example code for each? I came across one a year ago that looked like a great 'twitter for machines', but I've since forgotten who it was.

    At Oxford IoT last night one of the guys from OpenSensors.io did a talk, and that looks interesting too - data might need to be pushed via MQTT though.

  • Wasn't Dweet.io was it? I came across that a while back. They seem to sell it as Twitter for machines.

    The page is a great idea. Services like Dweet, ThingSpeak, and IFTTT to an extent, really open up the possibilities without having to implement the backend server and storage, daunting to a newcomer and often a disincentive to even starting for a technical person.

    Will certainly post anything I do with ThingSpeak and Espruino.

  • Thanks! Yes, dweet.io looks like the one - really handy after twitter added the https requirement.

    Also I was talking to Jaco from cubitic.io a few months ago and they seem interested in opening up to Espruino users, so that could be a good one to put up as well.

    There's obviously Xively, but there's already an example for that.

    Any others?

    I guess I could call the page 'Online Services' - any other suggestions?

  • Nothing else from me. Dweet, ThingSpeak and IFTTT. Might give IBM Bluemix a mention? A PAAS that exposes easily useable APIs and database services. Not so simple, but certainly more complex to run the services themselves for yourself. Decent free layer. Also includes Node Red and they have an IoT service that I've been meaning to look at. Free for small again.

    Re page title, "Online Services" is good enough.

    But, thinking out loud...
    Integration Services or Integration APIs?
    Third Party Services/APIs?
    Hosted Services/APIs?
    Data Services/APIs?
    IoT Services/APIs/Integrators?

  • For IoT cloud platforms you can't help but fall over one each week.
    For a full list see http://postscapes.com/companies/iot-clou­d-services

    OpenSensors.io look interesting given their open data approach. @Gordon cubitic.io now that is interesting predictive analytics. Xively solid but no innovation I met them over 5 yrs ago the only thing that changed is ownership & the name :(

  • Xively solid but no innovation

    Yeah... I did meet some of the developers working in the London office, but my understanding is that they were pretty much all laid off, so I guess they're just coasting with what they have.

    Not that I mind it when Web APIs don't change and everything keeps working, but it's not a good sign for long-term availability.

    Ok, Dweet:

    function encodeURIComponent(s) { 
      var ok = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklm­nopqrstuvwxyz0123456789-_.~";
      var r = "";
      for (var i=0;i<s.length;i++) { 
        if (ok.indexOf(s[i])>=0) r+=s[i];
        else r+= "%"+(256+s.charCodeAt(i)).toString(16).t­oUpperCase().substr(-2);
      }
      return r;
    }
    
    function putDweet(dweet_name, a, callback) {
      var data = "";
      for (var n in a) {
        if (data.length) data+="&";
        data += encodeURIComponent(n)+"="+encodeURICompo­nent(a[n]);    
      }
      var options = {
        host: 'dweet.io',
        port: '80',
        path:'/dweet/for/'+dweet_name+"?"+data,
        method:'POST'
      };
      require("http").request(options, function(res)  {
        var d = "";
        res.on('data', function(data) { d+=data; });
        res.on('close', function(data) {
          if (callback) callback(d);
        });
     }).end();
    }
    
    
    putDweet("espruino", {hello:"world2"}, function(response) {
      console.log(response);
    });
    
    // read with http://dweet.io/get/latest/dweet/for/esp­ruino
    

    and getting latest:

    function getDweet(dweet_name, callback) {
      require("http").get('dweet.io/get/latest­/dweet/for/'+dweet_name, function(res)  {
        var d = "";
        res.on('data', function(data) { d+=data; });
        res.on('close', function(data) {
          var j = JSON.parse(d);
          if (callback) callback((j&&j.with&&j.with.length)?j.wi­th[0].content:undefined);
        });
     });
    }
    getDweet("espruino", console.log);
    
  • Ok, just added a page on IoT Services. This'll be on espruino.com later in the week.

    If you've got anything to add, please can you do a GitHub pull request? Ideally no network specific code - just a function call or two that push the relevant data, and a small explanation.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

ThingSpeak?

Posted by Avatar for Ollie @Ollie

Actions