annotate service/reasoning/input/devices.n3 @ 1402:5373c5cc03c4

device configs Ignore-this: 6e052d5533da601f72c6e7017b232e8c darcs-hash:b179d80e8a1c78f71d851b78f2e54ab781d9d1e7
author drewp <drewp@bigasterisk.com>
date Tue, 23 Jul 2019 10:16:14 -0700
parents
children 4bee03b708c7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1402
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
1 @prefix : <http://projects.bigasterisk.com/room/>.
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
2 @prefix lights: <http://projects.bigasterisk.com/room/lights/>.
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
3 @prefix device: <http://projects.bigasterisk.com/device/>.
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
4 @prefix control: <http://projects.bigasterisk.com/control/>.
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
5 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
6 @prefix slashport: <http://slash.bigasterisk.com/parport/3bc#> .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
7 @prefix port: <http://bang.bigasterisk.com/parport/parport0#> .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
8 @prefix onewire: <http://bigasterisk.com/onewire/> .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
9 @prefix cmd: <http://bigasterisk.com/magma/cmd/> .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
10 @prefix bang1: <http://bigasterisk.com/bang/arduino/pin/> .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
11 @prefix cl: <http://bigasterisk.com/ns/command/v1#> .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
12 @prefix bang: <http://bigasterisk.com/host/bang/> .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
13
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
14 :putUrl rdfs:comment "this pin can be set by calling PUT on the given url with a body of '0' or '1'" .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
15 # no longer parport; needs upgrade to whatever the arduino pin is:
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
16 #device:frontLights a :ParportPin; :putUrl "http://slash:9014/otherBit?bit=1" .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
17
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
18 device:heater :putUrl "http://bang:9056/pin/d4" .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
19
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
20 # these are the bedroom red light, untested
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
21 bang1:d7 :putUrl "http://bang:9056/pin/d7" .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
22 bang1:d8 :putUrl "http://bang:9056/pin/d8" .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
23
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
24 :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." .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
25
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
26 port:pin3 rdfs:label "heater power" .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
27
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
28 # .1 second pulse was too short for redlight, once
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
29
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
30 device:deckLightOff :putUrl "http://bang:9056/pin/d5"; rdfs:label "outdoor off (x1)"; :pulse ".4" .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
31 device:deckLightOn :putUrl "http://bang:9056/pin/d6"; rdfs:label "outdoor on (x2)"; :pulse ".4" .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
32
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
33 cmd:deckLightOff :oneShot device:deckLightOff .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
34 cmd:deckLightOn :oneShot device:deckLightOn .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
35
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
36 #port:pin_d7 rdfs:label "bedroomred off? (y1)"; :pulse ".8" .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
37 cmd:bedroomRedLightOff :oneShot device:bedroomRedLightOff .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
38 #port:pin_d8 rdfs:label "bedroomred on? (y2)"; :pulse ".8" .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
39 cmd:bedroomRedLightOn :oneShot device:bedroomRedLightOn .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
40
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
41 port:unfinished1 :putUrl "http://bang:9056/pin/d12"; rdfs:label "heater sense" .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
42
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
43 device:frontLights rdfs:label "front light" .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
44 cmd:frontLightOff :clearPin device:frontLights .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
45 cmd:frontLightOn :setPin device:frontLights .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
46
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
47 #drew's phone = friendly phone
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
48 #kelsi phone = friendly phone
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
49 #bluetooth senses friendly phone -> all doors are unlocked
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
50 #all locks = device:lock1
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
51 :drewsPhone :bluetoothAddr "...." .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
52
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
53 # maybe each tool should have its own little graph, and it announces
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
54 # changes to that graph. the listener tools make a combined-graph of
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
55 # the sources, and draw their conclusions on that
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
56
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
57 onewire:addr104F718D00080038 :graphiteName "sens1"; rdfs:label "downstairsCeiling" .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
58 onewire:addr1014958D0008002B :graphiteName "sens2"; rdfs:label "downstairsFloor" .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
59 onewire:addr10CB6CBE0008005E :graphiteName "sens3"; rdfs:label "bedroom" .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
60 onewire:addr109AA2BE000800C7 :graphiteName "sens4"; rdfs:label "livingRoom" .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
61
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
62 device:theaterDoorOutsideMotion rdfs:label "theater door outside motion" .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
63 device:theaterDoorOpen rdfs:label "theater door open" .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
64
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
65 device:theaterDoorLock rdfs:label "theater door lock";
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
66 :putUrl "http://bang:9056/pin/d3"; :zeroValue "0".
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
67
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
68 :unlocked :putValue "1" .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
69 :on :putValue "on" .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
70 :off :putValue "off" .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
71
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
72
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
73 <http://bigasterisk.com/host/bang/monitor> :putUrl "http://bang:9095/monitor"; :zeroValue "off" .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
74 <http://bigasterisk.com/host/dash/monitor> :putUrl "http://dash:9095/monitor" .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
75 <http://bigasterisk.com/host/frontdoor/monitor> :putUrl "http://frontdoor:9095/monitor" .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
76
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
77 device:heater cl:valueMapping
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
78 [cl:value cl:on; cl:putUrl <http://bang:9056/pin/d4>; cl:putBody "1" ],
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
79 [cl:value cl:off; cl:putUrl <http://bang:9056/pin/d4>; cl:putBody "0" ] .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
80
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
81 device:frontLight cl:valueMapping
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
82 [cl:value cl:on; cl:putUrl <http://slash:9080/yardLight>; cl:putBody "true" ],
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
83 [cl:value cl:off; cl:putUrl <http://slash:9080/yardLight>; cl:putBody "false" ] .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
84
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
85 :storageCeilingLedCross
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
86 :putUrl <http://bang:9059/output?s=http://projects.bigasterisk.com/room/storageCeilingLedCross&p=http://projects.bigasterisk.com/room/brightness>;
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
87 :zeroValue 0.0 .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
88
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
89 :storageCeilingLedLong
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
90 :putUrl <http://bang:9059/output?s=http://projects.bigasterisk.com/room/storageCeilingLedLong&p=http://projects.bigasterisk.com/room/brightness>;
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
91 :zeroValue 0.0 .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
92
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
93 :garageOverhead
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
94 :putUrl <http://garage.vpn-home.bigasterisk.com:9059/output?s=http://projects.bigasterisk.com/room/garageOverhead&p=http://projects.bigasterisk.com/room/brightness> .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
95 :headboardWhite
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
96 :putUrl <http://bed.vpn-home.bigasterisk.com:9059/output?s=http://projects.bigasterisk.com/room/headboardWhite&p=http://projects.bigasterisk.com/room/brightness> .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
97 :bedLedStrip
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
98 :putUrl <http://bed.vpn-home.bigasterisk.com:9059/output?s=http://projects.bigasterisk.com/room/bedLedStrip&p=http://projects.bigasterisk.com/room/color> .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
99
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
100 :starTrekLight
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
101 :putUrl <http://frontbed:9059/output?s=http://projects.bigasterisk.com/room/starTrekLight&p=http://projects.bigasterisk.com/room/brightness> .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
102
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
103 :kitchenLight
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
104 :putUrl <http://bang:10008/output?s=http://projects.bigasterisk.com/room/kitchenLight&p=http://projects.bigasterisk.com/room/brightness> .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
105
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
106 :kitchenCounterLight
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
107 :putUrl <http://bang:10008/output?s=http://projects.bigasterisk.com/room/kitchenCounterLight&p=http://projects.bigasterisk.com/room/brightness> .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
108
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
109 :changingWhite
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
110 :putUrl <http://changing:9059/output?s=http://projects.bigasterisk.com/room/changingWhite&p=http://projects.bigasterisk.com/room/brightness> .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
111
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
112 :changingCamPost a :OneShotPost; :subject :changingCam; :predicate :grab .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
113 bang: a :OneShotPost; :subject bang:; :predicate :postAction .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
114
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
115 :livingRoomLamp1
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
116 :putUrl <http://living:9059/output?s=http://projects.bigasterisk.com/room/livingRoomLamp1&p=http://projects.bigasterisk.com/room/brightness> .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
117
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
118 :livingRoomLamp2
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
119 :putUrl <http://living:9059/output?s=http://projects.bigasterisk.com/room/livingRoomLamp2&p=http://projects.bigasterisk.com/room/brightness> .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
120
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
121 :loftDeskStrip
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
122 :putUrl <http://frontbed:9059/output?s=http://projects.bigasterisk.com/room/loftDeskStrip&p=http://projects.bigasterisk.com/room/x> .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
123
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
124
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
125 :frontDoorOled :putUrl <http://frontdoor:10013/output>; :putPredicate :state .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
126 :frontWindow :putPredicate :line1; :putUrl <http://bang:10008/output> .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
127 :frontWindow :putPredicate :line2; :putUrl <http://bang:10008/output> .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
128 :frontWindow :putPredicate :line3; :putUrl <http://bang:10008/output> .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
129 :frontWindow :putPredicate :line4; :putUrl <http://bang:10008/output> .
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
130
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
131 # newer style, with distinct :putState.
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
132 :frontDoorLock
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
133 :matchPredicate :putState;
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
134 :putUrl <http://bang:10011/output>;
5373c5cc03c4 device configs
drewp <drewp@bigasterisk.com>
parents:
diff changeset
135 :putPredicate :state .