Mercurial > code > home > repos > homeauto
comparison service/reasoning/reasoning.py @ 351:7716b1810d6c
reasoning & collector move into docker images
Ignore-this: 67e97d307eba96791cbe77e57c57ad57
author | drewp@bigasterisk.com |
---|---|
date | Mon, 03 Sep 2018 00:45:34 -0700 |
parents | 8db492695a51 |
children | 79d041273e26 |
comparison
equal
deleted
inserted
replaced
350:a380561fd8a8 | 351:7716b1810d6c |
---|---|
12 unlock the door when the door's motion sensor is activated' | 12 unlock the door when the door's motion sensor is activated' |
13 | 13 |
14 When do we gather? The services should be able to trigger us, perhaps | 14 When do we gather? The services should be able to trigger us, perhaps |
15 with PSHB, that their graph has changed. | 15 with PSHB, that their graph has changed. |
16 """ | 16 """ |
17 | |
18 | |
19 from crochet import no_setup | 17 from crochet import no_setup |
20 no_setup() | 18 no_setup() |
21 | 19 |
22 | |
23 import json, time, traceback, sys | 20 import json, time, traceback, sys |
24 from logging import getLogger, DEBUG, WARN | 21 from logging import getLogger, DEBUG, WARN |
22 sys.path.append('/opt') # docker is putting lib/ here | |
25 | 23 |
26 from colorlog import ColoredFormatter | 24 from colorlog import ColoredFormatter |
27 from docopt import docopt | 25 from docopt import docopt |
28 from rdflib import Namespace, Literal, RDF, Graph | 26 from rdflib import Namespace, Literal, RDF, Graph |
29 from twisted.internet import reactor, task | 27 from twisted.internet import reactor, task |
36 from inference import infer, readRules | 34 from inference import infer, readRules |
37 from actions import Actions | 35 from actions import Actions |
38 from inputgraph import InputGraph | 36 from inputgraph import InputGraph |
39 from escapeoutputstatements import unquoteOutputStatements | 37 from escapeoutputstatements import unquoteOutputStatements |
40 | 38 |
41 sys.path.append("../../lib") | |
42 from logsetup import log | 39 from logsetup import log |
43 | 40 |
44 | 41 |
45 ROOM = Namespace("http://projects.bigasterisk.com/room/") | 42 ROOM = Namespace("http://projects.bigasterisk.com/room/") |
46 DEV = Namespace("http://projects.bigasterisk.com/device/") | 43 DEV = Namespace("http://projects.bigasterisk.com/device/") |