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:
/* | |
* 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") |
/* | |
make sure to | |
homestar install iotdb-transport-mqtt | |
homestar install iotdb-transport-iotdb | |
(npm install will probably work too) | |
Further reading on transporter | |
https://homestar.io/about/transporters |
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"iot:Connect" | |
], | |
"Resource": [ | |
"*" |
-31 = ( 5 ) - ( 4 * 3 ) * ( 2 + 1 ) | |
( 5 ) - ( 4 ) * ( 3 ) * ( 2 + 1 ) | |
-23 = ( 5 ) - ( 4 ) * ( 3 * 2 + 1 ) | |
-21 = ( 5 - 4 * 3 ) * ( 2 + 1 ) | |
-20 = ( 5 - 4 * 3 * 2 - 1 ) | |
( 5 ) - ( 4 * 3 * 2 + 1 ) | |
( 5 - 4 * 3 * 2 ) - ( 1 ) | |
( 5 ) - ( 4 * 3 * 2 ) - ( 1 ) | |
( 5 ) - ( 4 ) * ( 3 * 2 ) - ( 1 ) | |
( 5 ) - ( 4 * 3 ) * ( 2 ) - ( 1 ) |
# -*- coding: utf-8 -*- | |
# | |
# numbers.py | |
# | |
# David Janes | |
# 2016-10-21 | |
# | |
# Program to solve (more generally): | |
# | |
# Take the digits 5, 4, 3, 2 and 1, in that order. |