wills106 / homeassistant-solax-modbus

SolaX Power Modbus custom_component for Home Assistant (Supports some AlphaESS, Growatt, Sofar, Solinteg, Solis, SRNE, Swatten)
317 stars 101 forks source link

After upgrade to new version - unable to add invterter - unknown error #977

Open perjmolsen opened 2 months ago

perjmolsen commented 2 months ago

Describe the bug

Hi I have upgraded to the newest version of SolarX modbus, now I am unable to add my invterter.

When I try to add it, I get "unknown error," I am adding the inverter withh the same information as earlier.

mic3000tl-xe /dev/ttyUSB0 9600

I have removed the old invterter - rebooted HA og redownloaded the newest add on - still the same issue

Please help

Integration Version

2024.8.6

Homeassistant core version

2024.7.4

Inverter brand

Growatt

Plugin used

plugin_growatt.py

Serial prefix

QUH7CEQ0CW

Connection Method

Serial

Detailed Error Log

No logs available error

Additional context

No response

FloCodeRian commented 2 months ago

some here - other inverter brand (tigo/qcells with solar plugin) but some method used ... usb to serial

perjmolsen commented 2 months ago

How did you solve it?

wuschi1983 commented 2 months ago

Same problem here

Zvolli commented 2 months ago

Same issue here, all unknown entity state. Followed instructions with warnings but problem still occurs. Downgrade to main does not take any effect. Removing SolaX from HACS and re install it does not work either.

granthgh commented 2 months ago

Describe the bug

Hi I have upgraded to the newest version of SolarX modbus, now I am unable to add my invterter.

When I try to add it, I get "unknown error," I am adding the inverter withh the same information as earlier.

mic3000tl-xe /dev/ttyUSB0 9600

I have removed the old invterter - rebooted HA og redownloaded the newest add on - still the same issue

Please help

Integration Version

2024.8.6

Homeassistant core version

2024.7.4

Inverter brand

Growatt

Plugin used

plugin_growatt.py

Serial prefix

QUH7CEQ0CW

Connection Method

Serial

Detailed Error Log

No logs available error

Additional context

No response

Same problem here with Growatt SPH6000 .

FloCodeRian commented 2 months ago

Workaround would be - downgrading via zip download of version 2024.05.07

https://github.com/wills106/homeassistant-solax-modbus/tree/2024.05.7

mfcltd commented 2 months ago

Same problem too.

rhlavienka commented 2 months ago

the same here Solax G4

granthgh commented 2 months ago

Workaround would be - downgrading via zip download of version 2024.05.07

https://github.com/wills106/homeassistant-solax-modbus/tree/2024.05.7 ā€------------------------

I've tested downgrading to this version and it does get round the issue.

wills106 commented 2 months ago

@perjmolsen

You can get more detailed error logs following: https://homeassistant-solax-modbus.readthedocs.io/en/latest/faq/#detailed-error-log

@Zvolli

Do you get "unknown error occurred" when adding your Inverter, or just your entities have gone to unknown since updating to 2024.08.x?

For everyone else who's saying "same here" can you clarify what the actual issue is.

Either "unknown error occurred" like @perjmolsen Or all entities are showing "unknown"

granthgh commented 2 months ago

My original issue was that after upgrading to 2024.8.6 some of the entities became unknown. I then deleted the inverter and tried re-adding it, but when I got to the box with the COM port / data rate I got the unknown error when actioning it. Since then I've downgraded to 2024.05.07 I was able to add the inverter and the entities are now working. There are no errors in the logs.

Zvolli commented 2 months ago

@@.***> After updating to 2024.08.x all entities went to unknown state. If i delete inverter and solax, reinstall I can add my inverter with success but of course with unknown state for all entities.


