Mercurial > code > home > repos > homeauto
comparison service/arduinoNode/arduinoNode.py @ 305:6614416dd2c3
influx output for arduino, update web lib path
Ignore-this: 76b7fb15db86563ed3fa1ec5322b918c
author | drewp@bigasterisk.com |
---|---|
date | Fri, 16 Sep 2016 01:16:12 -0700 |
parents | fc0e42933baa |
children | a94f2a522d41 |
comparison
equal
deleted
inserted
replaced
304:e7cbf250188a | 305:6614416dd2c3 |
---|---|
158 raise ValueError("after poll, got %x instead of 'x'" % byte) | 158 raise ValueError("after poll, got %x instead of 'x'" % byte) |
159 elapsed = time.time() - t1 | 159 elapsed = time.time() - t1 |
160 if elapsed > 1.0: | 160 if elapsed > 1.0: |
161 log.warn('poll took %.1f seconds' % elapsed) | 161 log.warn('poll took %.1f seconds' % elapsed) |
162 | 162 |
163 self._influx.exportToInflux( | 163 stmts = set() |
164 set.union([set(v) for v in self._statementsFromInputs.values()])) | 164 for v in self._statementsFromInputs.values(): |
165 stmts.update(v) | |
166 self._influx.exportToInflux(stmts) | |
165 | 167 |
166 def _sendOneshot(self, oneshot): | 168 def _sendOneshot(self, oneshot): |
167 body = (' '.join('%s %s %s .' % (s.n3(), p.n3(), o.n3()) | 169 body = (' '.join('%s %s %s .' % (s.n3(), p.n3(), o.n3()) |
168 for s,p,o in oneshot)).encode('utf8') | 170 for s,p,o in oneshot)).encode('utf8') |
169 bang6 = 'fcb8:4119:fb46:96f8:8b07:1260:0f50:fcfa' | 171 bang6 = 'fcb8:4119:fb46:96f8:8b07:1260:0f50:fcfa' |