wills106 / homeassistant-solax-modbus

SolaX Power Modbus custom_component for Home Assistant (Supports some Ginlong Solis, Growatt, Sofar Solar, TIGO TSI & Qcells Q.Volt Hyb)
281 stars 85 forks source link

[Bug]: 'Growatt' - 'MOD 10KTL3-XH' Priority not working #940

Open petper opened 5 days ago

petper commented 5 days ago

Describe the bug

Hello, I have a Growatt MOD 10KTL3-XH with batteries, and everything works well. I have an issue that the priority isnt working. As soon as i change these to anything, it takes ~10 seconds and it changes back to "Load first" image

image

I think this is due to a registry error, so it might be needed for adjusting. I am not really familiar with debugging for getting correct data, so I would like some help with it, so I can provide more data.

Integration Version

2024.05.7

Homeassistant core version

2024.6.3

Inverter brand

Growatt

Plugin used

plugin_growatt.py

Serial prefix

015100

Connection Method

Waveshare RS485 TO ETH (B)

Detailed Error Log

Detected blocking call to open inside the event loop by custom integration 'solax_modbus' at custom_components/solax_modbus/init.py, line 332: fp = open(self._hass.config.path(f"{self.name}_data.json")) (offender: /config/custom_components/solax_modbus/init.py, line 332: fp = open(self._hass.config.path(f"{self.name}_data.json"))), please create a bug report at https://github.com/wills106/homsassistant-solax-modbus/issues Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/main.py", line 223, in sys.exit(main()) File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 672, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 639, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1988, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/config/custom_components/solax_modbus/init.py", line 377, in _refresh await self.async_refresh_modbus_data(grp, _now) File "/config/custom_components/solax_modbus/init.py", line 403, in async_refresh_modbus_data update_result = await self.async_read_modbus_data(group) File "/config/custom_components/solax_modbus/init.py", line 619, in async_read_modbus_data res = await self.async_read_modbus_registers_all(group) File "/config/custom_components/solax_modbus/init.py", line 795, in async_read_modbus_registers_all self.loadLocalData() File "/config/custom_components/solax_modbus/init.py", line 332, in loadLocalData fp = open(self._hass.config.path(f"{self.name}_data.json"))

Additional context

Serial prefix unable to get from HA, When enabling the entities all sensors goes offline. Information got from Growatt site