Mercurial > code > home > repos > homeauto
comparison service/piNode/piNode.py @ 1035:f01d9892ed79
update arduinoNode to support streamed graph output
Ignore-this: fa35d1fae5b0e411b167650550c3e77d
darcs-hash:c22c59acf2d4bbabfc467085f146a5de72b19f03
author | drewp <drewp@bigasterisk.com> |
---|---|
date | Thu, 28 Jan 2016 02:24:32 -0800 |
parents | 9328df09f679 |
children | 4ebb5cc30002 |
comparison
equal
deleted
inserted
replaced
1034:43a2170bbdb8 | 1035:f01d9892ed79 |
---|---|
104 self._carbon.send(graphiteName, stmt[2].toPython(), now) | 104 self._carbon.send(graphiteName, stmt[2].toPython(), now) |
105 | 105 |
106 def staticStmts(self): | 106 def staticStmts(self): |
107 return [(HOST[socket.gethostname()], ROOM['connectedTo'], self.uri, self.ctx)] | 107 return [(HOST[socket.gethostname()], ROOM['connectedTo'], self.uri, self.ctx)] |
108 | 108 |
109 def currentGraph(self): | |
110 g = Graph() | |
111 | |
112 for s in self.staticStmts(): | |
113 g.add(s[:3]) | |
114 | |
115 for si in self._statementsFromInputs.values(): | |
116 for s in si: | |
117 g.add(s) | |
118 return g | |
119 | |
120 def description(self): | 109 def description(self): |
121 """for web page""" | 110 """for web page""" |
122 return { | 111 return { |
123 'uri': self.uri, | 112 'uri': self.uri, |
124 'devices': [d.description() for d in self._devs], | 113 'devices': [d.description() for d in self._devs], |