Mercurial > code > home > repos > homeauto
changeset 1287:5f522c2d18bf
delete or disable old rules
Ignore-this: e195afab6aae2ad708af49abeba8c8b7
darcs-hash:666447716246b055f54a15e7bc23aa1ed2cbf54c
author | drewp <drewp@bigasterisk.com> |
---|---|
date | Sun, 21 Apr 2019 00:05:28 -0700 |
parents | 06e092390911 |
children | f4ce7989d25c |
files | service/reasoning/rules.n3 |
diffstat | 1 files changed, 22 insertions(+), 86 deletions(-) [+] |
line wrap: on
line diff
--- a/service/reasoning/rules.n3 Sun Apr 21 00:04:32 2019 -0700 +++ b/service/reasoning/rules.n3 Sun Apr 21 00:05:28 2019 -0700 @@ -34,93 +34,29 @@ { env: :localHour 22 } => { env: :localHour :awakeTime } . { env: :localHour 23 } => { env: :localHour :awakeTime } . -{ - :auth :near :home . - dev:theaterDoorOutsideMotion :state :sustainedMotion . - dev:theaterDoorOpen :state :closed . - env: :localHour :awakeTime . -} => { dev:theaterDoorLock :state :unlocked } . - -{ dev:frontDoorOpen :state :closed } => { dev:frontDoorOpenIndicator :text "_" } . -{ dev:frontDoorOpen :state :open } => { dev:frontDoorOpenIndicator :text "D" } . - -{ dev:frontDoorMotion :state :noMotion } => { - dev:frontDoorMotionIndicator :text "_" . - dev:frontDoorLcd :brightness 0 . -} . -{ dev:frontDoorMotion :state :motion } => { - dev:frontDoorMotionIndicator :text "D" . - dev:frontDoorLcd :brightness 255 . -} . - -{ :darkKey :state :press } => { - dash:monitor :powerState :off . -} . - -{ <http://projects.bigasterisk.com/room/star/button/blu> :change :down . } => -{ - star:slideshow :postAction star:slideshowadvance . - star:slideshow :postAction <http://star:9049/effects/beep2> . -} . - - -{ <http://projects.bigasterisk.com/room/star/button/yel> :change :down . } => -{ - star:slideshow :postAction star:slideshowtoggleFeeder . - star:slideshow :postAction <http://star:9049/effects/beep1> . -} . - -{ <http://projects.bigasterisk.com/room/barcodeScan> <http://projects.bigasterisk.com/room/read> <http://projects.bigasterisk.com/room/barcode/UPC-A/4984343881945> } => -{ - star:slideshow :postAction <http://star:9049/effects/troyandabed> . -} . +#{ +# # this won't update right, currently, since I don't let the exact +# # idle time into the rules recalculator. This threshold should be +# # applied upstream. +# +# dash:xidle :idleTimeMinutes ?idle . +# # broken with new fuxi- needs review: ?idle math:lessThan 30 . +#} => { +# :drew :at :desk . +# # the plan here is that as soon as we can show that I'm not at my +# # desk (cell phone wifi, asleep, etc), power the screen off +#} . +# +#@prefix shuttle: <http://bigasterisk.com/room/livingRoom/shuttlepro/> . +#@prefix mpd: <http://bigasterisk.com/host/slash/mpd> . +# +#{ ?button :state :press . ?button :playsMusic ?song } => { mpd: :startMusic ?song } . +## the rest of this modeling is still a mess. Handled completely by special case in reasoning.py +#{ shuttle:button12 :state :press } => { mpd: :playState :pause } . +#{ shuttle:dial :change :clockwise } => { mpd: :audioState :volumeStepUp } . +#{ shuttle:dial :change :counterclockwise } => { mpd: :audioState :volumeStepDown } . +# -@prefix bed: <http://projects.bigasterisk.com/room/ariBed/> . -{ bed:button1 :change :down . } => { - star:slideshow :postAction <http://brace:9055/starTrekLight/toggle> . - star:slideshow :postAction <http://brace:9049/effects/highlight> . -} . -{ bed:button2 :change :down . } => { star:slideshow :postAction <http://brace:9049/effects/troyandabed> . } . -{ bed:button3 :change :down . } => { star:slideshow :postAction <http://brace:9049/effects/beep1> . } . -{ bed:button4 :change :down . } => { star:slideshow :postAction <http://brace:9049/effects/beep1> . } . -{ bed:button5 :change :down . } => { star:slideshow :postAction <http://brace:9049/effects/jazztrumpet> . } . - - -# sound wasn't responding; waiting for other button fixes -# { <http://projects.bigasterisk.com/room/star/button/yel> :change :down . } => -# { -# star:sound :postAction <http://star:9049/sound?filename=/my/music/ubuntuone/Daft+Punk/Discovery/Harder+Better+Faster+Stronger.mp3> . -# } . - -{ <http://projects.bigasterisk.com/room/livingRoom/shuttlepro/dial> :change :up . } => { - slash:sound :postAction <http://slash:9049/volume?offset=.05&max=.6> . -} . - -{ <http://projects.bigasterisk.com/room/livingRoom/shuttlepro/dial> :change :down . } => { - slash:sound :postAction <http://slash:9049/volume?offset=-.05&max=.6> . -} . - -{ - # this won't update right, currently, since I don't let the exact - # idle time into the rules recalculator. This threshold should be - # applied upstream. - - dash:xidle :idleTimeMinutes ?idle . - # broken with new fuxi- needs review: ?idle math:lessThan 30 . -} => { - :drew :at :desk . - # the plan here is that as soon as we can show that I'm not at my - # desk (cell phone wifi, asleep, etc), power the screen off -} . - -@prefix shuttle: <http://bigasterisk.com/room/livingRoom/shuttlepro/> . -@prefix mpd: <http://bigasterisk.com/host/slash/mpd> . - -{ ?button :state :press . ?button :playsMusic ?song } => { mpd: :startMusic ?song } . -# the rest of this modeling is still a mess. Handled completely by special case in reasoning.py -{ shuttle:button12 :state :press } => { mpd: :playState :pause } . -{ shuttle:dial :change :clockwise } => { mpd: :audioState :volumeStepUp } . -{ shuttle:dial :change :counterclockwise } => { mpd: :audioState :volumeStepDown } . #{ sensor:motionStorage :seesRecently :noMotion . } => { # :storageCeilingLedCross :brightness 0 .