# HG changeset patch
# User drewp@bigasterisk.com
# Date 1499136638 25200
# Node ID 79efb6fdcb9594c24e9aeff211d59384c68271c4
# Parent cd7610d7f735470cc87ab257ed94024b488cd54e
rules updates for storage and changing
Ignore-this: d9a72db03ad987a7253a6b5b51eee14e
diff -r cd7610d7f735 -r 79efb6fdcb95 service/reasoning/oneShot
--- a/service/reasoning/oneShot Mon Jul 03 19:48:48 2017 -0700
+++ b/service/reasoning/oneShot Mon Jul 03 19:50:38 2017 -0700
@@ -7,9 +7,10 @@
s, p, o = sys.argv[1:]
prefixes = {
-'room' : 'http://projects.bigasterisk.com/room/',
-'shuttle': 'http://bigasterisk.com/room/livingRoom/shuttlepro/',
- }
+ 'room' : 'http://projects.bigasterisk.com/room/',
+ 'shuttle': 'http://bigasterisk.com/room/livingRoom/shuttlepro/',
+ 'sensor': 'http://bigasterisk.com/homeauto/sensor/',
+}
def expand(term):
if ':' not in term or term.startswith(('<', '"', "'")):
diff -r cd7610d7f735 -r 79efb6fdcb95 service/reasoning/rules.n3
--- a/service/reasoning/rules.n3 Mon Jul 03 19:48:48 2017 -0700
+++ b/service/reasoning/rules.n3 Mon Jul 03 19:50:38 2017 -0700
@@ -11,6 +11,8 @@
@prefix dash: .
@prefix slash: .
+@prefix sensor: .
+
{ ?d :deviceName "drew-phone"; :connected bigast:wifiAccessPoints . } => { :auth :near :home } .
{ ?d :deviceName "Kelsis-iPhone"; :connected bigast:wifiAccessPoints . } => { :auth :near :home } .
@@ -119,25 +121,26 @@
{ shuttle:dial :change :clockwise } => { mpd: :audioState :volumeStepUp } .
{ shuttle:dial :change :counterclockwise } => { mpd: :audioState :volumeStepDown } .
-{ :seesRecently . } => {
- :storageCeilingLedCross :brightness 0 .
- :storageCeilingLedLong :brightness 0 .
-} .
+#{ sensor:motionStorage :seesRecently :noMotion . } => {
+# :storageCeilingLedCross :brightness 0 .
+# :storageCeilingLedLong :brightness 0 .
+#} .
-{ :seesRecently . } => {
+{ sensor:motionStorage :seesRecently :motion . } => {
:storageCeilingLedCross :brightness 1 .
:storageCeilingLedLong :brightness 1 .
} .
-{ :sees . } => {
- :storageCeilingLedCross :brightness 1 .
- :storageCeilingLedLong :brightness 1 .
-} .
+#{ sensor:motionStorage :sees :motionStart . } => {
+# :storageCeilingLedCross :brightness 1 .
+# :storageCeilingLedLong :brightness 1 .
+#} .
@prefix bed: .
{ bed:greenButton :buttonState :press } => {
:headboardWhite :brightness 0.0 .
+ :anim1 :position :end .
} .
{ bed:redButton :buttonState :press . :headboardWhite :brightness 0.0 . } => {
@@ -161,8 +164,12 @@
:changingWhite :brightness 0.3 .
} .
-{ sensor:motionChanging :sees :motionStart90 } => {
- :changingCam :grab .
+{ sensor:motionChanging :sees :motionStart90 . dev:calendar :twilight :daytime .} => {
+ :changingCam :grab .
+ } .
+
+{ sensor:motionChanging :sees :motionStart90 . dev:calendar :twilight :withinTwilight .} => {
+ :changingCam :grab .
} .
{ :bookSwitch :buttonState :press . :livingRoomLamp1 :brightness 0.0 . } => {
@@ -175,3 +182,14 @@
} .
+
+{ :seesRecently :noMotion . } => {
+ :garageOverhead :brightness 0 .
+} .
+
+{ :seesRecently :motion . } => {
+ :garageOverhead :brightness 1 .
+} .
+
+{ sensor:motionBed :sees :motion . } => { :anim1 :playback :start . } .
+