Unsharable

Image shamefully stolen from Digital Trends..
Image shamefully stolen from Digital Trends..

Over the past 6 months I had been working mostly on projects I couldn’t share updates on. This has left my blog somewhat neglected, I apologize. I guess I can talk about the Visa Payment Ring a little now that the press has heard about it!

I haven’t been completely dormant though my Github activity has still been relatively fruitful with more people using my software than ever. I’m still active developing for the Open Gov Foundation and I hope to be more active over the coming months as their software goes live in more districts. The goal with this software is to use Etherpad to provide a better collaborative editing tool for governments to draft laws/bylaws etc. While Mozilla, the UN and Nato do this already the OGF is extending Etherpad to provide a more structured approach to legislation making the data more machine consumable and ergo representable in multiple fashions.

When it comes to open source I guess now I’m more of a package maintainer than active developer… My plugins mostly have active contributors who are contributing bugfixes and new features which means my main task can be done on the toilet (code review and merges). I see this as being a fair to decent use of my time.. I spend maybe an hour a day on this and often find myself triaging bugs in boring meetings.

Most of my hands on project work has been around R&D and due to the NFC Ring having an IP leak and a competitor abusing our IP to launch their product a lot more things have been happening behind closed doors. I feel like I shared as much as I could anyway and helped others be able to build their own NFC Rings.

One thing I didn’t share on my blog was the awesome work we did creating the worlds first payment ring for Henry Holland and Visa Europe Collab, that was a lot of fun. I got to hang out with people from the fashion and payment world which was a new experience for me, something I’m grateful for.. If VEC or Visa ever reach out to you on a project I strongly suggest getting involved because the teams are great but watch out the legal side as Visa’s legal dept seems to be somewhat disconnected from their innovation teams and this can lead to lengthy negotiations!

I’m still building new rings, that’s pretty much my full time job now and with McLear Ltd going through changes and my life going through changes writing new content here has been a low priority.. I’m not sure this will change any time soon.. The very nature of the work I’m doing means I can’t even share much if I wanted to and with me venturing into grounds where others already write way more frequently than me I’d feel it would not be a fruitful use of my time…

I wrote this before the Visa press release on the payment ring.. Obviously with that now live you guys have more of an insight to why I have been busy! Vive la finger!

2016 NFC Ring is on Kickstarter

Herp Derp new ring

2+ years of my life is available for you to back (or not). Check it out on Kickstarter..

During this time I got married, ate a lot of curry, um, no other benchmarks really..

On a personal note.. If we raise anything < £200k I still wont see a penny, crazy huh? Don't launch new products, they drain your soul and capital. My entire drain into this product now is about ~£144k.. That's a lot of cash... I have plans to turn it around though! 🙂 The main reason of doing Kickstarter is to validate market demand. If people want it, we will make it and that proves to myself and investors it's a worthwhile venture. The more we make, the more that gets invested, and the cycle of madness continues... Hype Cycle

I’d like it if we could raise more than our initial launch but I doubt that because of the gartner hype cycle.. I’d say we’re nearer to the trough than the peak mostly because V2s are never as exciting as V1s.. We’re definitely nearing the Slope as we’re seeing innovations land elsewhere around our tech that really do improve peoples lives..

Stay frosty people and thanks for backing 🙂

Switching Profiles in Kodi using an NFC Ring

Replace profiles, IP and ring ID with your own values.

Run in a Screen

node whatever.js
var fs = require('fs');
var request = require("request");
var inp = fs.createReadStream("/dev/ttyACM0");
inp.setEncoding('utf8');
var inptext = "";
var XBMCEventClient = require('xbmc-event-client').XBMCEventClient;
var xbmc = new XBMCEventClient('node.js app');
var blob = { "id": 1, "jsonrpc": "2.0", "method": "Profiles.LoadProfile", "params": {"profile":"lydia"}};

var options = {
  method: 'POST',
  uri: 'http://user:pass@127.0.0.1:8080/jsonrpc',
  json: blob
}

xbmc.connect(function(errors, bytes) {
  inp.on('data', function (data) {
    if (errors.length){
      throw errors[0];
    }

    if(data === "."){
      return; // do nothing
    }

    if(data.indexOf("InsertRingUIDHere") !== -1){
      console.log(options.json.params);
      options.json.params.profile = "john";
    }else{
      options.json.params.profile = "lydia";
    }

    request(options, function (error, response, body) {
      console.log("changed to", options.json.params.profile);
      if (!error && response.statusCode == 200) {
        console.log(body.id) // Print the shortened url.
      }
    });

  });
});

Note that I just threw this together as a proof of concept, it needs a bunch of polish! 🙂

Kodi Play/Pause with an NFC Ring and USB NFC Device

In this example I use a keyduino but you can use any Arduino device that has the PN532 or NFC module loaded on. The Arduino has to just push out the ID of the Ring (or tag) via Serial print. This arrives at ttyACM0 and we then parse it and do some xbmc events..

var fs = require('fs');
var inp = fs.createReadStream("/dev/ttyACM0");
inp.setEncoding('utf8');
var inptext = "";
var XBMCEventClient = require('xbmc-event-client').XBMCEventClient;
var xbmc = new XBMCEventClient('node.js app');

xbmc.connect(function(errors, bytes) {
  inp.on('data', function (data) {
    console.log(data);
    // inptext += data;

    if (errors.length){
      throw errors[0];
    }

    if(data.indexOf("yourringUIDhere") !== -1){
      xbmc.notification('Resuming playback', 'Resuming playback');
      xbmc.keyPress('space');
    };

  });
});

ThreeJS is tricky, but awesome.

Over the past few months I have been using ThreeJS to create a 3D model of the NFC Ring.

ThreeJS from Wikipedia:

Three.js is a lightweight cross-browser JavaScript library/API used to create and display animated 3D computer graphics on a Web browser. Three.js scripts may be used in conjunction with the HTML5 canvas element, SVG or WebGL.

The ThreeJS community is actually really helpful, I’m not saying other communities aren’t helpful or useful I just found that the ThreeJS community did a lot more to help get me started.  There are also quite a few demostration videos online that can be used as reference material.

The real power of ThreeJS comes when you mix it with the power of Blender.

Blender from Wikipedia:

Blender is a professional free and open-source 3D computer graphics software product used for creating animated films, visual effects, art, 3D printed models, interactive 3D applications and video games. Blender’s features include 3D modeling, UV unwrapping, texturing, raster graphics editing, rigging and skinning, fluid and smoke simulation, particle simulation, soft body simulation, sculpting, animating, match moving, camera tracking, rendering, video editing and compositing. Alongside the modeling features it also has an integrated game engine.

At first I was completely stuck, the video tutorials were out of date and the documentation far too fuzzy, finally I met someone on IRC who did the type of task I was trying to to accomplish every day as his day job.  Things fell into place quickly, so quickly I thought it would be worthwhile putting together a video showing how easy the process is to model an object and export it as something that can be used in ThreeJS:

Canvas is pretty much a no-go for the work I’m doing, it’s nice to have the fallback options there but Canvas just doesn’t have the features I need to display a ring in all of it’s glory.  With that in mind if a user wants to see the ring and doesn’t have WebGL supported they are shown a message how best to upgrade their browser.

Finally we should note both three.js and blender are open source projects, completely free and depend on community donation and support. They are both evolving under great leadership and they deserve the credit and respect they get.

This is what I was able to accomplish, I’m pretty proud of it.

You can see the source code and access the assets here