Skip to content
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

Modbus creating system erros #206

Open
w1Ngx opened this issue Oct 5, 2023 · 8 comments
Open

Modbus creating system erros #206

w1Ngx opened this issue Oct 5, 2023 · 8 comments

Comments

@w1Ngx
Copy link

w1Ngx commented Oct 5, 2023

Hi,

I am using modbus since a week and noticed there are couple of errors produced:. Is this something i can fix myself?

Thanks a lot!

1:
This error originated from a custom integration.

Logger: custom_components.solaredge_modbus
Source: custom_components/solaredge_modbus/init.py:232
Integration: SolarEdge Modbus (documentation)
First occurred: 7:00:07 AM (3 occurrences)
Last logged: 7:00:16 AM

Error reading modbus data
Traceback (most recent call last):
File "/config/custom_components/solaredge_modbus/init.py", line 232, in async_refresh_modbus_data
update_result = self.read_modbus_data()
^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/solaredge_modbus/init.py", line 309, in read_modbus_data
and self.read_modbus_data_meter1()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/solaredge_modbus/init.py", line 319, in read_modbus_data_meter1
return self.read_modbus_data_meter("m1_", 40190)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/solaredge_modbus/init.py", line 468, in read_modbus_data_meter
exported = validate(self.calculate_value(exported, energywsf), ">", 0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/solaredge_modbus/init.py", line 158, in validate
raise ValueError(f"Value {value} failed validation ({comparison}{against})")
ValueError: Value 0 failed validation (>0)

2:
This error originated from a custom integration.

Logger: custom_components.solaredge_modbus
Source: custom_components/solaredge_modbus/init.py:232
Integration: SolarEdge Modbus (documentation)
First occurred: 7:00:05 AM (1 occurrences)
Last logged: 7:00:05 AM

Error reading modbus data
Traceback (most recent call last):
File "/config/custom_components/solaredge_modbus/init.py", line 232, in async_refresh_modbus_data
update_result = self.read_modbus_data()
^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/solaredge_modbus/init.py", line 307, in read_modbus_data
self.read_modbus_data_inverter()
File "/config/custom_components/solaredge_modbus/init.py", line 674, in read_modbus_data_inverter
self.data["acenergy"] = round(acenergy * 0.001, 3)
~~~~~~~~~^~~~~~~
OverflowError: int too large to convert to float

@branda92
Copy link

Hi, I also have the same problem, I don't know if it's been a long time or the latest versions. If anyone can help us fix the errors it would help us a lot.

@duracellkonijn22
Copy link

Same here... any update about this?

@ChristophCaina
Copy link
Contributor

it seems, that the inverter is reporting "0" for the sensor meter_exported sensor, but the code is trying to validate the value, because it is checking for >0

I remember, that we tried to fix this - or something similar in the past, but this caused other issues when the inverter went to sleep mode - and woke up on the next day.

The second error seems to be an issue with the data type - I am not sure, if the inverter is sending an integer value, and the integration is trying to convert it to a float value...

I need to check, if I do have the same errors in my logs...

@ChristophCaina
Copy link
Contributor

I can verify that I also do have the issue about the validation check for Meter1_exported:

Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: custom_components.solaredge_modbus
Source: custom_components/solaredge_modbus/__init__.py:232
Integration: SolarEdge Modbus (documentation)
First occurred: 18:06:05 (1 occurrences)
Last logged: 18:06:05

Error reading modbus data
Traceback (most recent call last):
  File "/config/custom_components/solaredge_modbus/__init__.py", line 232, in async_refresh_modbus_data
    update_result = self.read_modbus_data()
                    ^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/solaredge_modbus/__init__.py", line 309, in read_modbus_data
    and self.read_modbus_data_meter1()
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/solaredge_modbus/__init__.py", line 319, in read_modbus_data_meter1
    return self.read_modbus_data_meter("m1_", 40190)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/solaredge_modbus/__init__.py", line 468, in read_modbus_data_meter
    exported = validate(self.calculate_value(exported, energywsf), ">", 0)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/solaredge_modbus/__init__.py", line 158, in validate
    raise ValueError(f"Value {value} failed validation ({comparison}{against})")
ValueError: Value 0 failed validation (>0)

but I do not have the error about the integer to float convert... which could also be due to the value of the sensor...

@binsentsu
Copy link
Owner

It seems that sometimes inadvertently the value reported through modbus becomes 0. These validations are now raising exceptions. Mayb it's an option to skip the invalid value and keep the previous value in this case?

@ChristophCaina
Copy link
Contributor

also related: #191

@w1Ngx
Copy link
Author

w1Ngx commented Apr 12, 2024

Is someone working on the issue? still the same after 6 months

@w1Ngx
Copy link
Author

w1Ngx commented Jul 20, 2024

Is there any was to solve those errors myself? I assume that i am not the only person with those errors, what do others do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants