16 | | |
| 16 | = Watt Checker = |
| 17 | * [http://little-beans.net/gadget/watt-checker/ ログ記録型ワットチェッカーを比較!TAP-TST10とF-PLUG、REX-BTWATTCH1のどれを選ぶ!?] |
| 18 | |
| 19 | * 現在所持しているもの |
| 20 | * TAP-TST5 |
| 21 | * TAP-TST10 |
| 22 | |
| 23 | == TAP-TST10 == |
| 24 | * github:nonakap/taptst10ctl |
| 25 | * [http://blog.osakana.net/archives/4436 USB電力計 サンワサプライ TAP-TST10をLinuxで使ってみた | OSAKANA TAROのメモ帳] |
| 26 | |
| 27 | * Arch Linux 4.1.6-1-ARCH |
| 28 | 1. $ pacaur -S python2-pyusb-git |
| 29 | * aur:python2-pyusb-git (python2-pyusbは0.4.3-7とバージョンが古い) |
| 30 | 1. $ vim taptst10ctl.py |
| 31 | {{{#!diff |
| 32 | diff --git a/taptst10ctl.py b/taptst10ctl.py |
| 33 | index 1207fef..f5e8724 100644 |
| 34 | --- a/taptst10ctl.py |
| 35 | +++ b/taptst10ctl.py |
| 36 | @@ -83,7 +83,7 @@ watts = [] |
| 37 | kWhs = [] |
| 38 | outep.write('\x02\x18\x0a') |
| 39 | while True: |
| 40 | - data = dev.read(ENDPOINT, 17, intf, 1000) |
| 41 | + data = dev.read(ENDPOINT, 17, 1000) |
| 42 | # dump raw data |
| 43 | #print(" ".join("{:02x}".format(x) for x in data)) |
| 44 | |
| 45 | }}} |
| 46 | * [https://bitbucket.org/benallard/galileo/issues/41/errors-in-kubuntu benallard / galileo / 課題 / #41 - TypeError: write() takes at most 4 arguments (5 given) — Bitbucket] |
| 47 | 1. $ sudo python2 taptst10ctl.py |
| 48 | {{{ |
| 49 | No.,DateTime,Watt,kWh |
| 50 | 1,2015/09/23 10:30,4.5,0.00 |
| 51 | 2,2015/09/23 10:40,41.5,0.00 |
| 52 | 3,2015/09/23 10:50,41.3,0.01 |
| 53 | 4,2015/09/23 11:00,40.3,0.02 |
| 54 | }}} |