-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Modbus binding (in serial mode) does not handle Modbus Exception Responses in any way #3546
Comments
You are right that error messages are not quite self-explanatory. I have actually worked on improved error messages in my branch -- it's must-have to have better error messages even during developmnet. In my branch you can see the exact error code as WARN level (as referenced in in the page you linked). I have been also thinking that different exception should be handled in a different way. In the current implementaion all kind of exceptions (even recognized modbus exceptions) are handled the same way -- connection is reseted. This is completely unnecessarily. The new branch introduces error handling that point out the root cause: modbus error or IO error or transaction id mismatch. I would like to get any feedback for the changes! Is warn level too high for modbus errors, or should we stick with debug level? |
Classic timeout (the Modbus device does not respond within the set time limit) is certainly worth to be a warn level error. Otherwise a Modbus device could disappear unnoticed - that's not good. |
PR #4226 (which is now merged) should improve logging a lot. Can you try with the new version? |
Unfortunately my studies+exams take up all my time atm. I'll do some checks in a couple of weeks. Btw I've just moved my rather big modbus serial installation to openhab 2 and it's running well at 2600/polls a minute with 17 devices on the bus. |
Hopefully fixed via PR #4226. Please start a new issue if additional problems are found. |
I'm sorry - I've completely forgotten this issue. Unfortunately it has not been fixed by PR #4226. |
Thanks . What is the behavior exactly currently with latest development version? |
Seems to apply to serial mode only.
A standard Modbus Exception Response (as outlined here: http://www.simplymodbus.ca/exceptions.htm) sent by a Modbus device is not recognized by the binding. Instead, these responses are deemed inclompete and an IOException "Error reading response" is thrown. This leaves the user with no way of knowing whether there is a real problem or if he/she has just tried to, for example, access a non existent register/coil/input on the Modbus device.
The text was updated successfully, but these errors were encountered: