You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the latest HEAD to test the import script i get this, both with a new or
old database file:
$ python2 import-data-envir.py /dev/ttyUSB0
/home/higuita/apps/currentcost/envi-test.ccd
{'msg': {'src': u'CC128-v1.30', 'type': u'1', 'dsb': u'00479', 'ch1': {'watts':
u'00489'}, 'time': u'02:11:57', 'sensor': u'0', 'id': u'03170', 'tmpr':
u'27.8'}}
Traceback (most recent call last):
File "import-data-envir.py", line 61, in <module>
run(s, db)
File "import-data-envir.py", line 31, in run
w2 = int(currentcoststruct["msg"]["ch2"]["watts"])
KeyError: 'ch2'
Original issue reported on code.google.com by dmotale...@gmail.com on 29 Jun 2012 at 1:11
The text was updated successfully, but these errors were encountered:
I just look at the code and its simple, just comment out the extra channels i
dont use:
#w2 = int(currentcoststruct["msg"]["ch2"]["watts"])
#w3 = int(currentcoststruct["msg"]["ch3"]["watts"])
#t = (w1**2 + w2**2 + w3**2 ) **0.5
and add this
t = w1
Original comment by dmotale...@gmail.com on 27 Jul 2012 at 12:48
Original issue reported on code.google.com by
dmotale...@gmail.com
on 29 Jun 2012 at 1:11The text was updated successfully, but these errors were encountered: