Mercurial > code > home > repos > homeauto
changeset 1052:2434e88d8bb0
add bed buttons
Ignore-this: 912a92f7a8e173fe64aa4c1df9ef7dba
darcs-hash:2e4031a9cacedb28f57c36708d69d6ec3610ef9d
author | drewp <drewp@bigasterisk.com> |
---|---|
date | Mon, 08 Feb 2016 23:48:29 -0800 |
parents | cfc9c9f48824 |
children | e8648fdff873 |
files | service/reasoning/actions.py service/reasoning/rules.n3 |
diffstat | 2 files changed, 20 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- 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)
--- 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: <http://bigasterisk.com/homeauto/sensor/bed/> . + +{ bed:greenButton :buttonState :pressed } => { + :headboardWhite :brightness 0 . +} . + +{ bed:redButton :buttonState :pressed } => { + :headboardWhite :brightness 0.04 . +} . \ No newline at end of file