JciHitachiHA icon indicating copy to clipboard operation
JciHitachiHA copied to clipboard

log不斷重複紀錄以下錯誤 (可能和JciHitachiAWSAPI 登入錯誤有關?)

Open YCYeh0215 opened this issue 9 months ago • 4 comments

🐛 Describe the bug

會不定時出現這個問題,且error log會不停被紀錄直到硬碟塞滿。

{"log":"Exception ignored in: \u003cfunction JciHitachiAWSAPI.login.\u003clocals\u003e.get_credential_callable at 0x7fb4 77473740\u003e\n","stream":"stderr","time":"2024-04-30T23:17:33.882242327Z"} {"log":"Traceback (most recent call last):\n","stream":"stderr","time":"2024-04-30T23:17:33.882829449Z"} {"log":" File "/usr/local/lib/python3.12/site-packages/JciHitachi/api.py", line 998, in get_credential_callable\n","s tream":"stderr","time":"2024-04-30T23:17:33.884256748Z"} {"log":" self._check_before_publish()\n","stream":"stderr","time":"2024-04-30T23:17:33.886715657Z"} {"log":" File "/usr/local/lib/python3.12/site-packages/JciHitachi/api.py", line 950, in _check_before_publish\n","str eam":"stderr","time":"2024-04-30T23:17:33.887500599Z"} {"log":" if self._aws_tokens.expiration - current_time \u003c= 300:\n","stream":"stderr","time":"2024-04-30T23:17:33. 890423245Z"} {"log":" ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n","stream":"stderr","time":"2024-04-30T23:17:33.894267729Z"} {"log":"AttributeError: 'NoneType' object has no attribute 'expiration'\n","stream":"stderr","time":"2024-04-30T23:17:33 .894886238Z"}

Environment Information

HA版本2024.3.1 (docker) JciHitachiHA版本 1.6.0 空調設備 RAS-36NT、RAS-40NT

YCYeh0215 avatar May 01 '24 16:05 YCYeh0215

Can people facing similar issues comment on this?

qqaatw avatar May 02 '24 02:05 qqaatw

我也有遇到類似的問題,前幾天常發生HA無法控制冷氣的情況,需重啟HA後才可以使用。今天發現硬碟空間為0,檢查後發現是home assistant 的 系統log爆了(有77G),不過因為完全無法操作所以我先把log刪了。之後如果觀察到log不正常增長的情況再把log貼上來。

tomky avatar May 03 '24 01:05 tomky

我這邊也有一樣的問題,這段 log 一秒就會印出很多次,不用多久就能塞爆整個系統 log 了

Exception ignored in: <function JciHitachiAWSAPI.login.<locals>.get_credential_callable at 0x7fa1c7d3b240>
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/JciHitachi/api.py", line 998, in get_credential_callable
    self._check_before_publish()
  File "/usr/local/lib/python3.12/site-packages/JciHitachi/api.py", line 950, in _check_before_publish
    if self._aws_tokens.expiration - current_time <= 300:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'expiration'

osk2 avatar May 03 '24 01:05 osk2

Can anyone of you please paste more detailed and thorough error messages from the log here?

So I guess Hitachi started throttling the api requests as I saw TooManyRequestsException Too many requests today. I haven't seen the error reported here on my side though.

I may not have time digging into this issue in the near future. If anyone wants to work on this and sends a PR here (and LibJciHitachi maybe) I will be happy to review!

qqaatw avatar May 03 '24 02:05 qqaatw

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar May 18 '24 04:05 stale[bot]