Open DemigodCode opened 5 months ago
Hi,
sorry to hear that!
Could you describe in more detail what happened? Strange thing is that I recently installed one SH10.RT rev112 myself for a friend. All the set* functions worked fine via GUI sliders.
I will make some updates soon and ensure to write a comment on each undocumented sensor. In the current version 1.1.2 of the modbus procotoll documentation the max charging and discharging power parameters are now documented. So they should not cause your issues.
This leaves following registers as possible culprits:
Could you test max charging and discharging registers?
Was anything regarding the other registers in the HA log files?
Can I somehow back up all settings using modbus?
I only have a user iSolarCloud account so I cannot back them up there and don't want to have my electrician to set it up again. ;-)
Don't know which parameter caused this. And don't know how to figure out.
If I change a parameter through modbus does it send the whole configuration again or the parameter to change only? I don't have much knowledge about the modbus protocol.
Do you have an idea why the holding register values differs to the other one?
unfortunately, its not easily possible via modbus (possible, but involves some work).
it is easier via isolarcloud: you can backup the current settings by logging in to isolarcloud via installers account. if you don't have one, create one with another email address. Sungrow does not check, if it is an anctual company behind installers accounts or not.
I assume the set parameters from the installers are
Okay, I've got the time to set up a anstaller account and to create a template of my parameters.
But in HomeAssistant it's like it's not reading the parameters as it should. Logs look like that:
` 2024-05-04 22:06:02.836 WARNING (MainThread) [homeassistant.components.modbus.modbus] modbus SungrowSHx communication closed 2024-05-04 22:06:03.062 ERROR (MainThread) [homeassistant.helpers.event] Error while processing template: Template<template=({{ (states('sensor.total_imported_energy_cost')) | float |round(2) }}) renders=2> Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1984, in forgiving_float_filter return float(value) ^^^^^^^^^^^^ ValueError: could not convert string to float: 'unknown'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 567, in async_render render_result = _render_with_context(self.template, compiled, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 2305, in _render_with_context return template.render(kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 1301, in render self.environment.handle_exception() File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 936, in handle_exception raise rewrite_traceback_stack(source=source) File "", line 1, in top-level template code File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1987, in forgiving_float_filter raise_no_default("float", value) File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1625, in raise_no_default raise ValueError( ValueError: Template error: float got invalid input 'unknown' when rendering template '{{ (states('sensor.total_imported_energy_cost')) | float |round(2) }}' but no default was specified
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 693, in async_render_to_info render_info._result = self.async_render( ^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 569, in async_render raise TemplateError(err) from err homeassistant.exceptions.TemplateError: ValueError: Template error: float got invalid input 'unknown' when rendering template '{{ (states('sensor.total_imported_energy_cost')) | float |round(2) }}' but no default was specified 2024-05-04 22:06:03.074 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('ValueError: Template error: float got invalid input 'unknown' when rendering template '{{ (states('sensor.total_imported_energy_cost')) | float |round(2) }}' but no default was specified') while processing template 'Template<template=({{ (states('sensor.total_imported_energy_cost')) | float |round(2) }}) renders=4>' for attribute '_attr_native_value' in entity 'sensor.daily_imported_energy_cost' 2024-05-04 22:06:03.075 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.daily_exported_energy_compensation (<class 'homeassistant.components.template.sensor.SensorTemplate'>) is using native unit of measurement '€' which is not a valid unit for the device class ('energy') it is using; expected one of ['MJ', 'MWh', 'Wh', 'kWh', 'GJ']; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+template%22 `
And now to show you what the difference is:
The Min SoC looks strange too with two different values: Current iSolarCloud: 10%
Am I missing something?
Cannot find (states('sensor.total_imported_energy_cost')) in this repositories YAML file. I guess the error comes from somewhere else. Can you double-check?
The max battery charge / discharge entities come with a default maximum of 5000 W since @mkaiser can't know your actual battery size / parameters. You should adjust it to match your actual battery parameters. I assume it will then display the correct value.
You can find them here: https://github.com/mkaiser/Sungrow-SHx-Inverter-Modbus-Home-Assistant/blob/main/modbus_sungrow.yaml#L2325 and here: https://github.com/mkaiser/Sungrow-SHx-Inverter-Modbus-Home-Assistant/blob/main/modbus_sungrow.yaml#L2331
regarding installers accounts to enable advanced settings and backup @mkaiser -- I can create an installers account and login on it -- but how do I attach my existing plant to it, in order to do anything?
When I "create" a plant and then enter a serial number of the comms dongle it says (rightly) it is already taken. thanks.
You share the plant from your regular account to your installer account.
Before you create an issue, make sure to update to the current version of modbus_sungrow.yaml
Describe the bug:
The undocumented holding registers of the Inverters destroys the configuration of my inverter. If I use one of them, they are overwritting a couple of settings and make the inverter not discharge the battery anymore until I load configuration defaults of the inverter. The holding register discharge is not the same as the input register one. It seems like it's destroyed after changing the min soc too.
Model: SH-10.RT v112
[x] LAN (internal port)
[] WiNet-S (LAN) (connected but not used for Modbus)
Are you using a Modbus Proxy (mark one)
Home Assistant version:
modbus_sungrow.yaml:
Inverter Firmware Status:
To Reproduce Steps to reproduce the behavior:
Expected behavior They should be marked as EXPERIMENTAL... That took me so much of my time to figure out what the problem is and what it did change.
Screenshots