Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error occurred while communicating with Omnik Inverter device #152

Closed
Buffer379x opened this issue Feb 15, 2023 · 10 comments · Fixed by #155
Closed

Error occurred while communicating with Omnik Inverter device #152

Buffer379x opened this issue Feb 15, 2023 · 10 comments · Fixed by #155
Labels
bugfix Inconsistencies or issues which will cause a problem for users or implementers.

Comments

@Buffer379x
Copy link

Detailed description

Hallo Robbin, Hallo everybody,

After updating to the most recent version this morning the inverter integration is not working anymore for me. Error message that is being shown on the integration page is:

"Retrying setup: Error occurred while communicating with Omnik Inverter device"

Since I did not find a way to access the configuration page I uninstalled and reinstalled the integration, but the error message stays the same. A manual connection to the inverter is still possible (Bosswerk MI600).

Log file from Home Asisstant shows the following entry:

Logger: homeassistant.config_entries
Source: config_entries.py:1211
First occurred: 09:37:54 (1 occurrences)
Last logged: 09:37:54

Config entry 'Balkonkraftwerk' for omnik_inverter integration not ready yet: Error occurred while communicating with Omnik Inverter device; Retrying in background

Context

Diagnostics

2023-02-15 09:51:03.423 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Balkonkraftwerk' for omnik_inverter integration not ready yet: Error occurred while communicating with Omnik Inverter device; Retrying in background

(not sure if this is helpful or if I am missing some other diagnostics log file)

@robbinjanssen
Copy link
Owner

You can downgrade to the previous version for now, can you share a diagnostics file? You can find it under the 3 dots at the integration file. What source do you use?

@Buffer379x
Copy link
Author

Thank you a lot for the hint, downgrading as the easiest solution for now did not come into my mind... :-)

v2.4.2 works out of the box again. Strange enough I am not able to download the diagnostics from v2.5.0 (see screenshot). I am still attaching the ones from v2.4.2, but I doubt they will be of help since that version is working.

Not sure what you mean with source:
Source for scraping the data is HTML (Inverter = Bosswerk MI-600)
Source for the integration = HACS

config_entry-omnik_inverter-804f25f3eee954e2888dcff1472d70a3.json.txt

Screenshot 2023-02-15 134748

@robbinjanssen robbinjanssen added the bugfix Inconsistencies or issues which will cause a problem for users or implementers. label Feb 16, 2023
@robbinjanssen
Copy link
Owner

@Buffer379x do you think it is possible to open the connection to your inverter for me? Forward the port on your router and send me the details :-) You can find my email on my github profile.

It's kinda hard to debug otherwise

@Buffer379x
Copy link
Author

@robbinjanssen You've got mail :-)

@timn
Copy link

timn commented Feb 16, 2023

I'm experiencing the same problem (also Bosswerk MI-600). Happy to share an HTML dump of the inverter if that helps.

@robbinjanssen
Copy link
Owner

@timn @Buffer379x gave me access to his inverter, so when it is sunny outside tomorrow i'll have a look :-)

@robbinjanssen
Copy link
Owner

@timn try upgrading to v2.5.2, this resolved the issue for @Buffer379x :)

@timn
Copy link

timn commented Feb 17, 2023

I can confirm that 2.5.2 fixes the problem. Thank you for the quick fix, @robbinjanssen! Out of curiosity, what is the root cause of the problem, why doesn't the HA function work?

@robbinjanssen
Copy link
Owner

robbinjanssen commented Feb 17, 2023

I don't know the exact reason, but the underlying package (python-omnikinverter) does one call per entity, so 1 for the device information, and 1 for the inverter information. Both are the same html/js/json/tcp calls to the inverter. In the previous version (v2.4.2) we did not use the session provided by HA (using it is the preferred way). So in v2.5.0 we did. I don't know why yet but for some reason the bosswerk inverter drops the second connection (Server Disconnected Exception). Possible it doesn't except the same session twice, I don't know. So removing the HA session and letting the python-omnikinverter package create its own session solves the problem for now.

@klaasnicolaas, @MarijnS95 and I are discussing whether or not we should combine the information in a single call. I think that will solve the problem for the bosswerk inverters as well :)

@MarijnS95
Copy link
Collaborator

@klaasnicolaas, @MarijnS95 and I are discussing whether or not we should combine the information in a single call. I think that will solve the problem for the bosswerk inverters as well :)

Yes! I've submitted the necessary changes for that now (klaasnicolaas/python-omnikinverter#340, #157), sorry for the wait!

@github-actions github-actions bot locked and limited conversation to collaborators Mar 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bugfix Inconsistencies or issues which will cause a problem for users or implementers.
Projects
None yet
4 participants