Mercurial > code > home > repos > homeauto
annotate service/reasoning/rules.n3 @ 1126:82046a1c75f3
rules updates for storage and changing
Ignore-this: d9a72db03ad987a7253a6b5b51eee14e
darcs-hash:2196749d0e3ce3ba8d60a4222a29e7f04c27f51e
author | drewp <drewp@bigasterisk.com> |
---|---|
date | Mon, 03 Jul 2017 19:50:38 -0700 |
parents | cb7fa2f30df9 |
children | b069bb37f817 |
rev | line source |
---|---|
934
3bb18b7d21df
reasoning actions: generalize them a bit but then add a bunch of special cases for mpd for now
drewp <drewp@bigasterisk.com>
parents:
923
diff
changeset
|
1 # rules only! statements in this file will not be considered in the graph |
3bb18b7d21df
reasoning actions: generalize them a bit but then add a bunch of special cases for mpd for now
drewp <drewp@bigasterisk.com>
parents:
923
diff
changeset
|
2 |
826
29459a87d314
reasoning rules moved from /my/proj/room
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
3 @prefix : <http://projects.bigasterisk.com/room/>. |
29459a87d314
reasoning rules moved from /my/proj/room
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
4 @prefix bigast: <http://bigasterisk.com/>. |
29459a87d314
reasoning rules moved from /my/proj/room
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
5 @prefix dev: <http://projects.bigasterisk.com/device/>. |
29459a87d314
reasoning rules moved from /my/proj/room
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
6 @prefix foaf: <http://xmlns.com/foaf/0.1/> . |
29459a87d314
reasoning rules moved from /my/proj/room
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
7 @prefix env: <http://projects.bigasterisk.com/device/environment>. |
859
379cefec542e
screen out more values that change on every update
drewp <drewp@bigasterisk.com>
parents:
836
diff
changeset
|
8 @prefix math: <http://www.w3.org/2000/10/swap/math#> . |
826
29459a87d314
reasoning rules moved from /my/proj/room
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
9 |
1053 | 10 @prefix star: <http://bigasterisk.com/host/star/> . |
11 @prefix dash: <http://bigasterisk.com/host/dash/> . | |
12 @prefix slash: <http://bigasterisk.com/host/slash/> . | |
13 | |
1126
82046a1c75f3
rules updates for storage and changing
drewp <drewp@bigasterisk.com>
parents:
1089
diff
changeset
|
14 @prefix sensor: <http://bigasterisk.com/homeauto/sensor/> . |
82046a1c75f3
rules updates for storage and changing
drewp <drewp@bigasterisk.com>
parents:
1089
diff
changeset
|
15 |
1053 | 16 { ?d :deviceName "drew-phone"; :connected bigast:wifiAccessPoints . } => { :auth :near :home } . |
17 { ?d :deviceName "Kelsis-iPhone"; :connected bigast:wifiAccessPoints . } => { :auth :near :home } . | |
826
29459a87d314
reasoning rules moved from /my/proj/room
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
18 |
29459a87d314
reasoning rules moved from /my/proj/room
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
19 { env: :localHour 8 } => { env: :localHour :awakeTime } . |
29459a87d314
reasoning rules moved from /my/proj/room
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
20 { env: :localHour 9 } => { env: :localHour :awakeTime } . |
29459a87d314
reasoning rules moved from /my/proj/room
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
21 { env: :localHour 10 } => { env: :localHour :awakeTime } . |
29459a87d314
reasoning rules moved from /my/proj/room
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
22 { env: :localHour 11 } => { env: :localHour :awakeTime } . |
29459a87d314
reasoning rules moved from /my/proj/room
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
23 { env: :localHour 12 } => { env: :localHour :awakeTime } . |
29459a87d314
reasoning rules moved from /my/proj/room
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
24 { env: :localHour 13 } => { env: :localHour :awakeTime } . |
29459a87d314
reasoning rules moved from /my/proj/room
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
25 { env: :localHour 14 } => { env: :localHour :awakeTime } . |
29459a87d314
reasoning rules moved from /my/proj/room
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
26 { env: :localHour 15 } => { env: :localHour :awakeTime } . |
29459a87d314
reasoning rules moved from /my/proj/room
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
27 { env: :localHour 16 } => { env: :localHour :awakeTime } . |
29459a87d314
reasoning rules moved from /my/proj/room
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
28 { env: :localHour 17 } => { env: :localHour :awakeTime } . |
29459a87d314
reasoning rules moved from /my/proj/room
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
29 { env: :localHour 18 } => { env: :localHour :awakeTime } . |
29459a87d314
reasoning rules moved from /my/proj/room
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
30 { env: :localHour 19 } => { env: :localHour :awakeTime } . |
29459a87d314
reasoning rules moved from /my/proj/room
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
31 { env: :localHour 20 } => { env: :localHour :awakeTime } . |
29459a87d314
reasoning rules moved from /my/proj/room
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
32 { env: :localHour 21 } => { env: :localHour :awakeTime } . |
29459a87d314
reasoning rules moved from /my/proj/room
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
33 { env: :localHour 22 } => { env: :localHour :awakeTime } . |
29459a87d314
reasoning rules moved from /my/proj/room
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
34 { env: :localHour 23 } => { env: :localHour :awakeTime } . |
29459a87d314
reasoning rules moved from /my/proj/room
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
35 |
29459a87d314
reasoning rules moved from /my/proj/room
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
36 { |
29459a87d314
reasoning rules moved from /my/proj/room
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
37 :auth :near :home . |
923
4ae49c6adecb
errors and logging in reasoning
drewp <drewp@bigasterisk.com>
parents:
893
diff
changeset
|
38 dev:theaterDoorOutsideMotion :state :sustainedMotion . |
826
29459a87d314
reasoning rules moved from /my/proj/room
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
39 dev:theaterDoorOpen :state :closed . |
29459a87d314
reasoning rules moved from /my/proj/room
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
40 env: :localHour :awakeTime . |
29459a87d314
reasoning rules moved from /my/proj/room
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
41 } => { dev:theaterDoorLock :state :unlocked } . |
29459a87d314
reasoning rules moved from /my/proj/room
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
42 |
29459a87d314
reasoning rules moved from /my/proj/room
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
43 { dev:frontDoorOpen :state :closed } => { dev:frontDoorOpenIndicator :text "_" } . |
29459a87d314
reasoning rules moved from /my/proj/room
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
44 { dev:frontDoorOpen :state :open } => { dev:frontDoorOpenIndicator :text "D" } . |
29459a87d314
reasoning rules moved from /my/proj/room
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
45 |
29459a87d314
reasoning rules moved from /my/proj/room
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
46 { dev:frontDoorMotion :state :noMotion } => { |
29459a87d314
reasoning rules moved from /my/proj/room
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
47 dev:frontDoorMotionIndicator :text "_" . |
29459a87d314
reasoning rules moved from /my/proj/room
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
48 dev:frontDoorLcd :brightness 0 . |
29459a87d314
reasoning rules moved from /my/proj/room
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
49 } . |
29459a87d314
reasoning rules moved from /my/proj/room
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
50 { dev:frontDoorMotion :state :motion } => { |
29459a87d314
reasoning rules moved from /my/proj/room
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
51 dev:frontDoorMotionIndicator :text "D" . |
29459a87d314
reasoning rules moved from /my/proj/room
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
52 dev:frontDoorLcd :brightness 255 . |
29459a87d314
reasoning rules moved from /my/proj/room
drewp <drewp@bigasterisk.com>
parents:
diff
changeset
|
53 } . |
836
24a47a07ac9a
new rule to turn on bang/monitor
drewp <drewp@bigasterisk.com>
parents:
835
diff
changeset
|
54 |
859
379cefec542e
screen out more values that change on every update
drewp <drewp@bigasterisk.com>
parents:
836
diff
changeset
|
55 { :darkKey :state :press } => { |
1053 | 56 dash:monitor :powerState :off . |
859
379cefec542e
screen out more values that change on every update
drewp <drewp@bigasterisk.com>
parents:
836
diff
changeset
|
57 } . |
379cefec542e
screen out more values that change on every update
drewp <drewp@bigasterisk.com>
parents:
836
diff
changeset
|
58 |
893
bcd2d597c8e8
change cactus button to one that works. yellow button plays music
drewp <drewp@bigasterisk.com>
parents:
872
diff
changeset
|
59 { <http://projects.bigasterisk.com/room/star/button/blu> :change :down . } => |
872 | 60 { |
1053 | 61 star:slideshow :postAction star:slideshowadvance . |
62 star:slideshow :postAction <http://star:9049/effects/beep2> . | |
893
bcd2d597c8e8
change cactus button to one that works. yellow button plays music
drewp <drewp@bigasterisk.com>
parents:
872
diff
changeset
|
63 } . |
bcd2d597c8e8
change cactus button to one that works. yellow button plays music
drewp <drewp@bigasterisk.com>
parents:
872
diff
changeset
|
64 |
bcd2d597c8e8
change cactus button to one that works. yellow button plays music
drewp <drewp@bigasterisk.com>
parents:
872
diff
changeset
|
65 |
bcd2d597c8e8
change cactus button to one that works. yellow button plays music
drewp <drewp@bigasterisk.com>
parents:
872
diff
changeset
|
66 { <http://projects.bigasterisk.com/room/star/button/yel> :change :down . } => |
bcd2d597c8e8
change cactus button to one that works. yellow button plays music
drewp <drewp@bigasterisk.com>
parents:
872
diff
changeset
|
67 { |
1053 | 68 star:slideshow :postAction star:slideshowtoggleFeeder . |
69 star:slideshow :postAction <http://star:9049/effects/beep1> . | |
893
bcd2d597c8e8
change cactus button to one that works. yellow button plays music
drewp <drewp@bigasterisk.com>
parents:
872
diff
changeset
|
70 } . |
bcd2d597c8e8
change cactus button to one that works. yellow button plays music
drewp <drewp@bigasterisk.com>
parents:
872
diff
changeset
|
71 |
986
b279ca8d2894
new reasoning config for storage motion.
drewp <drewp@bigasterisk.com>
parents:
934
diff
changeset
|
72 { <http://projects.bigasterisk.com/room/barcodeScan> <http://projects.bigasterisk.com/room/read> <http://projects.bigasterisk.com/room/barcode/UPC-A/4984343881945> } => |
b279ca8d2894
new reasoning config for storage motion.
drewp <drewp@bigasterisk.com>
parents:
934
diff
changeset
|
73 { |
1053 | 74 star:slideshow :postAction <http://star:9049/effects/troyandabed> . |
986
b279ca8d2894
new reasoning config for storage motion.
drewp <drewp@bigasterisk.com>
parents:
934
diff
changeset
|
75 } . |
b279ca8d2894
new reasoning config for storage motion.
drewp <drewp@bigasterisk.com>
parents:
934
diff
changeset
|
76 |
b279ca8d2894
new reasoning config for storage motion.
drewp <drewp@bigasterisk.com>
parents:
934
diff
changeset
|
77 @prefix bed: <http://projects.bigasterisk.com/room/ariBed/> . |
b279ca8d2894
new reasoning config for storage motion.
drewp <drewp@bigasterisk.com>
parents:
934
diff
changeset
|
78 { bed:button1 :change :down . } => { |
1053 | 79 star:slideshow :postAction <http://brace:9055/starTrekLight/toggle> . |
80 star:slideshow :postAction <http://brace:9049/effects/highlight> . | |
986
b279ca8d2894
new reasoning config for storage motion.
drewp <drewp@bigasterisk.com>
parents:
934
diff
changeset
|
81 } . |
1053 | 82 { bed:button2 :change :down . } => { star:slideshow :postAction <http://brace:9049/effects/troyandabed> . } . |
83 { bed:button3 :change :down . } => { star:slideshow :postAction <http://brace:9049/effects/beep1> . } . | |
84 { bed:button4 :change :down . } => { star:slideshow :postAction <http://brace:9049/effects/beep1> . } . | |
85 { bed:button5 :change :down . } => { star:slideshow :postAction <http://brace:9049/effects/jazztrumpet> . } . | |
986
b279ca8d2894
new reasoning config for storage motion.
drewp <drewp@bigasterisk.com>
parents:
934
diff
changeset
|
86 |
934
3bb18b7d21df
reasoning actions: generalize them a bit but then add a bunch of special cases for mpd for now
drewp <drewp@bigasterisk.com>
parents:
923
diff
changeset
|
87 |
3bb18b7d21df
reasoning actions: generalize them a bit but then add a bunch of special cases for mpd for now
drewp <drewp@bigasterisk.com>
parents:
923
diff
changeset
|
88 # sound wasn't responding; waiting for other button fixes |
3bb18b7d21df
reasoning actions: generalize them a bit but then add a bunch of special cases for mpd for now
drewp <drewp@bigasterisk.com>
parents:
923
diff
changeset
|
89 # { <http://projects.bigasterisk.com/room/star/button/yel> :change :down . } => |
3bb18b7d21df
reasoning actions: generalize them a bit but then add a bunch of special cases for mpd for now
drewp <drewp@bigasterisk.com>
parents:
923
diff
changeset
|
90 # { |
1053 | 91 # star:sound :postAction <http://star:9049/sound?filename=/my/music/ubuntuone/Daft+Punk/Discovery/Harder+Better+Faster+Stronger.mp3> . |
934
3bb18b7d21df
reasoning actions: generalize them a bit but then add a bunch of special cases for mpd for now
drewp <drewp@bigasterisk.com>
parents:
923
diff
changeset
|
92 # } . |
3bb18b7d21df
reasoning actions: generalize them a bit but then add a bunch of special cases for mpd for now
drewp <drewp@bigasterisk.com>
parents:
923
diff
changeset
|
93 |
893
bcd2d597c8e8
change cactus button to one that works. yellow button plays music
drewp <drewp@bigasterisk.com>
parents:
872
diff
changeset
|
94 { <http://projects.bigasterisk.com/room/livingRoom/shuttlepro/dial> :change :up . } => { |
1053 | 95 slash:sound :postAction <http://slash:9049/volume?offset=.05&max=.6> . |
893
bcd2d597c8e8
change cactus button to one that works. yellow button plays music
drewp <drewp@bigasterisk.com>
parents:
872
diff
changeset
|
96 } . |
bcd2d597c8e8
change cactus button to one that works. yellow button plays music
drewp <drewp@bigasterisk.com>
parents:
872
diff
changeset
|
97 |
bcd2d597c8e8
change cactus button to one that works. yellow button plays music
drewp <drewp@bigasterisk.com>
parents:
872
diff
changeset
|
98 { <http://projects.bigasterisk.com/room/livingRoom/shuttlepro/dial> :change :down . } => { |
1053 | 99 slash:sound :postAction <http://slash:9049/volume?offset=-.05&max=.6> . |
872 | 100 } . |
101 | |
859
379cefec542e
screen out more values that change on every update
drewp <drewp@bigasterisk.com>
parents:
836
diff
changeset
|
102 { |
379cefec542e
screen out more values that change on every update
drewp <drewp@bigasterisk.com>
parents:
836
diff
changeset
|
103 # this won't update right, currently, since I don't let the exact |
379cefec542e
screen out more values that change on every update
drewp <drewp@bigasterisk.com>
parents:
836
diff
changeset
|
104 # idle time into the rules recalculator. This threshold should be |
379cefec542e
screen out more values that change on every update
drewp <drewp@bigasterisk.com>
parents:
836
diff
changeset
|
105 # applied upstream. |
379cefec542e
screen out more values that change on every update
drewp <drewp@bigasterisk.com>
parents:
836
diff
changeset
|
106 |
1053 | 107 dash:xidle :idleTimeMinutes ?idle . |
1004 | 108 # broken with new fuxi- needs review: ?idle math:lessThan 30 . |
859
379cefec542e
screen out more values that change on every update
drewp <drewp@bigasterisk.com>
parents:
836
diff
changeset
|
109 } => { |
379cefec542e
screen out more values that change on every update
drewp <drewp@bigasterisk.com>
parents:
836
diff
changeset
|
110 :drew :at :desk . |
379cefec542e
screen out more values that change on every update
drewp <drewp@bigasterisk.com>
parents:
836
diff
changeset
|
111 # the plan here is that as soon as we can show that I'm not at my |
379cefec542e
screen out more values that change on every update
drewp <drewp@bigasterisk.com>
parents:
836
diff
changeset
|
112 # desk (cell phone wifi, asleep, etc), power the screen off |
379cefec542e
screen out more values that change on every update
drewp <drewp@bigasterisk.com>
parents:
836
diff
changeset
|
113 } . |
934
3bb18b7d21df
reasoning actions: generalize them a bit but then add a bunch of special cases for mpd for now
drewp <drewp@bigasterisk.com>
parents:
923
diff
changeset
|
114 |
3bb18b7d21df
reasoning actions: generalize them a bit but then add a bunch of special cases for mpd for now
drewp <drewp@bigasterisk.com>
parents:
923
diff
changeset
|
115 @prefix shuttle: <http://bigasterisk.com/room/livingRoom/shuttlepro/> . |
3bb18b7d21df
reasoning actions: generalize them a bit but then add a bunch of special cases for mpd for now
drewp <drewp@bigasterisk.com>
parents:
923
diff
changeset
|
116 @prefix mpd: <http://bigasterisk.com/host/slash/mpd> . |
3bb18b7d21df
reasoning actions: generalize them a bit but then add a bunch of special cases for mpd for now
drewp <drewp@bigasterisk.com>
parents:
923
diff
changeset
|
117 |
3bb18b7d21df
reasoning actions: generalize them a bit but then add a bunch of special cases for mpd for now
drewp <drewp@bigasterisk.com>
parents:
923
diff
changeset
|
118 { ?button :state :press . ?button :playsMusic ?song } => { mpd: :startMusic ?song } . |
3bb18b7d21df
reasoning actions: generalize them a bit but then add a bunch of special cases for mpd for now
drewp <drewp@bigasterisk.com>
parents:
923
diff
changeset
|
119 # the rest of this modeling is still a mess. Handled completely by special case in reasoning.py |
3bb18b7d21df
reasoning actions: generalize them a bit but then add a bunch of special cases for mpd for now
drewp <drewp@bigasterisk.com>
parents:
923
diff
changeset
|
120 { shuttle:button12 :state :press } => { mpd: :playState :pause } . |
3bb18b7d21df
reasoning actions: generalize them a bit but then add a bunch of special cases for mpd for now
drewp <drewp@bigasterisk.com>
parents:
923
diff
changeset
|
121 { shuttle:dial :change :clockwise } => { mpd: :audioState :volumeStepUp } . |
3bb18b7d21df
reasoning actions: generalize them a bit but then add a bunch of special cases for mpd for now
drewp <drewp@bigasterisk.com>
parents:
923
diff
changeset
|
122 { shuttle:dial :change :counterclockwise } => { mpd: :audioState :volumeStepDown } . |
986
b279ca8d2894
new reasoning config for storage motion.
drewp <drewp@bigasterisk.com>
parents:
934
diff
changeset
|
123 |
1126
82046a1c75f3
rules updates for storage and changing
drewp <drewp@bigasterisk.com>
parents:
1089
diff
changeset
|
124 #{ sensor:motionStorage :seesRecently :noMotion . } => { |
82046a1c75f3
rules updates for storage and changing
drewp <drewp@bigasterisk.com>
parents:
1089
diff
changeset
|
125 # :storageCeilingLedCross :brightness 0 . |
82046a1c75f3
rules updates for storage and changing
drewp <drewp@bigasterisk.com>
parents:
1089
diff
changeset
|
126 # :storageCeilingLedLong :brightness 0 . |
82046a1c75f3
rules updates for storage and changing
drewp <drewp@bigasterisk.com>
parents:
1089
diff
changeset
|
127 #} . |
986
b279ca8d2894
new reasoning config for storage motion.
drewp <drewp@bigasterisk.com>
parents:
934
diff
changeset
|
128 |
1126
82046a1c75f3
rules updates for storage and changing
drewp <drewp@bigasterisk.com>
parents:
1089
diff
changeset
|
129 { sensor:motionStorage :seesRecently :motion . } => { |
1081 | 130 :storageCeilingLedCross :brightness 1 . |
131 :storageCeilingLedLong :brightness 1 . | |
986
b279ca8d2894
new reasoning config for storage motion.
drewp <drewp@bigasterisk.com>
parents:
934
diff
changeset
|
132 } . |
1052 | 133 |
1126
82046a1c75f3
rules updates for storage and changing
drewp <drewp@bigasterisk.com>
parents:
1089
diff
changeset
|
134 #{ sensor:motionStorage :sees :motionStart . } => { |
82046a1c75f3
rules updates for storage and changing
drewp <drewp@bigasterisk.com>
parents:
1089
diff
changeset
|
135 # :storageCeilingLedCross :brightness 1 . |
82046a1c75f3
rules updates for storage and changing
drewp <drewp@bigasterisk.com>
parents:
1089
diff
changeset
|
136 # :storageCeilingLedLong :brightness 1 . |
82046a1c75f3
rules updates for storage and changing
drewp <drewp@bigasterisk.com>
parents:
1089
diff
changeset
|
137 #} . |
1056
d2007482aec5
start sending oneshot events from some devices
drewp <drewp@bigasterisk.com>
parents:
1053
diff
changeset
|
138 |
1052 | 139 @prefix bed: <http://bigasterisk.com/homeauto/sensor/bed/> . |
140 | |
1056
d2007482aec5
start sending oneshot events from some devices
drewp <drewp@bigasterisk.com>
parents:
1053
diff
changeset
|
141 { bed:greenButton :buttonState :press } => { |
1081 | 142 :headboardWhite :brightness 0.0 . |
1126
82046a1c75f3
rules updates for storage and changing
drewp <drewp@bigasterisk.com>
parents:
1089
diff
changeset
|
143 :anim1 :position :end . |
1052 | 144 } . |
145 | |
1083
c5b61f943061
try a 2-mode rule for redButton, but this can't work as-is
drewp <drewp@bigasterisk.com>
parents:
1082
diff
changeset
|
146 { bed:redButton :buttonState :press . :headboardWhite :brightness 0.0 . } => { |
1089
cb7fa2f30df9
rules become simple-looking again; fix the ambiguity in memory after loading them.
drewp <drewp@bigasterisk.com>
parents:
1088
diff
changeset
|
147 :headboardWhite :brightness 0.2 . |
1083
c5b61f943061
try a 2-mode rule for redButton, but this can't work as-is
drewp <drewp@bigasterisk.com>
parents:
1082
diff
changeset
|
148 } . |
c5b61f943061
try a 2-mode rule for redButton, but this can't work as-is
drewp <drewp@bigasterisk.com>
parents:
1082
diff
changeset
|
149 |
c5b61f943061
try a 2-mode rule for redButton, but this can't work as-is
drewp <drewp@bigasterisk.com>
parents:
1082
diff
changeset
|
150 { bed:redButton :buttonState :press . :headboardWhite :brightness 0.2 . } => { |
1089
cb7fa2f30df9
rules become simple-looking again; fix the ambiguity in memory after loading them.
drewp <drewp@bigasterisk.com>
parents:
1088
diff
changeset
|
151 :headboardWhite :brightness 1 . |
1059
faf1f8677a91
pi device support for motionStart edge trigger
drewp <drewp@bigasterisk.com>
parents:
1056
diff
changeset
|
152 } . |
faf1f8677a91
pi device support for motionStart edge trigger
drewp <drewp@bigasterisk.com>
parents:
1056
diff
changeset
|
153 |
faf1f8677a91
pi device support for motionStart edge trigger
drewp <drewp@bigasterisk.com>
parents:
1056
diff
changeset
|
154 @prefix sensor: <http://bigasterisk.com/homeauto/sensor/> . |
faf1f8677a91
pi device support for motionStart edge trigger
drewp <drewp@bigasterisk.com>
parents:
1056
diff
changeset
|
155 { sensor:buttonAriBed :buttonState :press } => { |
faf1f8677a91
pi device support for motionStart edge trigger
drewp <drewp@bigasterisk.com>
parents:
1056
diff
changeset
|
156 :starTrekLight :brightness 0.0 . |
faf1f8677a91
pi device support for motionStart edge trigger
drewp <drewp@bigasterisk.com>
parents:
1056
diff
changeset
|
157 } . |
faf1f8677a91
pi device support for motionStart edge trigger
drewp <drewp@bigasterisk.com>
parents:
1056
diff
changeset
|
158 |
1082
4bbc4fea343c
updates to changingtable motion rules
drewp <drewp@bigasterisk.com>
parents:
1081
diff
changeset
|
159 { sensor:motionChanging :seesRecently30 :noMotion } => { |
1059
faf1f8677a91
pi device support for motionStart edge trigger
drewp <drewp@bigasterisk.com>
parents:
1056
diff
changeset
|
160 :changingWhite :brightness 0.0 . |
faf1f8677a91
pi device support for motionStart edge trigger
drewp <drewp@bigasterisk.com>
parents:
1056
diff
changeset
|
161 } . |
faf1f8677a91
pi device support for motionStart edge trigger
drewp <drewp@bigasterisk.com>
parents:
1056
diff
changeset
|
162 |
1082
4bbc4fea343c
updates to changingtable motion rules
drewp <drewp@bigasterisk.com>
parents:
1081
diff
changeset
|
163 { sensor:motionChanging :seesRecently30 :motion } => { |
4bbc4fea343c
updates to changingtable motion rules
drewp <drewp@bigasterisk.com>
parents:
1081
diff
changeset
|
164 :changingWhite :brightness 0.3 . |
1059
faf1f8677a91
pi device support for motionStart edge trigger
drewp <drewp@bigasterisk.com>
parents:
1056
diff
changeset
|
165 } . |
faf1f8677a91
pi device support for motionStart edge trigger
drewp <drewp@bigasterisk.com>
parents:
1056
diff
changeset
|
166 |
1126
82046a1c75f3
rules updates for storage and changing
drewp <drewp@bigasterisk.com>
parents:
1089
diff
changeset
|
167 { sensor:motionChanging :sees :motionStart90 . dev:calendar :twilight :daytime .} => { |
82046a1c75f3
rules updates for storage and changing
drewp <drewp@bigasterisk.com>
parents:
1089
diff
changeset
|
168 :changingCam :grab <http://bang:9057/changing-day.jpg> . |
82046a1c75f3
rules updates for storage and changing
drewp <drewp@bigasterisk.com>
parents:
1089
diff
changeset
|
169 } . |
82046a1c75f3
rules updates for storage and changing
drewp <drewp@bigasterisk.com>
parents:
1089
diff
changeset
|
170 |
82046a1c75f3
rules updates for storage and changing
drewp <drewp@bigasterisk.com>
parents:
1089
diff
changeset
|
171 { sensor:motionChanging :sees :motionStart90 . dev:calendar :twilight :withinTwilight .} => { |
82046a1c75f3
rules updates for storage and changing
drewp <drewp@bigasterisk.com>
parents:
1089
diff
changeset
|
172 :changingCam :grab <http://bang:9057/changing-night.jpg> . |
1069 | 173 } . |
174 | |
175 { :bookSwitch :buttonState :press . :livingRoomLamp1 :brightness 0.0 . } => { | |
1089
cb7fa2f30df9
rules become simple-looking again; fix the ambiguity in memory after loading them.
drewp <drewp@bigasterisk.com>
parents:
1088
diff
changeset
|
176 :livingRoomLamp1 :brightness 1.0 . |
cb7fa2f30df9
rules become simple-looking again; fix the ambiguity in memory after loading them.
drewp <drewp@bigasterisk.com>
parents:
1088
diff
changeset
|
177 :livingRoomLamp2 :brightness 1.0 . |
cb7fa2f30df9
rules become simple-looking again; fix the ambiguity in memory after loading them.
drewp <drewp@bigasterisk.com>
parents:
1088
diff
changeset
|
178 } . |
1069 | 179 { :bookSwitch :buttonState :press . :livingRoomLamp1 :brightness 1.0 . } => { |
1089
cb7fa2f30df9
rules become simple-looking again; fix the ambiguity in memory after loading them.
drewp <drewp@bigasterisk.com>
parents:
1088
diff
changeset
|
180 :livingRoomLamp1 :brightness 0 . |
cb7fa2f30df9
rules become simple-looking again; fix the ambiguity in memory after loading them.
drewp <drewp@bigasterisk.com>
parents:
1088
diff
changeset
|
181 :livingRoomLamp2 :brightness 0 . |
cb7fa2f30df9
rules become simple-looking again; fix the ambiguity in memory after loading them.
drewp <drewp@bigasterisk.com>
parents:
1088
diff
changeset
|
182 } . |
1081 | 183 |
1089
cb7fa2f30df9
rules become simple-looking again; fix the ambiguity in memory after loading them.
drewp <drewp@bigasterisk.com>
parents:
1088
diff
changeset
|
184 |
1126
82046a1c75f3
rules updates for storage and changing
drewp <drewp@bigasterisk.com>
parents:
1089
diff
changeset
|
185 |
82046a1c75f3
rules updates for storage and changing
drewp <drewp@bigasterisk.com>
parents:
1089
diff
changeset
|
186 { <http://bigasterisk.com/homeauto/sensor/motionGarageDoorInside> :seesRecently :noMotion . } => { |
82046a1c75f3
rules updates for storage and changing
drewp <drewp@bigasterisk.com>
parents:
1089
diff
changeset
|
187 :garageOverhead :brightness 0 . |
82046a1c75f3
rules updates for storage and changing
drewp <drewp@bigasterisk.com>
parents:
1089
diff
changeset
|
188 } . |
82046a1c75f3
rules updates for storage and changing
drewp <drewp@bigasterisk.com>
parents:
1089
diff
changeset
|
189 |
82046a1c75f3
rules updates for storage and changing
drewp <drewp@bigasterisk.com>
parents:
1089
diff
changeset
|
190 { <http://bigasterisk.com/homeauto/sensor/motionGarageDoorInside> :seesRecently :motion . } => { |
82046a1c75f3
rules updates for storage and changing
drewp <drewp@bigasterisk.com>
parents:
1089
diff
changeset
|
191 :garageOverhead :brightness 1 . |
82046a1c75f3
rules updates for storage and changing
drewp <drewp@bigasterisk.com>
parents:
1089
diff
changeset
|
192 } . |
82046a1c75f3
rules updates for storage and changing
drewp <drewp@bigasterisk.com>
parents:
1089
diff
changeset
|
193 |
82046a1c75f3
rules updates for storage and changing
drewp <drewp@bigasterisk.com>
parents:
1089
diff
changeset
|
194 { sensor:motionBed :sees :motion . } => { :anim1 :playback :start . } . |
82046a1c75f3
rules updates for storage and changing
drewp <drewp@bigasterisk.com>
parents:
1089
diff
changeset
|
195 |