# HG changeset patch # User drewp # Date 1455004109 28800 # Node ID 2434e88d8bb0e964fe3692e9af3097568a298f1a # Parent cfc9c9f48824f816113b6c43e21c7db0406d77a4 add bed buttons Ignore-this: 912a92f7a8e173fe64aa4c1df9ef7dba darcs-hash:2e4031a9cacedb28f57c36708d69d6ec3610ef9d diff -r cfc9c9f48824 -r 2434e88d8bb0 service/reasoning/actions.py --- a/service/reasoning/actions.py Tue Feb 02 22:42:24 2016 -0800 +++ b/service/reasoning/actions.py Mon Feb 08 23:48:29 2016 -0800 @@ -29,14 +29,16 @@ self._oneShotPostActions(deviceGraph, inferred) for dev, pred in [ - # the config of each putUrl should actually be in the - # context of a dev and predicate pair, and then that would - # be the source of this list - #(DEV.theaterDoorLock, ROOM.state), - #(URIRef('http://bigasterisk.com/host/bang/monitor'), ROOM.powerState), - (URIRef('http://bigasterisk.com/host/dash/monitor'), ROOM.powerState), - (URIRef('http://projects.bigasterisk.com/room/storageCeilingLedLong'), ROOM.brightness), - (URIRef('http://projects.bigasterisk.com/room/storageCeilingLedCross'), ROOM.brightness), + # the config of each putUrl should actually be in the + # context of a dev and predicate pair, and then that would + # be the source of this list + #(DEV.theaterDoorLock, ROOM.state), + #(URIRef('http://bigasterisk.com/host/bang/monitor'), ROOM.powerState), + (URIRef('http://bigasterisk.com/host/dash/monitor'), ROOM.powerState), + (URIRef('http://projects.bigasterisk.com/room/storageCeilingLedLong'), ROOM.brightness), + (URIRef('http://projects.bigasterisk.com/room/storageCeilingLedCross'), ROOM.brightness), + (URIRef('http://projects.bigasterisk.com/room/headboardWhite'), ROOM.brightness), + (URIRef('http://projects.bigasterisk.com/room/bedLedStrip'), ROOM.color), ]: url = deviceGraph.value(dev, ROOM.putUrl) diff -r cfc9c9f48824 -r 2434e88d8bb0 service/reasoning/rules.n3 --- a/service/reasoning/rules.n3 Tue Feb 02 22:42:24 2016 -0800 +++ b/service/reasoning/rules.n3 Mon Feb 08 23:48:29 2016 -0800 @@ -127,3 +127,13 @@ :storageCeilingLedCross :brightness "1" . :storageCeilingLedLong :brightness "1" . } . + +@prefix bed: . + +{ bed:greenButton :buttonState :pressed } => { + :headboardWhite :brightness 0 . +} . + +{ bed:redButton :buttonState :pressed } => { + :headboardWhite :brightness 0.04 . +} . \ No newline at end of file