767
|
1 @prefix : <http://projects.bigasterisk.com/room/> .
|
|
2 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
|
3 @prefix fr: <http://bigasterisk.com/foaf/> .
|
|
4 @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
|
5
|
|
6 :mqttConnectedStatusMap a :ValueMap;
|
|
7 :map [:from "offline"; :to :Offline],
|
|
8 [:from "online"; :to :Online] .
|
|
9
|
|
10 :frontDoorLockStatus a :MqttStatementSource;
|
|
11 :mqttTopic ("frontdoorlock" "status");
|
|
12
|
|
13 :parser :mqttConnectedStatusMap;
|
|
14
|
|
15 :graphStatements [
|
|
16 :outputPredicate :connectedStatus
|
|
17 ]
|
|
18
|
|
19 .
|
|
20
|
1688
|
21 { ?msg :body "online" . } => { ?msg :onlineTerm :Online . } .
|
|
22 { ?msg :body "offline" . } => { ?msg :onlineTerm :Offline . } .
|
|
23
|
|
24
|
|
25 {
|
|
26 ?msg a :MqttMessage ;
|
|
27 :topic ( "frontdoorlock" "status" );
|
|
28 :onlineTerm ?onlinenessStr . } => {
|
|
29 :frontDoorLockStatus :connectedStatus ?onlineness .
|
|
30 } .
|
|
31
|