home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.01k stars 29.66k forks source link

SMA integration failed to connect to converter #109919

Closed DrekiHeartz closed 1 month ago

DrekiHeartz commented 7 months ago

The problem

SMA solar will not connect to the inverter, when attempting to do so, the message "Failed setup, will retry" is shown.

With debugging for the SMA solar integration enabled, the following debug string is returned: DEBUG (MainThread) [pysma] Sending POST request to /dyn/login.json: {'data': '{"right": "usr", "pass": "##MYPASSWORD##"}', 'headers': {'content-type': 'application/json'}} After this, the connection has failed.

I have confirmed that my local IP address was and still is correct. No further changes were made to the settings.

What version of Home Assistant Core has the issue?

core-2024.2.0

What was the last working version of Home Assistant Core?

core-2023.12

What type of installation are you running?

Home Assistant OS

Integration causing the issue

SMA solar

Link to integration documentation on our website

https://www.home-assistant.io/integrations/sma

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

DEBUG (MainThread) [pysma] Sending POST request to /dyn/login.json: {'data': '{"right": "usr", "pass": "##MYPASSWORD##"}', 'headers': {'content-type': 'application/json'}}

Additional information

No response

home-assistant[bot] commented 7 months ago

Hey there @kellerza, @rklomp, mind taking a look at this issue as it has been labeled with an integration (sma) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `sma` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign sma` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


sma documentation sma source (message by IssueLinks)

martijn1247812 commented 6 months ago

same problem here, since yesterday no communication anymore with my SMA

edit: problem is disappeared, rebooted my SMA (Sunny Boy 3.0 current Firmware: 4.0.75.R) adn try to connect with different HA.

kfussmann commented 6 months ago

I am having similar problems. In my case the communication to the PV-Inverters is ok. But the communication to the Battery-Inverter is damaged. The problem occurs since the last Core Update of Home Assistant to version 2024.2.2. I have attached the debug log as file. home-assistant_sma_2024-02-19T12-41-33.277Z.log

martijn1247812 commented 6 months ago

Unfortunately, I have noticed that my SB3.0 became unavailable again: SB3.0-1AV-XX XXX Status changed to Ok 16:41:50 - 2 days ago March 2, 2024 SB3.0-1AV-XX XXX Status became unavailable 02:07:24 - 3 days ago But it came online half day later; only i'm missing some sun data now.

Found this record in the error log: Logger: homeassistant.helpers.entity Source: helpers/entity.py:1152 First occurred: February 29, 2024 at 03:35:18 (1 occurrences) Last logged: February 29, 2024 at 03:35:18

Updating state for sensor.sb3_0_1av_41_521_current_total (<class 'homeassistant.components.sma.sensor.SMAsensor'>) took 1.428 seconds. Please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+sma%22

kfussmann commented 6 months ago

Hello, after rebooting as @martijn1247812 experienced the connection problem was gone. But now, after updating to Core Hassio 2024.3.0 I once again lost the connection to my battery converter SBS3.7-10. The connection to my two other PV-Inverters (STP8.0-3AV-40, STP10.0-3AV-40) is as it should without any problem. I will now try to reboot once again the battery converter, but it should not be needed after every update.

The shown Error message in the log: Logger: pysma Quelle: components/sma/init.py:56 Erstmals aufgetreten: 09:30:57 (22 Vorkommnisse) Zuletzt protokolliert: 09:57:42

https://192.168.10.114: error detected, closing session to force another login attempt, got: {'err': 404}

roybosch commented 5 months ago

I think this isn't related to recent HA updates. I've been having these problems for at least a year. Could this be a problem that's related to sunnyboy converters having a limit in the amount of connections?

bdraco commented 4 months ago

Its likely you have an integration blocking the event loop

  1. Install profiler integration https://my.home-assistant.io/redirect/config_flow_start/?domain=profiler
  2. Enable asyncio debug service as soon as possible after startup https://www.home-assistant.io/integrations/profiler/#service-profilerset_asyncio_debug
  3. Watch logs for RuntimeError: Non-thread-safe operation and long asyncio delays
  4. Download and post logs with full trace

For 2024.5.x and later Home Assistant debug mode can also be enabled in configuration.yaml

homeassistant:
  debug: true
issue-triage-workflows[bot] commented 1 month ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.