Go to file
2017-06-26 19:17:09 +01:00
.gitignore updated gitignore 2017-06-25 16:41:04 +01:00
app.js initial 2017-06-25 16:40:21 +01:00
index.html initial 2017-06-25 16:40:21 +01:00
package.json initial 2017-06-25 16:40:21 +01:00
README.md updated readme 2017-06-26 19:17:09 +01:00

CENode IoT Demo

This is a simple demo illustrating how CENode may be used to interact with IoT devices - in particluar, Philips hue bulbs. See this blog post for more information.

If unfamiliar with CENode, then please check out that project first and read the wiki and glance at the documentation and paper.

Overview

The key conrtibution made by this demonstration is the addition of a card handler for instances of type iot card. Such cards support additional attributes further to the more traditional CE cards (such as ask, tell, nl, etc.) that allow each one to represent an instruction that the local agent can act upon.

In this case, the iot card handler makes a request to a Philips hue bridge with parameters relevant to the properties of the card.

For example,

there is an iot card named {uid} that is to the agent House and has 'instruction' as content and targets the hue bulb 'Kitchen' and has 'on' as power

will tell CENode to make an HTTP request to the hue bridge to turn on the hue bulb named 'Kitchen'.

Running the demo

If you have Philips hue bulbs and a working hue bridge then you can run this demo.

  1. Clone repository: git clone git@github.com:flyingsparx/CENode-IoT.git
  2. Change into the repository: cd CENode-IoT
  3. Install dependencies (only CENode itself): npm install
  4. Find your Philips hue bridge's address on your local network and generate a username that you'll use to authenticate your requests
  5. Update the model in app.js to use the bridge address and the generated username as the token
  6. Startup a quick webserver: python -m SimpleHTTPServer
  7. Visit localhost:8000