-
-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid value active power after update HA core 2024.12 #316
Comments
Hi @Pstart, you are running containerized home assistant? |
Hi, no i use Assistant OS on x86-64 hardware Core |
Did you try downgrade of the core (to some known to be working) to see of the problem prevails? Edit: 2024.12 contains python upgrade to 3.13 and I'm for now not sure what's different there what could cause issues like this but it's the best candidate nevertheless. |
@davidrapan Yes, I downgraded version to 2024.11.3 that's all working good. But when ha-sofarman well work good on 2024.12? |
Once I figure out what's wrong, because right now I don't have even slight idea... as everything works w/o any issues on my installation w/ 2024.12.2. |
Same problem with inverter file sofar_g3hyd.yaml |
I also have the same issue with sofar_g3hyd.yaml file |
Can someone record 10 minute debug log? |
@davidrapan this is the log from HA:
How can I create the debug log? Happy to provide it ... |
Sent it to you via mail (hope that is fine) ... |
Having the same issue :( |
I did not receive any debug logs. Please upload it here in the thread. 😉 |
Hi David, part of the code corrected :
|
@maconly34, it's there for a reason. You proly checked scale modifier in the options. 😉 |
Sorry, was a bit busy over xmas ... I also updated to 2025.01 already, here are the necessary parts from the debug logs:
and then I tried to change the config to sofar_hyd-es.yaml and back to sofar_g3hyd.yaml, which resulted in the following output:
|
That first part is not full error and in this state I have no chance to find out what the error is about. |
You are right, I missed a crucial part in the first log: I also updated to log at the top ... |
That should not happen. You can fix that by removing and re-adding device back. |
That did solve it for me 🎉 |
@davidrapan attachment it is my debug log. Now I have ActivePower_PCC_R - 65,496 W |
Hi @davidrapan, attached log is good? |
I need debug log from latest version of integration (and correctly formatted if possible). |
Hi @davidrapan , all is latest version Core 2025.1.2 |
F*ck, there is an error w/
which prevents most of the requests from completion. But it has nothing to do w/ the original issue though. |
fix: ValueError: The truth value of an array with more than one element is ambiguous for the issue above. And can someone test latest version of the code in the repo (requires manual installation) and change row
to
and see if it helps w/ reporting of incorrect values? Thanks! |
Hi @githubDante, would you mind help me understand what's going on?
I don't want to just blatantly fix it and call it a day, but rather understand what they did? |
I can only test the latest version next week when back 'home'. Hope someone else can do before.... |
Yes. |
So, your installation is not updating modules for some reason. |
Maybe a problem with the DEV zip file not correct? |
If I install the zip files in the folder I have the not loaded problem. |
No, HA should install pymodbus==3.8.3 module during startup but he's not for some reason. |
I am also using modbus for other integration (Nibe heatpumps) also I have
the statement
modbus:
with a tcp connection in my configuration.yaml
Can this have influence?
Can I install pymodbus by hand?
Regards,
Pedro
…On Wed, 5 Feb 2025 at 18:32, David Rapan ***@***.***> wrote:
No, HA should install pymodbus==3.8.3 module during startup but he's not
for some reason.
—
Reply to this email directly, view it on GitHub
<#316 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIJTIV6YOLUPPBROFHTXV7T2OJDL7AVCNFSM6AAAAABTOLMYV2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMZXGU4DGMBRG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Nope.
Yes, but it's not that easy. You would need to run Or you can wait few hours for new core release as 3.8.3 will be part of it natively. |
True, it was not easy, but I succeeded.
Found out that pymodbus 3.7.4 was installed.
It was uninstalled and the 3.8.3 version was installed
Installed the files again and reboot.
Still the same error: solarmap integration not loaded
log file:
2025-02-05 20:44:57.922 ERROR (MainThread) [homeassistant.config_entries]
Config entry 'zcs' from integration solarman has an invalid unique_id
'2733874612' of type int when a string is expected, please create a bug
report at https://github.com/davidrapan/ha-solarman/issues
2025-02-05 20:44:57.922 ERROR (MainThread) [homeassistant.config_entries]
Config entry 'zcs' from integration solarman has an invalid unique_id
'2733874612' of type int when a string is expected, please create a bug
report at https://github.com/davidrapan/ha-solarman/issues
…On Wed, 5 Feb 2025 at 19:07, David Rapan ***@***.***> wrote:
Can this have influence?
Nope.
Can I install pymodbus by hand?
Yes, but it's not that easy. You would need to run pip install pymodbus
--upgrade inside supervisor. You can try to google exact steps for your
specific installation: HAOS, containerized, etc.
—
Reply to this email directly, view it on GitHub
<#316 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIJTIV5E5C7Y6OAECPZVHQL2OJHM5AVCNFSM6AAAAABTOLMYV2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMZXGY3DCNZZGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
It's not the same error, just status report which can have only two states Remove and re-add device back. |
Sorry, but again same error....
…On Wed, 5 Feb 2025 at 20:51, David Rapan ***@***.***> wrote:
Remove and re-add device back.
—
Reply to this email directly, view it on GitHub
<#316 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIJTIV5GAYY7WS2BPX66SI32OJTTPAVCNFSM6AAAAABTOLMYV2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMZXHA4DONJWGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
You are doing something wrong then. |
No idea what it should be.
I copy all the DEV files into the directory and reinstall the integration.
After reboot the integration doesn’t want to load with the error I sent
you. What can be wrong here…..
I will now wait for the official release and hope for the better…
Op wo 5 feb 2025 om 21:08 schreef David Rapan ***@***.***>
… You are doing something wrong then.
—
Reply to this email directly, view it on GitHub
<#316 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIJTIVY27KROVRKSAO4ZZGD2OJVTNAVCNFSM6AAAAABTOLMYV2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMZXHEYTSOJRGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I told you to remove and re-add device back after restart... Steps:
Edit: And if it still doesn't work then enable debug log and try to add device w/ it enabled... Always attach debug log, ALWAYS. I can't conjure up what's happening w/o it. "It doesn't work" is never enough information, NEVER. |
I have done it like this
Op wo 5 feb 2025 om 21:25 schreef David Rapan ***@***.***>
… I told you to remove and re-add device back after restart...
Steps:
- Copy over all dev files
- Restart HA
- Remove device
- Re-add back again
—
Reply to this email directly, view it on GitHub
<#316 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIJTIV3IKJLTOVADO73SP4L2OJXSPAVCNFSM6AAAAABTOLMYV2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMZXHE2DSNRRGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Add device w/ debug log enabled. |
Ok. Do tomorrow
Op wo 5 feb 2025 om 21:41 schreef David Rapan ***@***.***>
… *Add device w/ debug log enabled.*
—
Reply to this email directly, view it on GitHub
<#316 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIJTIVYREI74IS2XQ2MVR7L2OJZQ5AVCNFSM6AAAAABTOLMYV2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMZXHE3TSMBZGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I have tried this.
This morning downloaded the latest DEV zip file and installed in
custom_components.
Reboot the system and tried to install the device.
Error message that the integration was not loaded
log file:
Logger: homeassistant.setup
Source: setup.py:334
First occurred: 10:19:04 AM (1 occurrences)
Last logged: 10:19:04 AM
Setup failed for custom integration 'solarman': Unable to import component:
cannot import name 'bit_msg' from 'pymodbus.pdu.decoders'
(/usr/local/lib/python3.13/site-packages/pymodbus/pdu/decoders.py)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/loader.py", line 1015, in
async_get_component
comp = await self.hass.async_add_import_executor_job(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
self._get_component, True
^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 59,
in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/loader.py", line 1075, in
_get_component
ComponentProtocol, importlib.import_module(self.pkg_path)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/util/loop.py", line 200, in
protected_loop_func
return func(*args, **kwargs)
File "/usr/local/lib/python3.13/importlib/__init__.py", line 88, in
import_module
return _bootstrap._gcd_import(name[level:], package, level)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1331, in
_find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 1026, in exec_module
File "<frozen importlib._bootstrap>", line 488, in
_call_with_frames_removed
File "/config/custom_components/solarman/__init__.py", line 17, in
<module>
from .coordinator import Device, Coordinator
File "/config/custom_components/solarman/coordinator.py", line 11, in
<module>
from .device import Device
File "/config/custom_components/solarman/device.py", line 11, in <module>
from .pysolarman.pysolarman import FUNCTION_CODE, Solarman
File "/config/custom_components/solarman/pysolarman/pysolarman.py", line
11, in <module>
from pymodbus.pdu.decoders import bit_msg, reg_msg, DecodePDU
ImportError: cannot import name 'bit_msg' from 'pymodbus.pdu.decoders'
(/usr/local/lib/python3.13/site-packages/pymodbus/pdu/decoders.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 334, in
_async_setup_component
component = await integration.async_get_component()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1035, in
async_get_component
self._component_future.result()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1027, in
async_get_component
comp = self._get_component()
File "/usr/src/homeassistant/homeassistant/loader.py", line 1075, in
_get_component
ComponentProtocol, importlib.import_module(self.pkg_path)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/util/loop.py", line 200, in
protected_loop_func
return func(*args, **kwargs)
File "/usr/local/lib/python3.13/importlib/__init__.py", line 88, in
import_module
return _bootstrap._gcd_import(name[level:], package, level)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1331, in
_find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 1026, in exec_module
File "<frozen importlib._bootstrap>", line 488, in
_call_with_frames_removed
File "/config/custom_components/solarman/__init__.py", line 17, in
<module>
from .coordinator import Device, Coordinator
File "/config/custom_components/solarman/coordinator.py", line 11, in
<module>
from .device import Device
File "/config/custom_components/solarman/device.py", line 11, in <module>
from .pysolarman.pysolarman import FUNCTION_CODE, Solarman
File "/config/custom_components/solarman/pysolarman/pysolarman.py", line
11, in <module>
from pymodbus.pdu.decoders import bit_msg, reg_msg, DecodePDU
ImportError: cannot import name 'bit_msg' from 'pymodbus.pdu.decoders'
(/usr/local/lib/python3.13/site-packages/pymodbus/pdu/decoders.py)
…On Wed, 5 Feb 2025 at 21:53, Pedro en Rikie van der Werf ***@***.***> wrote:
Ok. Do tomorrow
Op wo 5 feb 2025 om 21:41 schreef David Rapan ***@***.***>
> *Add device w/ debug log enabled.*
>
> —
> Reply to this email directly, view it on GitHub
> <#316 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AIJTIVYREI74IS2XQ2MVR7L2OJZQ5AVCNFSM6AAAAABTOLMYV2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMZXHE3TSMBZGU>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
|
|
No
Op do 6 feb 2025 om 10:46 schreef David Rapan ***@***.***>
… pymodbus==3.8.3 is missing again. Did you update to new Ha Core release?
—
Reply to this email directly, view it on GitHub
<#316 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIJTIVYAWNWJCJUYDIUAKTL2OMVOTAVCNFSM6AAAAABTOLMYV2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMZZGMYTKMRYGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I just found out that after a reboot of HA pymodbus 3.7.4 is installed
again.
So after the reboot I upgraded pymodbus to 3.8.3 and tried to install the
device again.
However the same error again.
This means that HA might have loaded still the 3.7.4 version and I need to
reboot after upgraded pymodbus. But reboot will again install pymodbus 3.7.4
So I do not know what to do now....
…On Thu, 6 Feb 2025 at 10:46, David Rapan ***@***.***> wrote:
pymodbus==3.8.3 is missing again. Did you update to new Ha Core release?
—
Reply to this email directly, view it on GitHub
<#316 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIJTIVYAWNWJCJUYDIUAKTL2OMVOTAVCNFSM6AAAAABTOLMYV2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMZZGMYTKMRYGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Just a question.... |
Because the code is written for |
Finally! Upgrading the core to 2025.2.0 helped. After reboot pymodbus is
now release 3.8.3 and it was possible to install the device.
All the numbers look good so far.
Thank you so much. It was a learning journey for me....
…On Thu, 6 Feb 2025 at 12:45, David Rapan ***@***.***> wrote:
Because the code is written for 3.8.3. Update HA Core.
—
Reply to this email directly, view it on GitHub
<#316 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIJTIV5PSOIAXZK5XZCBSFL2ONDL3AVCNFSM6AAAAABTOLMYV2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMZZGU4TMMRTHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I'm glad you made it! 🎉 |
David,
Every 2 minutes all the entities are unavailable for a few seconds.
Attached the debug file.
…On Thu, 6 Feb 2025 at 12:45, David Rapan ***@***.***> wrote:
Because the code is written for 3.8.3. Update HA Core.
—
Reply to this email directly, view it on GitHub
<#316 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIJTIV5PSOIAXZK5XZCBSFL2ONDL3AVCNFSM6AAAAABTOLMYV2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMZZGU4TMMRTHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Update integration from main because I don't know which version of dev are you running now. Edit: Try latest 912b9f9 |
Solved
Op do 6 feb 2025 om 18:07 schreef David Rapan ***@***.***>
… Update integration from main because I don't know which version of dev are
you running now.
—
Reply to this email directly, view it on GitHub
<#316 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIJTIV2WHGKJYOGU4YROGPL2OOJG5AVCNFSM6AAAAABTOLMYV2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNBQGQ4TENRSHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Description
PV - HYD 10KTL-3PH-PRO
I had integration Solarman StephanJoubert but update core 2024.12 entered incorrect values many entity. I changed for new integration ha-solarman. Most of the values is ok but active_energe and battery power is incorect for more time. More time returning value is 65kW, like

ActivePower_Output_R 64,526 W
ActivePower_Output_S 910 W
ActivePower_Output_T 64,876 W
ActivePower_Output_Total 64,766 W
ActivePower_PCC_R 64,406 W
ActivePower_PCC_S 64,456 W
ActivePower_PCC_T 64,586 W
ActivePower_PCC_Total 62,356 W
Details is chart in attachment.
My max use energy is about 8kW
My profile is sofar_g3hyd.yaml
Reproduction Steps
I only use integration. Value active power is invalid.
Log
[33m2024-12-11 20:38:15.422 WARNING (MainThread) [py.warnings] /config/custom_components/solarman/parser.py:226: RuntimeWarning: overflow encountered in scalar subtract
value = (value - maxint) if not magnitude else -(value & (maxint >> 1))
[0m
[33m2024-12-11 20:38:15.423 WARNING (MainThread) [py.warnings] /config/custom_components/solarman/parser.py:229: RuntimeWarning: overflow encountered in scalar multiply
value *= scale
[0m
[33m2024-12-11 20:38:41.460 WARNING (MainThread) [py.warnings] /config/custom_components/solarman/parser.py:226: RuntimeWarning: overflow encountered in scalar subtract
value = (value - maxint) if not magnitude else -(value & (maxint >> 1))
[0m
[33m2024-12-11 20:38:41.460 WARNING (MainThread) [py.warnings] /config/custom_components/solarman/parser.py:229: RuntimeWarning: overflow encountered in scalar multiply
value *= scale
Version
24.12.10
Home Assistant Version
2024.12.2
The text was updated successfully, but these errors were encountered: