-
-
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
TCP modbus connection not restored after device restarted #100063
Comments
Same problem was on 2023.9.0. |
This also appears to be triggered if the device loses comms temporarily. I have a couple of modbus-connected power monitors, connected over WiFi. They occasionally drop packets or are sluggish in responding. HA does this:
...drops modbus completely, all of the entities going to unavailable, and doesn't retry. |
I'm having a similar issue with Modbus Serial, I have a device that often produces errors in the logs. Before upgrading to 2023.9.1, it would work fine, now it only works the first time after restarting the Modbus component via: As an aside, I don't think we should be upgrading the Additionally reports still been posted on this closed issue here: #99784 |
Same issue for me here. It used to work with core-2023.9.0 with the "close_comm_on_error: false" inserted but now after upgrading again even this line is not helping anymore. after a restart of HA it runs for some minutes until the sensors are not available anymore. seems to have an issue re-establishing the connection after it gets interrupted Pymodbus: FoxESSInverterModbus: Modbus Error: [Input/Output] Modbus Error: [Invalid Message] No response received, expected at least 8 bytes (0 received) |
+1 Exactly the same issue here. |
I use an automation to fix the problem temporarily.
|
+1, I have the same problem |
+1 |
1 similar comment
+1 |
@simp16 Are you seeing errors in your logs, are you using TCP or Serial? |
For me, the 2023.9.2 version fixed. Since that, my modbus never reloaded again! |
It is now working for me in 2023.9.2, but I think it is because the integration maintainer released a fix. I am using TCP. |
2023.9.2 does not fix it for me, it feels more stable, but the issue sill occurs.
|
I'm still having this problem in 2023.9.2. I've done everything but wipe my HA install and start over from scratch! What am I doing wrong?! Pymodbus: epever: Modbus Error: [Input/Output] Modbus Error: [Invalid Message] No response received, expected at least 4 bytes (0 received) |
Probably nothing.. after 4 days of working same happened to me.. simply stopped working.. restart solve problem but for how long? |
@dolenec Are you still experiencing issues, or is it stable now for you? |
From 2023.09.02 it is stable.. seems stable also on 2023.09.03. |
As mentioned by multiple people, the issue is not resolved in version 2023.09.02. |
For me it is stable.. Using TCP/IP modbus via yaml configuration (native config) + TCP/IP modbus via Node-RED + TCP/IP modbus via HACS integration.. |
Update: Suddenly it's work for me again. :) |
After updating to 2023.09.03, the issue appeared already. After reloading modbus, it is solved for some time. This happens every x hours with 64 modbus switches configured. |
Which kind of modbus using? TCP/IP? Can you share your config? |
This config worked until i installed 2023.9.x configuration.yaml:
EDIT: i reviewed my code and it seems that i had older entries in switch.yaml. Since the hub reference was not used anymore, i guess they were just ignored. I removed them completely now, but the error is still there. And i'm sure not the only one. |
As I see you have multiple hosts defined.. probably different IP host, it should be different on same port. Also hub1 is not defined.. hub1 should be name of wago_beneden and not hub1 if I am corect.. It is strange that not working only for you.. double check code and try to fix errors.. |
I'm still having issues since 2023.9.1+ , still isn't resolved in 2023.9.3: |
Running 2023.10 and still having issues |
Hey there @janiversen, 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 the debug log and a short corresponding config, that shows the problem. |
Anybody willing to share a debug log, with a small configuration, that shows the problem if not I will close this in a couple of days. Saying "me too" does not help anyone, I think there are at least 3 issues not related to the title in the chat. Anyone having problems needs to: The person who suggested not to upgrade pymodbus on minor versions, obviously should do his homework !! I happen to be maintainer here and of pymodbus. |
To be clear, several changes to the Modbus component have occurred in home assistant minor releases which had broken my configuration. This is where the frustration lied. I attempted to work with the maintainer, but the hostile demeanor made it difficult. In my case (from a user's perspective), my device (custom device with Espressif ESP-Modbus library) was working in versions prior to 2023.9.0. My Siemens PLCs and various other hardware continue to work well in newer releases. I appreciate @janiversen's contribution to Home Assistant Modbus Component & |
Just to answer, of course there are changes in several minor releases, all bug fixes. New features and incompatible changes are pr HA definition only in the monthly releases, Of course a bug fix like any other change in the software can make it nessecary for a user to adapt the configuration and in some corner cases might make the software unsuited for a specific use. I as maintainer look positive at every pull request issued, that helps the product, but of course I look to see what problems a PR can cause. That might have been what you see as negative. |
I am still waiting for a debug log showing the original problem together with a reduced (as much as possible) configuration...without a debug log, there are no way for us to identify the issue. If not provided I soon I will close this issue as solved. |
Closing due to lack of activity. |
The problem
I am using Modbus over TCP. If I reboot the device or Wi-Fi access point HA does not connect again to Modbus. I need to click on reload in the YAML menu.
There is no error or logs. Just not working until reload or HA restarted.
What version of Home Assistant Core has the issue?
core-2023.9.x
What was the last working version of Home Assistant Core?
core-2023.8.4
What type of installation are you running?
Home Assistant Container
Integration causing the issue
No response
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: