I hereby claim:
- I am dpjanes on github.
- I am dpjanes (https://keybase.io/dpjanes) on keybase.
- I have a public key whose fingerprint is FB91 1EE6 3F32 CE3D 0C58 48A8 98F2 8D83 B36B F173
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| { | |
| "@context": { | |
| "@base": "file:///hue-light", | |
| "@vocab": "file:///hue-light#", | |
| "iot": "https://iotdb.org/pub/iot#", | |
| "iot-attribute": "https://iotdb.org/pub/iot-attribute#", | |
| "schema": "http://schema.org/" | |
| }, | |
| "@id": "", | |
| "@type": "iot:Model", |
| { | |
| "@context": { | |
| "@base": "file:///we-mo-socket", | |
| "@vocab": "file:///we-mo-socket#", | |
| "iot": "https://iotdb.org/pub/iot#", | |
| "schema": "http://schema.org/", | |
| "iot-attribute": "https://iotdb.org/pub/iot-attribute#" | |
| }, | |
| "@id": "", | |
| "@type": "iot:Model", |
| { | |
| "@context": { | |
| "@base": "http://example.com/th", | |
| "@vocab": "http://example.com/th", | |
| "iot": "https://iotdb.org/pub/iot#", | |
| "schema": "http://schema.org/", | |
| "iot-attribute": "https://iotdb.org/pub/iot-attribute#" | |
| }, | |
| "@type": "iot:Model", | |
| "iot:attribute": [ |
| { | |
| "@context": { | |
| "@base": "file:///hue-light", | |
| "@vocab": "file:///hue-light#", | |
| "iot": "https://iotdb.org/pub/iot#", | |
| "schema": "http://schema.org/", | |
| "iot-attribute": "https://iotdb.org/pub/iot-attribute#" | |
| }, | |
| "@id": "", | |
| "@type": "iot:Model", |
| /* | |
| * repeat-3.js | |
| * | |
| * David Janes | |
| * IOTDB.org | |
| * 2014-12-30 | |
| * | |
| * This will broadcast Count=0, Count=1, Count=3 | |
| * when pushed. | |
| */ |
| CREATE THING JohnnyFiveButton WITH pin = 4, meta:name = "The Button"; | |
| CREATE THING JohnnyFiveLED WITH pin = 6, meta:name = "The LED"; | |
| CREATE RULE | |
| LED | |
| WHERE | |
| meta:name = "The Button" | |
| BEGIN | |
| SET | |
| state:on = $_$state:on |
| -- this assumes that the TV supports Netflix (my LG does) | |
| CREATE SCENE | |
| NetflixChill | |
| BEGIN | |
| SET | |
| state:on = true, | |
| state:band = iot-attribute:band.service.netflix | |
| WHERE | |
| meta:facet & iot-facet:media.tv; | |
| AND |
| -- CREATE VIEW not implemented yet | |
| CREATE VIEW | |
| LivingRoom | |
| WHERE | |
| meta:zone & "Living Room"; | |
| CREATE ACTION | |
| NetflixChill | |
| BEGIN | |
| UPDATE |
| things = require('iotdb').connect() | |
| things | |
| .with_facet(":media.tv") | |
| .with_zone("Living Room") | |
| .set(":on", true) | |
| .set(":band", ":band.service.netflix") | |
| things | |
| .with_facet(":lighting") |