Git Product home page Git Product logo

Comments (6)

JacoboSanchez avatar JacoboSanchez commented on June 4, 2024

I think you are describing #28
It does not seems to be a timeout thing but a temporary lost of connection with the inverter which makes the connection to lose the previous authentication

from huawei_solar.

peaceduck avatar peaceduck commented on June 4, 2024

Ok, do you think my router has temporary lost the connection? Because I can not see any problems in Home Assistant. I have not looked in the code, but could it be possible to re-run the authentication code when this happens? Or reconnect to the Huawei? If not possible automatically, maybe publish a service that I could call when this happens?

from huawei_solar.

wlcrs avatar wlcrs commented on June 4, 2024

Can you look into your logs what happens to the heartbeat which keeps the session (with the authentication) open? I'm interested to see which error happens there (if any)

from huawei_solar.

peaceduck avatar peaceduck commented on June 4, 2024

Oh, yes! Sorry, I did not notice that. The heartbeat fails. And never comes back until I reloaded the Integration.
The log:

2022-05-04 12:52:30 DEBUG (MainThread) [huawei_solar.huawei_solar] Heartbeat succeeded
2022-05-04 12:52:38 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 32064
2022-05-04 12:52:38 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 32016
2022-05-04 12:52:38 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 37101
2022-05-04 12:52:38 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 37760
2022-05-04 12:52:45 DEBUG (MainThread) [huawei_solar.huawei_solar] Heartbeat succeeded
2022-05-04 12:53:08 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 32064
2022-05-04 12:53:11 INFO (MainThread) [backoff] Backing off _do_read(...) for 2.0s (asyncio.exceptions.TimeoutError)
2022-05-04 12:53:11 DEBUG (MainThread) [huawei_solar.huawei_solar] Backing off reading for 2.0 seconds after 1 tries
2022-05-04 12:53:16 INFO (MainThread) [backoff] Backing off _do_read(...) for 2.0s (asyncio.exceptions.TimeoutError)
2022-05-04 12:53:16 DEBUG (MainThread) [huawei_solar.huawei_solar] Backing off reading for 2.0 seconds after 2 tries
2022-05-04 12:53:19 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 32016
2022-05-04 12:53:19 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 37101
2022-05-04 12:53:19 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 37760
2022-05-04 12:53:49 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 32064
2022-05-04 12:53:49 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 32016
2022-05-04 12:53:49 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 37101
2022-05-04 12:53:49 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 37760
2022-05-04 12:54:19 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 32064
2022-05-04 12:54:19 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 32016
2022-05-04 12:54:19 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 37101
2022-05-04 12:54:19 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 37760
2022-05-04 12:54:49 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 32064
2022-05-04 12:54:49 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 32016
2022-05-04 12:54:49 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 37101
2022-05-04 12:54:49 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 37760
2022-05-04 12:55:19 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 32064
2022-05-04 12:55:19 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 32016
2022-05-04 12:55:19 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 37101
2022-05-04 12:55:19 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 37760
2022-05-04 12:55:49 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 32064
2022-05-04 12:55:50 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 32016
2022-05-04 12:55:50 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 37101
2022-05-04 12:55:50 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 37760
2022-05-04 12:56:20 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 32064
2022-05-04 12:56:20 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 32016
2022-05-04 12:56:20 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 37101
2022-05-04 12:56:20 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 37760
2022-05-04 12:56:50 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 32064
2022-05-04 12:56:50 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 32016
2022-05-04 12:56:50 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 37101
2022-05-04 12:56:50 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 37760
2022-05-04 12:57:20 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 32064
2022-05-04 12:57:20 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 32016
2022-05-04 12:57:20 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 37101
2022-05-04 12:57:20 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 37760
2022-05-04 12:57:50 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 32064
2022-05-04 12:57:50 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 32016
2022-05-04 12:57:50 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 37101
2022-05-04 12:57:50 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 37760
2022-05-04 12:58:20 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 32064
2022-05-04 12:58:20 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 32016
2022-05-04 12:58:20 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 37101

from huawei_solar.

peaceduck avatar peaceduck commented on June 4, 2024

These errors are then coming back every 5 minutes (approx)
Sometimes with some more error rows:

2022-05-04 13:12:57 DEBUG (MainThread) [huawei_solar.huawei_solar] Backing off reading for 2.0 seconds after 1 tries
2022-05-04 13:13:01 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 32016
2022-05-04 13:13:01 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 37101
2022-05-04 13:13:01 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 37760
2022-05-04 13:13:31 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 32064
2022-05-04 13:13:34 INFO (MainThread) [backoff] Backing off _do_read(...) for 2.0s (asyncio.exceptions.TimeoutError)
2022-05-04 13:13:34 DEBUG (MainThread) [huawei_solar.huawei_solar] Backing off reading for 2.0 seconds after 1 tries
2022-05-04 13:13:39 INFO (MainThread) [backoff] Backing off _do_read(...) for 2.0s (asyncio.exceptions.TimeoutError)
2022-05-04 13:13:39 DEBUG (MainThread) [huawei_solar.huawei_solar] Backing off reading for 2.0 seconds after 2 tries
2022-05-04 13:13:44 INFO (MainThread) [backoff] Backing off _do_read(...) for 2.0s (asyncio.exceptions.TimeoutError)
2022-05-04 13:13:44 DEBUG (MainThread) [huawei_solar.huawei_solar] Backing off reading for 2.0 seconds after 3 tries
2022-05-04 13:13:49 INFO (MainThread) [backoff] Backing off _do_read(...) for 2.0s (asyncio.exceptions.TimeoutError)
2022-05-04 13:13:49 DEBUG (MainThread) [huawei_solar.huawei_solar] Backing off reading for 2.0 seconds after 4 tries
2022-05-04 13:13:51 ERROR (MainThread) [custom_components.huawei_solar] Timeout fetching BT21A0216315_data_update_coordinator data
2022-05-04 13:14:21 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 32064
2022-05-04 13:14:24 INFO (MainThread) [backoff] Backing off _do_read(...) for 2.0s (asyncio.exceptions.TimeoutError)
2022-05-04 13:14:24 DEBUG (MainThread) [huawei_solar.huawei_solar] Backing off reading for 2.0 seconds after 1 tries
2022-05-04 13:14:29 INFO (MainThread) [backoff] Backing off _do_read(...) for 2.0s (asyncio.exceptions.TimeoutError)
2022-05-04 13:14:29 DEBUG (MainThread) [huawei_solar.huawei_solar] Backing off reading for 2.0 seconds after 2 tries
2022-05-04 13:14:34 INFO (MainThread) [backoff] Backing off _do_read(...) for 2.0s (asyncio.exceptions.TimeoutError)
2022-05-04 13:14:34 DEBUG (MainThread) [huawei_solar.huawei_solar] Backing off reading for 2.0 seconds after 3 tries
2022-05-04 13:14:39 INFO (MainThread) [backoff] Backing off _do_read(...) for 2.0s (asyncio.exceptions.TimeoutError)
2022-05-04 13:14:39 DEBUG (MainThread) [huawei_solar.huawei_solar] Backing off reading for 2.0 seconds after 4 tries
2022-05-04 13:15:11 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 32064
2022-05-04 13:15:12 ERROR (MainThread) [huawei_solar.huawei_solar] Could not read register value, has another device interrupted the connection?
2022-05-04 13:15:42 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 32064
2022-05-04 13:15:42 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 32016
2022-05-04 13:15:42 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 37101
2022-05-04 13:15:42 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 37760

from huawei_solar.

wlcrs avatar wlcrs commented on June 4, 2024

A small typo prevented the existing re-login logic from working. I've also implemented a secondary retry to make it even more robust: https://gitlab.com/Emilv2/huawei-solar/-/commit/22bd9b4b0e38f69a2206f11e28eeed415cb2644d . I've upgraded the huawei-solar library to 2.0.1 in 1.0.1 of this integration.

from huawei_solar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.