-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
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 failing after upgrade to 2023.9.0 #99784
Comments
Hey there @adamchengtkc, @janiversen, @vzahradnik, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) modbus documentation |
Please add debug log as pr documentation otherwise it is impossible to see what happens. and of course configuration.yaml we have seen issues earlier when timeout was too fast. |
Debug logs lost when I restored the backup and reverted to 2023.8.4 Will see if I can get that done tomorrow and post the logs |
Same problem to me, i using it with alfa sinapsi and elmogway2 |
And same response, please follow our guidelines, otherwise it makes no sense to open an issue. |
Same here, looks like it wotks for one hour after reboot and then this: |
my timeout was default one (5 secs), worked fine till 2023.8.4. Now I've tried to increase to 30 secs. |
And none of you care follow the guidelines, and post a debug log. Without a debug log it is impossible to help. "No response received" is often related to a too short timeout, but can be a number of other causes. You need to make a small configuration.yaml, no custom components, run it with debug as pr modbus documentation, and post the configuration.yaml and the log here. Before that is posted no investigation will take place. |
And just for reference, my production system using tcp have been running for 24 hours without any error (I updated yesterday, hence 24 hours). |
configuration yaml:
debug log: |
@asifkassam you device stops responding, or something blocks the tcp/ip traffic:
You have set lazy_error_count: 1, so of course this result in a termination. There are a couple of other parameters this might help, please read the documentation. |
@BluetriX the easiest is to read the modbus integration documentation. |
Thanks for reply - I will try it without lazy_error_count. However, this has been working 100% for years and up to 2023.8.4 - rollback to 2023.8.4 and its stable on my production VM for 18+ hours including at the point where 2023.9.0 fails on a test VM (and it fails regularly on tes VM at 10/20/30 mins after restart) These logs from a test VM on same hypervisor as production - no firewall and no other TCP/IP blocking or filtering - devices on same subnet. |
This release contains a new version of the library, which is likely to cause problems in custom_components, that have not been updated ! In 2023.10 there will be another library bump. I did not say remove lazy_error_count, I personally use "lazy_error_count: 3" to avoid temporary problems on the net or in the device. I also have a higher timeout to give a device time to react. |
Here is my log. My typical sensor looks like this:
9_0_home-assistant_2023-09-07T19-17-00.740Z.log I have not played around with lazy_error_count, timeout or retry_on_empty. This was not neccessary with 8.4. Edit 1: Edit 2: I added New - working config:
|
@BluetriX did you look at the log:
This is right at the beginning. |
next one is:
You also have a number of custom components active, which we suggest you disable before reporting an issue, since we have no idea which effect they might have. |
and finally:
But as you can see it happens together with other errors, so it is more likely you have a network problem or something similar. |
Yeah, you are right. This is my running (productive) HA at the moment. - with lots of custom stuff. - Just wanted to help (no one was posting debug logs but have issues with this release). Ok I will have a look at my errors. Perhaps my workaround (close_comm_on_error) is not neccessary anymore. |
Same problem with this config using a lazy_error_count of 3 and an increased timeout:
attached log: home-assistant_2023-09-07T19-55-48.695Z.log Meanwhile the production VM running 2023.8.4 running over the same network fabric is not having any issues communicating with the device |
@asifkassam You have the same issue that I have:
So I don't think it's a "physical" network issue. Possibly the start of HomeAssistant is causing this. Btw: |
@BluetriX |
@asifkassam ok - so this is a different behaviour then. My error occours right at the start and repeats every while and then. But I think something doesn't fit. I will try to find out why the error comes sometimes. With me it is always the string To the original problem: Edit1: |
Tried using an isolated VM After stating up modbus working fine I have 2 modbus servers with 4 energy meters (2 on each) If I reload the modbus config the cycle repeats Reverted to 2023.8.4 VM, no issues Log above |
Please ask that question in the integration you are using, we have no way of knowing how they might or might not have changed the parameters |
I'll put the question there too, but I suspect the main issue lies in the HA update and what it has changed. As an example of one of the sensors:
|
You are probably correct, but here we do not consider custom components. |
It’s not an integration, just a set of scripts that call the standard HA ModBus service. I haven’t seen the problem myself but I haven’t updated to the version mentioned.
…On 9 Sep 2023 at 13:34 +0100, jan iversen ***@***.***>, wrote:
You are probably correct, but here we do not consider custom components.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Same problem here. Modbus sensors showing Unavailable after update to 2023.9.0. Reverted to 2023.8.0 solved issue and working as before. |
I have the same problem |
Same here ...sungrow Sensors are not available again |
Just to reiterate that the OP is not using a custom integration. The repo that I put together (and which he mistakenly calls an integration) simply has config (or registers assigned to entities) and scripts to use core HA ModBus with Solis inverters.
Unless this issue is being addressed elsewhere I think it has been Closed prematurely.
…On 9 Sep 2023 at 19:03 +0100, HKUser1 ***@***.***>, wrote:
Same here ...sungrow Sensors are not available again
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Everyone just be patient and wait for 2023.9.2 so we can see if upgrading to pymodbus 3.5.2 fixes the issue. It seems very likely it will. See here: https://github.com/pymodbus-dev/pymodbus/releases/tag/v3.5.2 |
Tested 2023.9.1 last night Ill wait for and test 2023.9.2 |
Just upgraded to 2023.9.2 Seems to have resolved the issue but will conform after a few hours of uptime |
Same here, seems solid again with 2023.9.2. |
It didn't fix the issue for me, upgraded to 2023.9.2 and it's broken still, downgraded back to 2023.9.0 and it works again. |
This new update (2023.9.2) fixed the problem for me. |
2023.9.2 is running flawless for me as well! Great work! |
Please close task as completed. |
2023.9.2 does not fix it for me, it feels more stable, but the issue sill occurs.
|
2023.10.1 and alpha sinapsi sensor, no fix It for me. |
Remove count: from sensors |
I had a similar issue with my Alfa sensor.
I hope it will be useful for someone (I just removed the count fields) |
Yet it is !! Thanks In summary just remove the COUNT command on each row where it's present. Ciao ! :-)
|
The problem
Upgraded from 2023.8.4 to 2023.9.0
After upgrade
Core connects to 2 modbus servers via rtuovertcp
After aprox 5mins all registers become unavailable
Modbus has been rock solid up to this version
Restored 2023.8.4 and modbus has returned to normal
What version of Home Assistant Core has the issue?
2023.9.0
What was the last working version of Home Assistant Core?
2023.8.4
What type of installation are you running?
Home Assistant Supervised
Integration causing the issue
modbustcp
Link to integration documentation on our website
No response
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: