dodo5522 / solar_monitor

TS-MPPT-60 logger application
2 stars 0 forks source link

TS-MPPT-60ドライバがlist index out of rangeを返すことがある #22

Open dodo5522 opened 8 years ago

dodo5522 commented 8 years ago

ブラウザ経由でTS-MPPT-60のステータスを参照すると、異常状態に陥っている模様。何も表示されない。

~ $ /usr/local/bin/python3.5 /usr/local/bin/solar_monitor -i 10 --debug -xa Q6tvl1IH3s3vR27UP4C0U5YgVGdHPnBbAn4iokryjuwzEnuI -xf 274175384 -kp 55489b36672e6c7cb2ef45ac -kw 466153690d7a25aacb2b59fdde16950b1dfe3999793a16ef4c3571f81720e5360e03ef3407f4e9769b5928cd5934a6bb00a41dee0d47e65896686d8b8cefeacaf4f4bb7f9ec0f0223c4a5352de8017e9549af295955e7c6fb6cf6706d6a473fda290dd5edb6483ef3c58f7e6697cb336 -bl 22.5 -bs /usr/local/bin/remote_shutdown.sh -bf -ch 25.0 -tck I4fJlwNkN7yz01D0ad1kty619 -tcs QBxMBe62t3j9ATOPY0LT1JDQOlMHmQusJa2scsUcN1rtZGXip1 -tk 749579597834956801-9ME7z844LaaMgK3QTJqkSCQHydlNsl5 -ts JcxFSyEufhhMfIm1ti9LCBc6pSE28GNdiPIeRBjaOPWL0

2016/09/16 AM  6:38:38 logger.py 60 debug DEBUG: list index out of range error!!!
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/threading.py", line 914, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.5/threading.py", line 862, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.5/site-packages/solar_monitor/timer.py", line 113, in _main_loop
    self.target_func(**self.target_kwargs)
  File "/usr/local/lib/python3.5/site-packages/solar_monitor/__main__.py", line 88, in event_loop
    system_status = CHARGE_CONTROLLER.SystemStatus(host_name)
  File "/usr/local/lib/python3.5/site-packages/tsmppt60_driver/__init__.py", line 53, in __init__
    _mb = ManagementBase(host)
  File "/usr/local/lib/python3.5/site-packages/tsmppt60_driver/base.py", line 96, in __init__
    ModbusRegisterTable.VOLTAGE_SCALING_LOW[0]))
  File "/usr/local/lib/python3.5/site-packages/tsmppt60_driver/base.py", line 182, in _compute_scaler
    L = self._read_modbus(address_high, 1)
  File "/usr/local/lib/python3.5/site-packages/tsmppt60_driver/base.py", line 149, in _read_modbus
    ret_short = (raw_values[idx] * 256)
IndexError: list index out of range
dodo5522 commented 8 years ago

例外発生時はtraceback情報をtweetすると良いかも。