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]: Grid entity not showing expected values #931

Open finalbillybong opened 1 week ago

finalbillybong commented 1 week ago

Describe the bug

I'm brand new to Solax so please bear with me if I have made a silly error.

I have just finished setting up automations for charging and discharging my batteries.

Upon testing the charge automation I notice that the grib import firgure is always lower than expected.

I attatch two screnn shots (taken a min or so apart).

Energy Card ENTITIES

Is there an 'offset' I can apply here to make the figures line up for am I missing somthing obvious?

Integration Version

2024.05.7

Homeassistant core version

2024.6.3

Inverter brand

SolaX

Plugin used

plugin_solax.py

Serial prefix

H4502A

Inverter firmware versions

DSP v1.43 ARM v1.40

Connection Method

Wifi Pocket 3.0

Dongle firmware

3.015.02

Detailed Error Log

2024-06-18 19:32:17.489 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'hacs' accesses hass.helpers.event. This is deprecated and will stop working in Home Assistant 2024.11, it should be updated to import functions used from event directly at custom_components/hacs/base.py, line 642: self.hass.helpers.event.async_track_time_interval(, please create a bug report at https://github.com/hacs/integration/issues 2024-06-18 19:32:34.707 WARNING (MainThread) [homeassistant.util.loop] 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")) 2024-06-18 19:40:04.408 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open inside the event loop by custom integration 'solax_modbus' at custom_components/solax_modbus/init.py, line 325: with open(self._hass.config.path(f"{self.name}_data.json"), "w") as fp: (offender: /config/custom_components/solax_modbus/init.py, line 325: with open(self._hass.config.path(f"{self.name}_data.json"), "w") as fp:), 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 792, in async_read_modbus_registers_all self.saveLocalData() File "/config/custom_components/solax_modbus/init.py", line 325, in saveLocalData with open(self._hass.config.path(f"{self.name}_data.json"), "w") as fp: 2024-06-18 19:50:04.471 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open inside the event loop by custom integration 'solax_modbus' at custom_components/solax_modbus/init.py, line 325: with open(self._hass.config.path(f"{self.name}_data.json"), "w") as fp: (offender: /config/custom_components/solax_modbus/init.py, line 325: with open(self._hass.config.path(f"{self.name}_data.json"), "w") as fp:), 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 792, in async_read_modbus_registers_all self.saveLocalData() File "/config/custom_components/solax_modbus/init.py", line 325, in saveLocalData with open(self._hass.config.path(f"{self.name}_data.json"), "w") as fp: 2024-06-18 20:00:04.573 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open inside the event loop by custom integration 'solax_modbus' at custom_components/solax_modbus/init.py, line 325: with open(self._hass.config.path(f"{self.name}_data.json"), "w") as fp: (offender: /config/custom_components/solax_modbus/init.py, line 325: with open(self._hass.config.path(f"{self.name}_data.json"), "w") as fp:), 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 792, in async_read_modbus_registers_all self.saveLocalData() File "/config/custom_components/solax_modbus/init.py", line 325, in saveLocalData with open(self._hass.config.path(f"{self.name}_data.json"), "w") as fp:

Additional context

No response