wills106 / homeassistant-solax-modbus Goto Github PK
View Code? Open in Web Editor NEWSolaX Power Modbus custom_component for Home Assistant (Supports some Ginlong Solis, Growatt, Sofar Solar, TIGO TSI & Qcells Q.Volt Hyb)
SolaX Power Modbus custom_component for Home Assistant (Supports some Ginlong Solis, Growatt, Sofar Solar, TIGO TSI & Qcells Q.Volt Hyb)
"Total Solar Energy" is missing on the Earlier Gen2 SK-SU with serial number starting U50EC it just returns 0kWh.
But on what is assumed to be the later U50ED it returns a value which is believed to be correct at the moment.
There is a comment in the docs that "PvEnergyTotal" (which is "Total Solar Energy" in the integration) got added but then 4 months later got moved as was incorrect? So possibly Inverter U50EC got sent out with wrong register address? As the register mention works for the U50ED Inverter.
@matthewjporter to manually scan for a uint32 that could provide the missing value.
Describe the bug
Upgraded to 0.5.12
Now get "Unexpected exception importing component custom_components.solax_modbus" and integration is down
Mandatory details
Detailed Error Log
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/loader.py", line 553, in get_component
cache[self.domain] = importlib.import_module(self.pkg_path)
File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/config/custom_components/solax_modbus/__init__.py", line 19, in <module>
from .const import GEN2, GEN3, GEN4, X1, X3, HYBRID, AC, EPS, PV
File "/config/custom_components/solax_modbus/const.py", line 225, in <module>
SolaxModbusNumberEntityDescription( name = "Battery Minimum Capacity",
TypeError: __init__() got an unexpected keyword argument 'native_min_value'
i upgraded the integration via HACS today a few minor versions (to: 0.5.12 from: 0.5.something_sorry_dont_remember) which completely broke it.
what i did (i try to remember):
now i am out of ideas...
system information:
home assistant running in docker
Solax Inverter X3-Hybrid-8.0-D with Modbus-over-TCP
error in the logfile:
2022-08-01 06:08:30 ERROR (MainThread) [homeassistant.loader] Unexpected exception importing platform custom_components.solax_modbus.config_flow
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/loader.py", line 603, in get_platform
cache[full_name] = self._import_platform(platform_name)
File "/usr/src/homeassistant/homeassistant/loader.py", line 620, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/config/custom_components/solax_modbus/__init__.py", line 19, in <module>
from .const import GEN2, GEN3, GEN4, X1, X3, HYBRID, AC, EPS, PV
File "/config/custom_components/solax_modbus/const.py", line 225, in <module>
SolaxModbusNumberEntityDescription( name = "Battery Minimum Capacity",
TypeError: __init__() got an unexpected keyword argument 'native_min_value'
2022-08-01 06:08:30 ERROR (MainThread) [homeassistant.config_entries] Error occurred loading configuration flow for integration solax_modbus: Exception importing custom_components.solax_modbus.config_flow
is there anything else of information that i can provide ?
Does this integration work with the X3-MIC/PRO as I have installed it, and I get unknown everywhere. Any ideea how to fix this?
Thank you,
Cristian
Describe the bug
Every 4-6h hours and always overnight polling stops and I have to restart home-assistant to be working again.
Mandatory details
Detailed Error Log
no error i guess
The SolaX Battery Voltage Charge entity is showing the battery voltage multiplied by 10, currently it shows 529,8 V.
Describe the bug
I'm using this excellent integration since a week and wondering why I see every few seconds events called "SolaX Selfuse Backup SOC" with random int values in my logbook.I'm afraid that these are values that are written every few seconds into the inverter EEPROM. Is this a known bug?
Mandatory details
Hi,
On my X1 G4 it is showing as MWh, I think it ought to be kWh?
System up for less than a week, the Total Solar Energy value is 97.2 kWh but the Total Yield is showing 99.9MWh
Inverter X1-Hybrid-G3 serial XRE372BB14xxxx
Had to rollback to the previous release because of missing the following sensors:
sensor.solax_battery_input_energy_today
sensor.solax_battery_output_energy_today
sensor.solax_today_s_export_energy
sensor.solax_today_s_import_energy
Only total sensors are available and missing daily ones for both Grid import/export and battery input/output
Just realized that ALL today sensors are missing
Describe the bug
On the Gen3 Inverter number.solax_grid_export_limit is a dynamic sensor that normally tracks sensor.solax_inverter_power
But you also use it to control the export of the Inverter after selecting button.solax_grid_export
Once you have pressed button.solax_grid_export you would set number.solax_grid_export_limit to the amount you want to export for example 4000w
On version 0.7.0b12 &13 number.solax_grid_export_limit shows as unknown, with the slider to the left. If you try to move the slider the "Value" part when you move it displays NaN you also get a Popup
Failed to call service number/set_value. required key not provided @ data['value']
No errors are shown in the log with:
logger:
default: info
If you press somewhere along the slider itself you can set it to that value and then after that you can use the dot of the slider to move it.
Mandatory details
Detailed Error Log
2022-10-30 08:49:55.894 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new number.solax_modbus entity: number.solax_grid_export_limit
2022-10-30 08:50:06.905 INFO (MainThread) [custom_components.solax_modbus.number] writing SolaX grid_export_limit number register 82 value -2800 after div by readscale 1 scale 1
2022-10-30 08:50:08.653 INFO (MainThread) [custom_components.solax_modbus.number] writing SolaX grid_export_limit number register 82 value -4200 after div by readscale 1 scale 1
2022-10-30 08:50:09.690 INFO (MainThread) [custom_components.solax_modbus.number] writing SolaX grid_export_limit number register 82 value -1100 after div by readscale 1 scale 1
2022-10-30 08:51:33.172 INFO (MainThread) [custom_components.solax_modbus.number] writing SolaX grid_export_limit number register 82 value -4800 after div by readscale 1 scale 1
Additional context
Last working correctly on 0.7.0b11
Hi wills106,
great work with the integration!!!
I have changed my old config for it and it is working very well. Only I have discovered two sensor that don’t show the correct value in my case: ‘SolaX Battery Input Energy Today’ and ‘SolaX Today’s Solar Energy’. They show 0 kWh everytime. Is it possible because they are not pointing to the right address? or it could be because I may have an old firmware version?
thanks in advance for your support.
Hi, after installing the 0.7.0b10 the integration doesn't start. I had 0.7.0b9 working well.
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 365, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/solax_modbus/__init__.py", line 105, in async_setup_entry
_LOGGER.info(f"Ready to load plugin {config[CONF_PLUGIN]}")
KeyError: 'plugin'
Tried to reload, no success
2022-10-17 14:53:04.887 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration solax_modbus which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-10-17 14:53:11.940 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry SolaXM for solax_modbus
File "/config/custom_components/solax_modbus/__init__.py", line 105, in async_setup_entry
2022-10-17 15:05:23.833 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry SolaXM for solax_modbus
File "/config/custom_components/solax_modbus/__init__.py", line 105, in async_setup_entry
Home Assistant 2022.10.4
Supervisor 2022.10.0
Operating System 9.2
Frontend 20221010.0 - latest
After install the integration under HACS I can't find the integration in the HomeAssistant Integration screen. I can only go to the Integration page under HACS. But at this way I won't come into the Configuration Screen unfortunately.
How can I come to the Configuration?
Home Assistant 2022.9.4
Supervisor 2022.08.6
Operating System 8.5
Frontend-versie: 20220907.2
SolaX Inverter Modbus 0.6.1
The integration works perfectly fine. Though, when working with multiple (e.g. 2) instances of this integration, the problem occurs that all instances are not working any more, i.e. they seem to be stuck and do not deliver any data. The polling interval has been set to 2s and 5s respectively.
Hello,
Nice work!
Found little typo in all charger times
03:39 needs to be 03:30
Keep up the good work!
Greetz
Hi Will
Any idea why sensor.solax_consumed_energy_total is returning zero?
Solax Gen3 Hybrid
Every other sensores are working fine from what I checked already; I came from the old config and it was working fine.
Thanks a lot
Hi @wills106,
Fantastic work, just discovered and implementing it. I have a Gen3, however a friend of mine just installed a Gen4 and haven't seen it as an option while setting up the integration.
Do you have plans to integrate it?.
Thanks
Luis
I updated to the latest version (0.5.12) and I didn’t get any data from my GEN 2 inverter anymore. After this I tried earlier versions, but only version 0.5.7 - which I did have to install manually - did work again.
HI
I started receiving the attached log. They appear after reboot and usually after one or two reboots it works fine. Today I'm not able to make it works. It seems a module missing
2022-10-14 08:22:57.748 ERROR (MainThread) [homeassistant.setup] Setup failed for custom integration solax_modbus: Unable to import component: No module named 'pymodbus.client.sync'
Hi Guys,
I've been following the discussion between Will and Mark (Cavester) - https://community.home-assistant.io/t/solax-inverter-by-modbus-no-pocket-wifi-now-a-custom-component/140143/482
I tried running the latest beta and also the X1-AC-5 beta and I believe I'm getting the same results as Mark, everything appears as Unknown.
I tried with using Waveshare and the USB adapter with the same results.
When checking the logs I'm getting this output:
Traceback (most recent call last):
File "/config/custom_components/solax_modbus/init.py", line 202, in async_refresh_modbus_data
update_result = self.read_modbus_data()
File "/config/custom_components/solax_modbus/init.py", line 244, in read_modbus_data
return self.read_modbus_holding_registers_0() and self.read_modbus_holding_registers_1() and self.read_modbus_input_registers_0()
File "/config/custom_components/solax_modbus/init.py", line 264, in read_modbus_holding_registers_0
factoryname = decoder.decode_string(14).decode("ascii")
UnicodeDecodeError: 'ascii' codec can't decode byte 0x96 in position 8: ordinal not in range(128)
Happy to help in any way I can
Hi @wills106 - thanks for your work on this custom component, really excited to get it up and running.
Getting "unrecognized inverter type - serial number : unknown" - so posting my details here.
I posted this in the discussion group previously, but wasn't sure if this would count as an issue too.
X3-Hybrid-10.0-D
10kW
Three Phase
Dual MPPT
EPS - Yes External (I have EPS, how do I tell if it's External?)
Gen4
Serial: H34A
Thank you, please let me know if you need anything else! 🙏🏻
Having deleted the integration I don't upgrading the components in HACS when I try to re-add the integration I get the following error message:
This error originated from a custom integration.
Logger: homeassistant.config_entries
Source: custom_components/solax_modbus/init.py:254
Integration: SolaX Inverter Modbus (documentation, issues)
First occurred: 20:03:43 (1 occurrences)
Last logged: 20:03:43
Error setting up entry SolaX for solax_modbus
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 335, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/solax_modbus/init.py", line 89, in async_setup_entry
inverter_data = hub.read_holding_registers(unit=hub._modbus_addr, address=0x0, count=7)
File "/config/custom_components/solax_modbus/init.py", line 254, in read_holding_registers
return self._client.read_holding_registers(address, count, **kwargs)
File "/usr/local/lib/python3.9/site-packages/pymodbus/client/common.py", line 114, in read_holding_registers
return self.execute(request)
File "/usr/local/lib/python3.9/site-packages/pymodbus/client/sync.py", line 108, in execute
raise ConnectionException("Failed to connect[%s]" % (self.str()))
pymodbus.exceptions.ConnectionException: Modbus Error: [Connection] Failed to connect[ModbusTcpClient(192.168.151:502)]
Read my mind
You need to manually add select and number entities to your Lovelace card.
They are enabled by default but don't appear in the integration page.
Gen2 & 3
select.solax_charger_use_mode
select.solax_allow_grid_charge
number.solax_battery_charge_max_current
number.solax_battery_discharge_max_current
number.solax_battery_minimum_capacity
Gen3 Only
number.solax_forcetime_period_1_max_capacity
number.solax_forcetime_period_2_max_capacity
Gen4 ?
I'm back :-)
tried upgrade from 0.5.11 beta and gived me error, tried clean install removing everything from HA integration and HACS, during reinstalling given me the following:
Redownloading the beta works fine. The log is reporting the following:
Logger: homeassistant.setup
Source: setup.py:162
First occurred: 15:36:05 (1 occurrences)
Last logged: 15:36:05
Setup failed for custom integration solax_modbus: Unable to import component: cannot import name 'ATTR_MANUFACTURER' from partially initialized module 'custom_components.solax_modbus.const' (most likely due to a circular import) (/config/custom_components/solax_modbus/const.py)
The problem though is that I have not worked out an easy way to program them within HA.
The first problem is that for built in Integrations (custom_components) there is no equivalent to input.date_time so I would either need a separate number entry for hours and mins for each time block. So a total of 8 number.solax_
Which would result in quite a messy user interface.
The other option is to look into how I monitor a user created input.date_time
Which would either need the user to follow an exact naming convention, or for the option to put in the various input.date_time into the initial Integration Configuration page. So it knows what to monitor.
Then to complicate things more SolaX decided that while you read hours as a single 16bit entry and minutes as another 16bit entry, you program both the hours and minutes for a timeslot as a single 16bit number. Using hi 8bit for mins and the low 8bit as the hours.
So if you want to program the Start Time of Slot 1 you need to do the following for 09:10 am
Hbyte = 10
Lbyte = 9
value = Hbyte << 8 | Lbyte;
Which gives you the number of 2569 which is what you program to the corresponding register.
This issue was reported by @mudshurko in the HA community
SolaX app and device display shows value e.g. 9000
In the solaxcloud webpage, it shows 900
Our integration in HA shows also 900
Serial number prefix: H34T10H
Device versions:
Firmware Version Inverter Master: 15
Firmware Version Manager: 14
Firmware Version Modbus TCP Major: 0
Firmware Version Modbus TCP Minor: 6
ARM: 2.03
DSP: 2.07
Other info from the thread:
tried now to set 9000 (developer tools)
then I get in the inverter 90.000
As the cloud webpage suffers from the same problem, it is unsure if the error is in our code, but we fear that other users may encounter the same problem
After the update - when changing use mode it changes back after 2-4s. Tried also change via Node-Red - same, the use mode cannot be changed any longer from HA.
It used to be very stable - have used Node-Red all winter to buy at the 7 cheapest hours, with a check for lower/higher prices after midnight. It has worked perfectly until the recent update. Now it can not be changed manual (from dropdown) or from Node-Red.
Tried to remove the integration and reinstalled it (after updating of the repository) - the same thing.
As of Home Assistant Core 2022.11, options is available as a standard property of SelectEntityDescription.
This may cause issues in custom components if a custom options property was previously implemented.
Please adjust the custom component by either dropping or renaming the custom options property.
Describe the bug
I have been looking at the MANY sensors created for my X1-Hybrid Gen4 inverter and trying to create a dashboard to show them. I have been using the below sensors:
But things don't seem to add up... If i do the calculations manually i get the below:
PV Total Power - Battery Power Charge = House Load
555 - 404 = 151
But the "House Load" Sensor is 245 (Which i think it more accurate - based on my typical house use)
Can you help me understand what is happening here and why these numbers don't add up - have i misunderstood the sensors?
Since upgrading to the 0.7.0b series I
These entities are no longer available.
I switched to the beta at 0.7.0b26 and all versions since are the same.
I uninstalled and reinstalled the integration prior to upgrade as suggested.
Running 2022.11.2 with supervisor 20221108.0
No log errors
Inverter is an XAC362……..
I’ve noticed also that the “Solax grid export limit” seems to be dynamic, showing positive and negative figures,similar to the reverse of the “inverter power” output, while I would have expected a limit to be static?
I’m away at the moment but will try and respond
Can you please share a link to the vircom tool? Im trying to setup the waveshare but cant find the tool referenced in the documentation.
Hey Will
Missing the "Today's Yield" sensor on the Gen2 X1
If i setup as a Gen3 X1 I get them
Cheers
Hi,
I've found out that home-assistant.log is being flooded by Solax Modbus integration records. I have HAOS running on a x86 machine, connected to the inverter by USB-RS485 dongle, inverter type X3 hybrid G4. Any suggestions, please?
022-10-24 14:13:03.505 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for solax_modbus doing blocking calls at custom_components/solax_modbus/__init__.py, line 296: return self._client.read_input_registers(address, count, **kwargs) 2022-10-24 14:13:03.586 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for solax_modbus doing blocking calls at custom_components/solax_modbus/__init__.py, line 296: return self._client.read_input_registers(address, count, **kwargs) 2022-10-24 14:13:08.226 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for solax_modbus doing blocking calls at custom_components/solax_modbus/__init__.py, line 290: return self._client.read_holding_registers(address, count, **kwargs) 2022-10-24 14:13:08.315 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for solax_modbus doing blocking calls at custom_components/solax_modbus/__init__.py, line 290: return self._client.read_holding_registers(address, count, **kwargs) 2022-10-24 14:13:08.387 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for solax_modbus doing blocking calls at custom_components/solax_modbus/__init__.py, line 296: return self._client.read_input_registers(address, count, **kwargs) 2022-10-24 14:13:08.499 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for solax_modbus doing blocking calls at custom_components/solax_modbus/__init__.py, line 296: return self._client.read_input_registers(address, count, **kwargs) 2022-10-24 14:13:08.580 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for solax_modbus doing blocking calls at custom_components/solax_modbus/__init__.py, line 296: return self._client.read_input_registers(address, count, **kwargs) 2022-10-24 14:13:13.225 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for solax_modbus doing blocking calls at custom_components/solax_modbus/__init__.py, line 290: return self._client.read_holding_registers(address, count, **kwargs) 2022-10-24 14:13:13.314 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for solax_modbus doing blocking calls at custom_components/solax_modbus/__init__.py, line 290: return self._client.read_holding_registers(address, count, **kwargs) 2022-10-24 14:13:13.386 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for solax_modbus doing blocking calls at custom_components/solax_modbus/__init__.py, line 296: return self._client.read_input_registers(address, count, **kwargs) 2022-10-24 14:13:13.498 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for solax_modbus doing blocking calls at custom_components/solax_modbus/__init__.py, line 296: return self._client.read_input_registers(address, count, **kwargs) 2022-10-24 14:13:13.579 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for solax_modbus doing blocking calls at custom_components/solax_modbus/__init__.py, line 296: return self._client.read_input_registers(address, count, **kwargs) 2022-10-24 14:13:18.227 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for solax_modbus doing blocking calls at custom_components/solax_modbus/__init__.py, line 290: return self._client.read_holding_registers(address, count, **kwargs) 2022-10-24 14:13:18.315 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for solax_modbus doing blocking calls at custom_components/solax_modbus/__init__.py, line 290: return self._client.read_holding_registers(address, count, **kwargs) 2022-10-24 14:13:18.388 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for solax_modbus doing blocking calls at custom_components/solax_modbus/__init__.py, line 296: return self._client.read_input_registers(address, count, **kwargs) 2022-10-24 14:13:18.500 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for solax_modbus doing blocking calls at custom_components/solax_modbus/__init__.py, line 296: return self._client.read_input_registers(address, count, **kwargs) 2022-10-24 14:13:18.581 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for solax_modbus doing blocking calls at custom_components/solax_modbus/__init__.py, line 296: return self._client.read_input_registers(address, count, **kwargs) 2022-10-24 14:13:23.228 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for solax_modbus doing blocking calls at custom_components/solax_modbus/__init__.py, line 290: return self._client.read_holding_registers(address, count, **kwargs) 2022-10-24 14:13:23.317 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for solax_modbus doing blocking calls at custom_components/solax_modbus/__init__.py, line 290: return self._client.read_holding_registers(address, count, **kwargs) 2022-10-24 14:13:23.390 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for solax_modbus doing blocking calls at custom_components/solax_modbus/__init__.py, line 296: return self._client.read_input_registers(address, count, **kwargs)
`
Seems like HA 2022.7 has introduced a change for Time sensors.
If you turn "RTC" on you get the following error.
TypeError: unsupported operand type(s) for: 'datetime.datetime' and 'int'
Seems like the inverter swaps both values when the backup_discharge_min_soc is modified though HA.
One would expect that modifying backup_nightcharge_upper_soc shows a similar problem, but that is not the case.
Reading both values is correct (compared to the solax app)
I believe this is not an error in our integration, but in the firmware of (some) Gen4 inverters.
The integraton seems to use the correct registers.
Dont know if we should keep this as an open issue since I believe the error is in the Solax firmware.
Version info my Hybrid X3:
Master: 10
Mgr: 3
Modbus TCP 0 6
ARM: 2.03
DSP: 2.07
if I look at the entities list for the solax modbus integration there does not seem to be an entity for pv power as there was in devious versions.
Hello Will,
I have corrected this error in my development fork, but as this fork contains significant code resturcturing, the error can be solved by removing one comma (,) sign in the button.py code:
remove the comma at the end of line:
self._modbus_addr = modbus_addr,
python makes a list instead of an integer due to that comma
Describe the bug
Recently started using this plugin with my solis RHI-5K-48ES-5G
after changing the serialnumber in the plugin_solis.py my instance started working.
Most of the entities are populated but i get one error in the log:
2022-11-09 16:31:20.570 ERROR (MainThread) [custom_components.solax_modbus] SolisModbus error reading input registers at device 1 position 0x8166
Mandatory details
Detailed Error Log
2022-11-09 16:31:20.570 ERROR (MainThread) [custom_components.solax_modbus] SolisModbus error reading input registers at device 1 position 0x8166
Additional context
tried reading the plugin_solis.py for 8166 reference but there is none.
When viewing the history graph, there might be a problem with reading the Inverter Voltage, the active power, or the inverter current wich turns to 0 or something like that.
Not sure when this crept in but as I was going over my HA log, I noticed I get the following error in my log, it comes up twice for each instance of my integration and seems to be on HA startup/reboot etc
I have added just a single instance (I have two Gen2 inverters) and only get the error twice for that integration
Mandatory details
2022-08-25 12:00:40.591 ERROR (MainThread) [homeassistant.components.button] Error adding entities for domain button with platform solax_modbus
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 428, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 468, in _async_add_entity
entity.add_to_platform_start(
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 745, in add_to_platform_start
raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: Entity button.solax1_battery_awaken cannot be added a second time to an entity platform
2022-08-25 12:00:40.637 ERROR (MainThread) [homeassistant.components.button] Error while setting up solax_modbus platform for button
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 289, in _async_setup_platform
await asyncio.gather(*pending)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 428, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 468, in _async_add_entity
entity.add_to_platform_start(
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 745, in add_to_platform_start
raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: Entity button.solax1_battery_awaken cannot be added a second time to an entity platform
It is not affecting the running of my HA but is an error being logged
Regards
Describe the bug
After adding the integration using HACS no inverter information is displayed in HA (0W is all that is displayed)
Mandatory details
Detailed Error Log
There aren't really any "errors", just no data? I do see"unknown status" when looking at "Solax Inverter status" but most of the items simply show 0W.
If there are no log's showing for SolaX try the following depending on your language settings, you can find the full logs under:
Ok, looking through this it might be related to a missing serial number? I see a few entries that relate to this...
Logger: custom_components.solax_modbus
Source: custom_components/solax_modbus/init.py:92
Integration: SolaX Inverter Modbus (documentation, issues)
First occurred: 1:05:13 PM (1 occurrences)
Last logged: 1:05:13 PM
reading serial number from address 0 failed; other address may succeed
and
This error originated from a custom integration.
Logger: custom_components.solax_modbus
Source: custom_components/solax_modbus/init.py:95
Integration: SolaX Inverter Modbus (documentation, issues)
First occurred: 1:05:18 PM (1 occurrences)
Last logged: 1:05:18 PM
cannot find serial number, even not for MIC
Additional context
I'm sorry if I have done anything stupid, this is my first use of HA, HACS etc and I'm struggling a bit :-(
Describe the bug
A clear and concise description of what the bug is.
Mandatory details
Detailed Error Log
2022-10-12 09:15:14.764 WARNING (MainThread) [custom_components.solax_modbus] reading serial number from address 0 failed; other address may succeed
2022-10-12 09:15:19.770 WARNING (MainThread) [custom_components.solax_modbus] reading serial number from address 768 failed; other address may succeed
2022-10-12 09:15:19.771 ERROR (MainThread) [custom_components.solax_modbus] cannot find serial number, even not for MIC
2022-10-12 09:15:19.771 ERROR (MainThread) [custom_components.solax_modbus] unrecognized inverter type - serial number : unknown
Hello, I am trying to connect to my new X1 Hybrid Gen 4, I have set up the Waveshare device as per the screenshots provided and connected it to my Gen4's LCD/COM port but when trying to make the connection in home assistant i get the above error. Im not sure if its a problem with the modbus address that is being used. I have tried to connect by checking and unchecking the "Dry Contact Box (Gen4)" option but still nothing.
Yes, it's great with community efforts :)
Thanks again, I'll take a deep dive in all settings and do some trial and error first.
Originally posted by @stringkillersa in #39 (reply in thread)
Describe the bug
Defined by error report
Mandatory details
Detailed Error Log
This error originated from a custom integration.
Logger: homeassistant.config_entries
Source: custom_components/solax_modbus/plugin_solis.py:273
Integration: SolaX Inverter Modbus (documentation, issues)
First occurred: 11:25:37 (1 occurrences)
Last logged: 11:25:37
Error setting up entry solax for solax_modbus
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 365, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/solax_modbus/init.py", line 92, in async_setup_entry
plugin = importlib.import_module(f".plugin_{plugin_name}", 'custom_components.solax_modbus')
File "/usr/local/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/config/custom_components/solax_modbus/plugin_solis.py", line 273, in
scale = value_function_rtc,
NameError: name 'value_function_rtc' is not defined
Detailed Error Log, if you press on the individual error further information is displayed.
This is the content we need, the description alone doesn't provide enough context.
If there are no log's showing for SolaX try the following depending on your language settings, you can find the full logs under:
Settings → System → Logs > at bottom of page press “LOAD FULL LOGS”
Now the full logs are loaded. If you scroll down, you will see them.
Once the full logs are shown, you can either use the search function in your browser to search for “solax” related entries or use the search entry field on top of the page.
Search for
solax
and report us the logs. Make sure to replace sensitive information by xxxx (if any)
Additional context
Add any other context about the problem here.
Sorry if this is the wrong place to report - I'm a user not a developer
Hi, I have an immersion controller V1 paired to the SolarEdge HD wave inverter , can you update this code to make that one available as a Switch , which can be used for automation purposes.
after update to 0.5.9 most of the entities went "unknown". Rolling back to 0.5.8 fixed issue.
Hey,
first of all thanks for your work. It really helped me a lot and was working really well for me until yesterday evening.
Since then all the entities switched to unknown and never came back.
In the logs there was a message saying the request was canceld by the peer or something similar. I don't see it anymore. As a first troubleshooting step I upgraded your integration from 0.3.3 to 0.4.10 and reconfigured the integration. Now I don't get any log output but still all entities are unavailable.
The inverter is still connected to the network and I am able to ping it. I was doing some changes on my Homeassistant instance yesterday but everything worked fine when I stopped.
Do you have any idea what might be the issue here? Is it possible there was an update for the inverter which broke the interface?
Thanks for any help:)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.