If you've spent any time with me at all in the last three months, you've heard me talk about my new favorite tools for creating IoT demos, prototypes and, in fact, a large part of THINGCONNECT itself!
- Amazon Web Services
- Node-RED
- RabbitMQ
In this multi-part writeup, I'll show you how I made a demo of a "pin" auto-refreshing on Google Maps, with the coordinates coming from a THINGCONNECT SIM card. We'll be using Websockets to make this data auto-refresh.
A group of friends (registered THINGCONNECT beta testers) and I wired this up at a recent hackathon. At the end of the post, I'll outline the steps we took, and the resources we used. (All online, all Open Source, and easily accessible.)
For those who have configured a Linux server before, and are eager to start, here's an outline of what is needed. Of course, you'll need a THINGCONNECT SIM card as well. We are in private beta, but you can still sign up here to be a tester and early-adopter.
- Get a "Free Tier" instance on AWS.
- Launch an Ubuntu 14.04 LTS server.
- Log in and install the following stuff:
- Node.js
- npm
- Node-RED
- Open port 1880 on your AWS instance to the outside world.
- Go to http://yourserver.com:1880/ using a modern web browser.
- Follow this Node-RED tutorial. (Thanks go to Hardware-Hacks for this great resource.) After this step, you'll have a web-server (running on http://yourserver.com:1880/map). You'll also have a way to inject "dummy" data into the system, which will display on your map.
- Now it's time to put in the THINGCONNECT -specific nodes. Drop the following nodes on your canvas.
- "Copy" the files from the THINGCONNECT Github in the previous step and in your Node-RED, 'Import...', 'From clipboard.'
Once you're set up, then comes the tinkering, testing, trial and error, (and ultimate success, of course. Check back here for the second part of the tutorial, where we'll get into gross details!