-
-
Notifications
You must be signed in to change notification settings - Fork 28.6k
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 callback_data problem #115489
Comments
You are not showing the modbus configuration. We also miss a modbus debug log as pr modbus documentation. |
Had a short glance on the yaml file, it looks ok, but without a modbus debug log, I have no possibility of tracing the problem. |
And just for reference the modbus integration in 2024.4.3 have been running fine on my production systems for 5 days (one is serial another is socket) without a single problem. I just confirmed it is NOT the "old" index problem ! nor is it the general problem in 2024.0-2. This is something special for this device. I will let the issue rest, until I see a debug log, since I cannot trace the problem without debug information. |
I would be happy to help provide debug information. Would you have a link for me to instructions on how to create a Modbus debug log? |
@Throntorus Go to https://www.home-assistant.io/integrations/modbus/ and search for debug. There is a section which tells you how to activate the debug logger. |
I can confirm that the modbus data still randomly show unavailable. 2024-04-13 15:04:31.042 DEBUG (MainThread) [pymodbus.logging] Connection lost comm due to Server not responding |
@Richardvdw01 thanks for the log, I will analyze it later, however it seems to be a different problem than reported here, the integration does not fail as such, but only do not get data. to me it looks a lot more like a configuration error....could it be you have not configured device_id or slave ? the log shows a request for device_id = 0, and device_id responds. |
2024-04-13 18:15:13.559 DEBUG (MainThread) [pymodbus.logging] Connecting to 192.168.178.33:502. |
@Throntorus thanks that is what I need, will look at it and see what I can find. I can already tell it was not what I (theoretically) thought it would be. |
Found the problem, we receive:
0x02 is the length, but it is followed by 3 bytes, which means we miss the last byte. The standard defines " The length field is a byte count of the following fields, including the Unit To be honest I have however seen this problem in a number of devices, so I will adapt pymodbus to allow for this non standard behavior. There are currently NO timeline for a fix, but it is likely to to be in 2024.5. |
Thanks! |
Thx a thousand! |
That's gotta be frustrating! Thanks for writing non-standard code for us all! |
@janiversen |
After 2 weeks searching the issue on my side (wallbox stopped working randomly), fully rebuild of my HA installation, self-doubts, ... I found this thread. Thanks for fixing this. So will not use inverter (Sungrow) integration next weeks until fix is available, not really an issue, because of no sun next 2 weeks here. |
Home assistant 2024.4.4 installed and my Sungrow issue is fixed. thank you all for your help |
I have now added all devices/entities to modbus_sungrow.yaml again, so I am using the original mkaiser yaml again. I currently get all values with HA/core 2024.4.4. Thank you ! |
Unfortunately the problem still exists here too. Configuration:
Logfile:
|
Can also confirm, Home assistant 2024.4.4 installed and my Sungrow (SH10RT and AC011E-01) issue is fixed. Also thanks for your help |
The problem
After update to core-2024.4.3, still the same problem that started after core update to 2024.4.0, see #115114, #115236, #115348
core-2024.4.3 solved the problems unfortunately not yet. Even a complete reboot of the system did not help.
Python-Version 3.12.2
Linux
6.1.73-haos-raspi
aarch64
Home Assistant OS 12.2
stable
supervisor-2024.04.0
What version of Home Assistant Core has the issue?
core-2024.4.3
What was the last working version of Home Assistant Core?
core-2024.3.3
What type of installation are you running?
Home Assistant Supervised
Integration causing the issue
modbus_sungrow.yaml
Link to integration documentation on our website
No response
Diagnostics information
No response
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
No response
The text was updated successfully, but these errors were encountered: