IoT server development with MeteorKitchen & Cloud9

c9-mk

Once the sensors are in place and your board is publishing data to an MQTT broker, the next steps are to aggregate, display and action. I recommend you try a free account with cloud9 (https://c9.io/c/mdINlHY8cba) and developing in YAML (https://en.wikipedia.org/wiki/YAML) with MeteorKitchen (http://www.meteorkitchen.com/).

From Wikipedia:- “Meteor, or MeteorJS, is a free and open-source JavaScript web framework written using Node.js. Meteor allows for rapid prototyping and produces cross-platform (web, Android, iOS) code. It integrates with MongoDB and uses the Distributed Data Protocol and a publish–subscribe pattern to automatically propagate data changes to clients without requiring the developer to write any synchronization code. On the client, Meteor depends on jQuery and can be used with any JavaScript UI widget library.”

From MeteorKitchen website:- “Meteor Kitchen” is a code generator for Meteor.js. Just describe your application in a simple JSON file and let meteor-kitchen build a complete Meteor application for you. I looked at this and saw that MeteorKitchen also works with YAML and I found this to be a revelation – web development by definition, not having to worry about javascript syntax – you have to try it for yourself!

Cloud9 offers hosted workspaces pre-configured for many common programming platforms and I chose Node.js. Right there in your browser you will see a fully-functional IDE running within a configured Ubuntu instance. In my C9 workspace console I installed Meteor, MeteorKitchen and JSON-YAML parser:

curl https://install.meteor.com/ | sh
curl http://www.meteorkitchen.com/install | /bin/sh
npm install -g js-yaml

There are many examples shown in MeteorKitchen, but as we are discussing IoT, lets take a look at:

https://github.com/perak/kitchen-examples/blob/master/example-iot/example-iot.yaml

The result? – a working reactive web app showing live sensor data, written in 44 lines of code. Enough said, go try!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.