Fra: wills106 @.> Sendt: 6. august 2024 22:09 Til: wills106/homeassistant-solax-modbus @.> Cc: Zvolli @.>; Mention @.> Emne: Re: [wills106/homeassistant-solax-modbus] After upgrade to new version - unable to add invterter - unknown error (Issue #977)

@perjmolsenhttps://github.com/perjmolsen

You can get more detailed error logs following: https://homeassistant-solax-modbus.readthedocs.io/en/latest/faq/#detailed-error-log

@Zvollihttps://github.com/Zvolli

Do you get "unknown error occurred" when adding your Inverter, or just your entities have gone to unknown since updating to 2024.08.x?

For everyone else who's saying "same here" can you clarify what the actual issue is.

Either "unknown error occurred" like @perjmolsenhttps://github.com/perjmolsen Or all entities are showing "unknown"

ā€” Reply to this email directly, view it on GitHubhttps://github.com/wills106/homeassistant-solax-modbus/issues/977#issuecomment-2272062512, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BGD6RBHUY37VL4D4QWHXOB3ZQEUQJAVCNFSM6AAAAABL653P56VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZSGA3DENJRGI. You are receiving this because you were mentioned.Message ID: @.***>

rhlavienka commented 2 months ago

@wills106 I'm sorry, I thought all of us have the same issue. I removed inverter from integration and after upgrade to 2024.8.7 is not possible add it back. I get "unknown error occurred" when adding Inverter.

Zvolli commented 2 months ago

Sure but downgrading in docker container is for me a unknown territory šŸ™‚


Fra: granthgh @.> Sendt: 6. august 2024 21:23 Til: wills106/homeassistant-solax-modbus @.> Cc: Zvolli @.>; Comment @.> Emne: Re: [wills106/homeassistant-solax-modbus] After upgrade to new version - unable to add invterter - unknown error (Issue #977)

Workaround would be - downgrading via zip download of version 2024.05.07

https://github.com/wills106/homeassistant-solax-modbus/tree/2024.05.7 ā€------------------------

I've tested downgrading to this version and it does get round the issue.

ā€” Reply to this email directly, view it on GitHubhttps://github.com/wills106/homeassistant-solax-modbus/issues/977#issuecomment-2271987106, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BGD6RBBLCMJBNCOQHZFOO33ZQEPENAVCNFSM6AAAAABL653P56VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZRHE4DOMJQGY. You are receiving this because you commented.Message ID: @.***>

mfcltd commented 2 months ago

Same problem too.

@wills106 - When re-adding the inverter after upgrading, the unknown error occurs.

HaareistNase commented 2 months ago

Edit: other Problem I can add Growatt SPH4000 and MIC3000 But all of the Sensors on MIC reads "unknown".

Downgrade to 05.07 solves the Problem.

Mike5229 commented 2 months ago

Workaround would be - downgrading via zip download of version 2024.05.07 https://github.com/wills106/homeassistant-solax-modbus/tree/2024.05.7 ā€------------------------

I've tested downgrading to this version and it does get round the issue.

Hi,

can you please briefly explain how to perform the downgrade?

toszym commented 2 months ago

I can confirm, downgrading to version 2024.05.07 works. Steps to follow: remove current version from HACS and then follow manual installation steps ( download tar.gz or zip archive, upload to homeassistant, unzip and move solax_modbus folder to /homeassistant/custom_components/)

Zvolli commented 2 months ago

I can also confirm 2024.05.7 works but by doing this maneuver it does not appear in the HACS section. In my case it's in Synology docker container.


Fra: Tomasz @.> Sendt: 8. august 2024 13:30 Til: wills106/homeassistant-solax-modbus @.> Cc: Zvolli @.>; Mention @.> Emne: Re: [wills106/homeassistant-solax-modbus] After upgrade to new version - unable to add invterter - unknown error (Issue #977)

I can confirm, downgrading to version 2024.05.07 works. Steps to follow: remove current version from HACS and then follow manual installation steps ( download tar.gz or zip archive, upload to homeassistant, unzip and move solax_modbus folder to /homeassistant/custom_components/)

ā€” Reply to this email directly, view it on GitHubhttps://github.com/wills106/homeassistant-solax-modbus/issues/977#issuecomment-2275593830, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BGD6RBC7E523RYCS7UIX5K3ZQNJHFAVCNFSM6AAAAABL653P56VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZVGU4TGOBTGA. You are receiving this because you were mentioned.Message ID: @.***>

rhlavienka commented 2 months ago

I waited 2 days if by chance updating the entire HA doesn't solve the problem. No it didn't. So I also downgraded.

Using the File Editor, I deleted the content of the folder /custom_components/solax_modbus and replaced it with the content from version 2024.5.7. I can't delete folder or multiple files at once in the File Editor. It is necessary individually, but there is not much of it.

See Manual installation https://homeassistant-solax-modbus.readthedocs.io/en/latest/installation/

shaarkys commented 2 months ago

Same here, trying to add Solax X3 G4 after removal due to the unknown entities after 2024.08.8 upgrade and duplicated inverters (even I do have only one) and can't get over this : solaxX3setup

Time to manual downgrade and re-adding back inverter.

I'm on HA Core 2024.8.0, Frontend 20240806.1

update actually might be user error, I used wrong port number - confirmed, it was user error. Still I would expect some time out or something like that but had to restart HA to recover....

ruimmsimoes commented 2 months ago

I have a SolaX inverter and Iā€™m having the same issue. I upgraded to version 2024.08.08. When adding the inverter after the upgrade Iā€™m also getting the same error message. In the logs I am seeing an error message that is the same as the one reported in this 2 issues:

988 - Solax X3 Hybrid Raspberry RS485 USB -> Unknown error occurred

976 - 'SolaX' - 'Gen3' crash on add integration "KeyError: 'support-battery'"

ralfna commented 2 months ago

Same issue with Qcells/Solax, in addition to downgrade I have to reset the WiFi dongle to get the integration back to work.

wills106 commented 2 months ago

Temporary workaround is explained https://github.com/wills106/homeassistant-solax-modbus/issues/996#issuecomment-2284023411

martinpichlo commented 2 months ago

Workaround ist not working for me. Trying to add the integration with TCP/IP didn't come back but and stays in "initialization". Changing settings in that state results in an integration without service and devices, after reboot :-(

martinpichlo commented 2 months ago

I can confirm, downgrading to version 2024.05.07 works. Steps to follow: remove current version from HACS and then follow manual installation steps ( download tar.gz or zip archive, upload to homeassistant, unzip and move solax_modbus folder to /homeassistant/custom_components/)

Is the downgrading of the integration also working on HA 2024.8.1? I don't get it working. I'm able to select the integration. But instead of "unknown error" I got a spinning waiting icon all the time.

image

@wills106 : How could we all support, find the problem?

wills106 commented 2 months ago

I have released 2024.08.11 it may fix this error, but no error logs in this issue thread so can't check.

granthgh commented 2 months ago

I have released 2024.08.11 it may fix this error, but no error logs in this issue thread so can't check.

Still got the same unknown error has occurred, with 2924.08.11. Attached the only entries in the logs, but unsure whether these are related. 354911936-714c3f54-35f3-47c5-9436-4ce594776cf8 Screenshot_20240824-213139_Chrome Screenshot_20240824-212623_Chrome

wills106 commented 2 months ago

@perjmolsen I don't know if 2024.08.12 will help with your issue, but it should resolve @granthgh issue. Where it can't read "Inverter Module"

wills106 commented 1 month ago

Has this been resolved so I can close this issue down?

granthgh commented 1 month ago

Issue still exists, but workaround, setting up as tcp and then changing to serial, gets round the issue.

wills106 commented 1 month ago

I didn't introduce the serial support, are you able to try and fix the issue? I don't use or own any RS485 equipment, so going to be difficult to fix from my end.

granthgh commented 1 month ago

The issue is that there's no errors recorded, so it needs someone with an offline system, as I need mine up and running to manage my inverter. I presume there have been significant changes since the working 2024.7, so difficult to identify the changes to the code that broke it. As there's a workaround then I think it can be put on the back burner and If you want I'm happy to look at the code to see if I can spot an issue.

shavermcspud commented 1 month ago

I had the same issues, I can confirm, re-configuring to TCP then saving, go back in and edit back to com port and it works.

wills106 commented 1 month ago

Just released 2024.09.3 which hopefully fixes this error.

rafalkur commented 1 month ago

Hello, Im using 2024.09.4 and trying to configure it with my growatt (via waveshare eth converter) for the first time. Initialization phase last forever, after configuring again with same settings im getting success box, but device is not added. in logs: File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 201, in async_unload_entry raise ValueError("Config entry was never loaded!") ValueError: Config entry was never loaded! 2024-09-22 21:55:14.051 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry growatt for button Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 819, in async_unload result = await component.async_unload_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/button/init.py", line 73, in async_unload_entry return await component.async_unload_entry(entry) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 201, in async_unload_entry raise ValueError("Config entry was never loaded!") ValueError: Config entry was never loaded! 2024-09-22 21:55:14.052 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry growatt for number Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 819, in async_unload result = await component.async_unload_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/number/init.py", line 134, in async_unload_entry return await component.async_unload_entry(entry) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 201, in async_unload_entry raise ValueError("Config entry was never loaded!") ValueError: Config entry was never loaded! 2024-09-22 21:55:14.052 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry growatt for select Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 819, in async_unload result = await component.async_unload_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/select/init.py", line 109, in async_unload_entry return await component.async_unload_entry(entry) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 201, in async_unload_entry raise ValueError("Config entry was never loaded!") ValueError: Config entry was never loaded! 2024-09-22 21:55:14.053 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry growatt for sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 819, in async_unload result = await component.async_unload_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 136, in async_unload_entry return await component.async_unload_entry(entry) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 201, in async_unload_entry raise ValueError("Config entry was never loaded!") ValueError: Config entry was never loaded! 2024-09-22 21:55:14.053 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry growatt for solax_modbus Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 819, in async_unload result = await component.async_unload_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/solax_modbus/init.py", line 184, in async_unload_entry hass.data[DOMAIN].pop(entry.options["name"]) KeyError: 'growatt' 2024-09-22 21:55:25.654 WARNING (MainThread) [custom_components.solax_modbus.plugin_growatt] growatt: attempt to read firmware failed at 0xbb9 Traceback (most recent call last): File "/config/custom_components/solax_modbus/plugin_growatt.py", line 64, in async_read_serialnr inverter_data = await hub.async_read_holding_registers(unit=hub._modbus_addr, address=address, count=6) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/solax_modbus/init.py", line 546, in async_read_holding_registers resp = await self._client.read_holding_registers(address, count, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pymodbus/client/base.py", line 183, in async_execute raise ModbusIOException( pymodbus.exceptions.ModbusIOException: Modbus Error: [Input/Output] ERROR: No response received after 6 retries 2024-09-22 21:55:25.655 WARNING (MainThread) [custom_components.solax_modbus.plugin_growatt] growatt: reading firmware number from address 0xbb9 failed; other address may succeed 2024-09-22 21:55:25.655 INFO (MainThread) [custom_components.solax_modbus.plugin_growatt] Read growatt 0xbb9 firmware number before potential swap: None 2024-09-22 21:55:25.655 ERROR (MainThread) [custom_components.solax_modbus.plugin_growatt] growatt: cannot find firmware version, even not for other Inverter 2024-09-22 21:55:25.655 ERROR (MainThread) [custom_components.solax_modbus.plugin_growatt] unrecognized growatt inverter type - firmware version : unknown 2024-09-22 21:55:25.655 INFO (MainThread) [custom_components.solax_modbus] next inverter check in 10sec 2024-09-22 21:55:35.656 INFO (MainThread) [custom_components.solax_modbus.plugin_growatt] growatt: trying to determine inverter type