# HG changeset patch # User drewp # Date 1563955949 25200 # Node ID a02b1b08f24fc33d4b691f59835611fe20027301 # Parent 1a277dba4cdc374e42b7970f27c962cabaf01c33 clean up very old reasoning configs Ignore-this: 29c9a3145a640c8a71d4add8ee219fae darcs-hash:64a8a52854f34fc3ae932b796552795df31be1bb diff -r 1a277dba4cdc -r a02b1b08f24f service/reasoning/input/devices.n3 --- a/service/reasoning/input/devices.n3 Wed Jul 24 01:03:21 2019 -0700 +++ b/service/reasoning/input/devices.n3 Wed Jul 24 01:12:29 2019 -0700 @@ -1,69 +1,10 @@ @prefix : . -@prefix lights: . @prefix device: . -@prefix control: . @prefix rdfs: . -@prefix slashport: . -@prefix port: . @prefix onewire: . -@prefix cmd: . -@prefix bang1: . -@prefix cl: . @prefix bang: . - -:putUrl rdfs:comment "this pin can be set by calling PUT on the given url with a body of '0' or '1'" . -# no longer parport; needs upgrade to whatever the arduino pin is: -#device:frontLights a :ParportPin; :putUrl "http://slash:9014/otherBit?bit=1" . - -device:heater :putUrl "http://bang:9056/pin/d4" . - -# these are the bedroom red light, untested -bang1:d7 :putUrl "http://bang:9056/pin/d7" . -bang1:d8 :putUrl "http://bang:9056/pin/d8" . - -:pulse rdfs:comment "number of seconds this pin should stay high when it is set to 1. Then the pin automatically goes back to 0." . - -port:pin3 rdfs:label "heater power" . - -# .1 second pulse was too short for redlight, once - -device:deckLightOff :putUrl "http://bang:9056/pin/d5"; rdfs:label "outdoor off (x1)"; :pulse ".4" . -device:deckLightOn :putUrl "http://bang:9056/pin/d6"; rdfs:label "outdoor on (x2)"; :pulse ".4" . +@prefix reasoning: . -cmd:deckLightOff :oneShot device:deckLightOff . -cmd:deckLightOn :oneShot device:deckLightOn . - -#port:pin_d7 rdfs:label "bedroomred off? (y1)"; :pulse ".8" . -cmd:bedroomRedLightOff :oneShot device:bedroomRedLightOff . -#port:pin_d8 rdfs:label "bedroomred on? (y2)"; :pulse ".8" . -cmd:bedroomRedLightOn :oneShot device:bedroomRedLightOn . - -port:unfinished1 :putUrl "http://bang:9056/pin/d12"; rdfs:label "heater sense" . - -device:frontLights rdfs:label "front light" . -cmd:frontLightOff :clearPin device:frontLights . -cmd:frontLightOn :setPin device:frontLights . - -#drew's phone = friendly phone -#kelsi phone = friendly phone -#bluetooth senses friendly phone -> all doors are unlocked -#all locks = device:lock1 -:drewsPhone :bluetoothAddr "...." . - -# maybe each tool should have its own little graph, and it announces -# changes to that graph. the listener tools make a combined-graph of -# the sources, and draw their conclusions on that - -onewire:addr104F718D00080038 :graphiteName "sens1"; rdfs:label "downstairsCeiling" . -onewire:addr1014958D0008002B :graphiteName "sens2"; rdfs:label "downstairsFloor" . -onewire:addr10CB6CBE0008005E :graphiteName "sens3"; rdfs:label "bedroom" . -onewire:addr109AA2BE000800C7 :graphiteName "sens4"; rdfs:label "livingRoom" . - -device:theaterDoorOutsideMotion rdfs:label "theater door outside motion" . -device:theaterDoorOpen rdfs:label "theater door open" . - -device:theaterDoorLock rdfs:label "theater door lock"; - :putUrl "http://bang:9056/pin/d3"; :zeroValue "0". :unlocked :putValue "1" . :on :putValue "on" . @@ -74,14 +15,6 @@ :putUrl "http://dash:9095/monitor" . :putUrl "http://frontdoor:9095/monitor" . -device:heater cl:valueMapping - [cl:value cl:on; cl:putUrl ; cl:putBody "1" ], - [cl:value cl:off; cl:putUrl ; cl:putBody "0" ] . - -device:frontLight cl:valueMapping - [cl:value cl:on; cl:putUrl ; cl:putBody "true" ], - [cl:value cl:off; cl:putUrl ; cl:putBody "false" ] . - :storageCeilingLedCross :putUrl ; :zeroValue 0.0 . @@ -119,8 +52,8 @@ :putUrl . :loftDeskStrip - :putUrl . - + :putUrl ; :putPredicate :x . +#reasoning:defaultOutput reasoning:default [ :subject :loftDeskStrip; :predicate :x; :defaultObject 0.0 ] . :frontDoorOled :putUrl ; :putPredicate :state . :frontWindow :putPredicate :line1; :putUrl . diff -r 1a277dba4cdc -r a02b1b08f24f service/reasoning/input/startup.n3 --- a/service/reasoning/input/startup.n3 Wed Jul 24 01:03:21 2019 -0700 +++ b/service/reasoning/input/startup.n3 Wed Jul 24 01:12:29 2019 -0700 @@ -2,40 +2,6 @@ @prefix rdfs: . @prefix fr: . -# Note that turning off a source in here doesn't stop incoming oneshot -# requests (but it could, if we got continuous graphs such that -# oneshot was just a sequence of updates and not a reverse-direction -# request). - -# UNUSED- see sse_collector - is :source of :reasoning; rdfs:label "bang arduino" . - is :source of :reasoning; rdfs:label "garage pi" . - is :source of :reasoning; rdfs:label "kitchen pi" . - is :source of :reasoning; rdfs:label "living room pi" . - is :source of :reasoning; rdfs:label "slash arduino" . - is :source of :reasoning; rdfs:label "bed pi" . - is :source of :reasoning; rdfs:label "brace arduino" . - is :source of :reasoning; rdfs:label "changing pi" . - is :source of :reasoning; rdfs:label "frontdoor pi" . - is :source of :reasoning; rdfs:label "env" . - - is :source of :reasoning; rdfs:label "wifi usage" . - is :source of :reasoning; rdfs:label "trails" . - - is :source of :reasoning; rdfs:label "dash monitor" . - is :source of :reasoning; rdfs:label "dash x idle" . - is :source of :reasoning; rdfs:label "brace monitor" . - is :source of :reasoning; rdfs:label "brace x idle" . - is :source of :reasoning; rdfs:label "slash monitor" . - is :source of :reasoning; rdfs:label "slash x idle" .# - is :source of :reasoning; rdfs:label "frontdoor monitor" . - is :source of :reasoning; rdfs:label "frontdoor x idle" . - - -# not built yet -# is :source of :reasoning; rdfs:label "bang monitor" . -# is :source of :reasoning; rdfs:label "changing camera" . - [ a :OneShotPost; :subject ; :predicate :postAction ] . [ a :OneShotPost; :subject ; :predicate :postAction ] .