This repository has been archived by the owner. It is now read-only.
Slides and code from the Speech to Text & IoT talk at TechCrunch's 2015 Disrupt SF Hackathon
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
device/esp8266_ibm_iot_client
node-red
slideshow
web
.gitignore
README.md

README.md

stt-iot-disrupt-2015

Slides and code from the Speech to Text & IoT talk at TechCrunch's 2015 Disrupt SF Hackathon

See a video of the demo in action at https://www.youtube.com/watch?v=92CDJ2P0vAo

Setting up the demo

There are a few different moving parts in this demo:

  • The device itself
  • A Bluemix server instance to host Node-RED and connect the IBM IoT service
  • A second Bluemix server instance to host the website and connect the Speech to Text service

The Device

I'm using a SparkFun ESP8266 Thing and the Arduino programing environment, but anything that can speak the MQTT protocol will do - the IBM Iot Foundation has "Recpipes" for connecting dozens of other devices.

For the ESP8266 Thing, follow SparkFun's hookup guide to get it assembled and set up the Arduino software, then install the PubSubClient in the Library Manager, and upload the sketch.

To just see something working quickly, most of the settings can be null or "quickstart", and then enter the device's MAC address at https://quickstart.internetofthings.ibmcloud.com/#/

  • The rest of the settings will come from the Node-RED bluemix instance.

Node-RED

Create a Bluemix account and server instance from the IoT Foundation Starter Boilerplate, then create an instance of the IoT Service and bind it to the Node-RED server.

On your Node-RED server's dashboard, find the new IoT service instance and click Show credentials - this will give you the Org ID to enter into the client_id and mqtt_server variables in the Arduino sketch.

Now launch the IoT Foundation Service Dashboard, create a new device type esp8266 (all other fields are optional), and then create one esp8266 device. Set the username and password in the Arduino sketch to "use-token-auth" and the token for the new device.

Upload your updated sketch to the device and the entry for your new device should start receiving status messages within a few seconds.

Finally, log into your node-red server (the link should be available in the Bluemix Dashboard), import the data from node-red/nodes.json (top-right hamburger menu), and update the two IBM IoT nodes to have your devices MAC address for the ID (double-click to update).

Website and Speech to Text service

Edit the two req = $.getJSON(... lines in web/src/handlemicrophone.js to change to domain name to your Node-RED instance. Then run:

npm install
npm build

(This step requires node.js.)

Next install the cf command line tool, and then in the web/ folder, run:

cf login
cf push

This should create a new Bluemix server instance, bind a new Speech to Text instance, and publish the demo web app.

That's it! Try out your demo app and then build on it to create something even cooler!